Equation of a Hyperbola with Predetermined Foci

Introduction

I found the equation of an ellipse with the foci at the location of our choosing. This is the same for a hyperbola. The goal is to select where we want our foci and choose the length of the major or minor axis. What would the equation of the hyperbola be?

I will go through the steps quickly here since the steps are the same. Refer to the Equation of an Ellipse with Predetermined Foci for more details if needed.

The equation of a hyperbola is either \( \frac{x^{2}}{a^{2}} - \frac{y^{2}}{b^{2}} = 1 \) or \( -\frac{x^{2}}{a^{2}} + \frac{y^{2}}{b^{2}} = 1 \). We will follow the steps for the first equation.

Note that because of the relationship \( c^{2} = a^{2} + b^{2} \) for a hyperbola, we can either pick our own a or b, but not both. And since we are picking our own foci, the c has been predetermined because it is half the distance of the foci.

So, let’s get started. The math is actually not that complicated.

The Approach

First, since we are choosing our own foci, we will call their coordinates \( (P_{1}, Q_{1}) \) and \( (P_{2}, Q_{2}) \). The distance between the foci is 2c, due to the properties of a hyperbola. Therefore, \( 2c = \sqrt{(P_{1}- P_{2})^{2} + (Q_{1} - Q_{2})^{2}} \). Let’s keep this in mind.

Second, we can choose the length of the major axis or the minor axis but not both, ensuring that c > a. Since c is already determined by the distance between the foci, use the equation \( c^{2} = a^{2} + b^{2} \) to find a or b.

Third, the center of the hyperbola is the midpoint of the foci. Therefore, the center will be at \( \left( \frac{P_{1}+P_{2}}{2}, \frac{Q_{1}+Q_{2}}{2} \right) \).

Fourth, the angle of rotation, \( \phi \), is \( \phi = \tan^{-1}\left(\frac{Q_{2}-Q_{1}}{P_{2}-P_{1}} \right) \).

With these four relationships we have determined, our approach is to find the equation of the hyperbola in standard position with the above relationships, then rotate the hyperbola using the rotation substitutions, and then shift the hyperbola to the center we have determined above.

The Rotated Hyperbola

Let’s convert the standard equation of the hyperbola to a general equation of conics and rotate the hyperbola by \( \phi \) first. For now, we will keep the angle as the simple variable instead of its arctangent value. May be it may not be necessary later on?

The general equation is \( b^{2}x^{2} - a^{2}y^{2} - (ab)^{2} = 0 \). To rotate by \( \phi \), we use the following substitutions: \( x = x'\cos\phi + y'\sin\phi \) and \( y = y'\cos\phi - x'\sin\phi \). I do not like using primes, so let’s assume the standard equation is with primes and we are finding the rotated equation.

(i) \( b^{2}x'^{2} - a^{2}y'^{2} - (ab)^{2} = 0 \)

(ii) \( b^{2}(x\cos\phi + y\sin\phi)^{2} - a^{2}(y\cos\phi - x\sin\phi)^{2} - (ab)^{2} = 0 \)

(iii) \( b^{2}(\cos^{2}\phi x^{2} + 2\sin\phi \cos\phi xy + \sin^{2}\phi y^{2}) - \) \( a^{2}(\cos^{2}\phi y^{2} - 2\sin\phi \cos\phi xy + \sin^{2}\phi x^{2}) - (ab)^{2} = 0 \)

(iv) \( (b^{2}\cos^{2}\phi - a^{2}\sin^{2}\phi)x^{2} + (b^{2}\sin^{2}\phi - a^{2}\cos^{2}\phi)y^{2} + \) \( (a^{2}+b^{2})(2\sin\phi\cos\phi)xy - (ab)^{2} = 0 \)

The coefficient of the \( xy \) term is \( a^{2} + b^{2} \) which is equal to \( c^{2} \). Let’s make that substitution after rearrangement.

(v) \( (b^{2}\cos^{2}\phi - a^{2}\sin^{2}\phi)x^{2} + (b^{2}\sin^{2}\phi - a^{2}\cos^{2}\phi)y^{2} + \) \( (2c^{2}\sin\phi\cos\phi)xy - (ab)^{2} = 0 \)

Equation (v) represents our hyperbola that has the same angle of rotation as our desired hyperbola except its center is at the origin.

The Trig Substitutions

Remember our angle of rotation is \( \phi = \tan^{-1}\left(\frac{Q_{2}-Q_{1}}{P_{2}-P_{1}} \right) \). We need to determine the sine and cosine of this angle of rotation. By using a right triangle, these values are: \( \cos\phi = \frac{P_{2}-P_{1}}{\sqrt{(P_{2}-P_{1})^{2} + (Q_{2}-Q_{1})^{2}}} \) and \( \sin\phi = \frac{Q_{2}-Q_{1}}{\sqrt{(P_{2}-P_{1})^{2} + (Q_{2}-Q_{1})^{2}}} \). But we already know that \( 2c = \sqrt{(P_{2}- P_{2})^{1} + (Q_{2} - Q_{1})^{2}} \). So the trigonometry values are essentially \( \cos\phi = \frac{P_{2}-P_{1}}{2c} \) and \( \sin\phi = \frac{Q_{2}-Q_{1}}{2c} \). With these substitutions, our equation in (iv) becomes:

(vi) \( \left( \frac{b^{2}(P_{2}-P_{1})^{2}}{4c^{2}} - \frac{a^{2}(Q_{2}-Q_{1})^{2}}{4c^{2}} \right)x^2 + \) \( \left( \frac{b^{2}(Q_{2}-Q_{1})^{2}}{4c^{2}} - \frac{a^{2}(P_{2}-P_{1})^{2}}{4c^{2}} \right)y^2 + \) \( 2c^{2} \left(\frac{P_{2}-P_{1}}{2c}\right) \left(\frac{Q_{2}-Q_{1}}{2c}\right)xy - (ab)^{2} = 0 \)

(vii) \( \left(b^{2}(P_{2}-P_{1})^{2} - a^{2}(Q_{2}-Q_{1})^{2}\right)x^2 + \) \( \left(b^{2}(Q_{2}-Q_{1})^{2} - a^{2}(P_{2}-P_{1})^{2}\right)y^2 + \) \(2c^{2}(P_{2}-P_{1})(Q_{2}-Q_{1})xy - 4(abc)^{2} = 0 \) (Multiply both sides by \(4c^{2}\))

The Final Shift

Last part is to shift the hyperbola to the center of the chosen foci.

(viii) \( \left(b^{2}(P_{2}-P_{1})^{2} - a^{2}(Q_{2}-Q_{1})^{2}\right)\left(x - \frac{P_{1}+ P_{2}}{2} \right)^2 + \) \( \left(b^{2}(Q_{2}-Q_{1})^{2} - a^{2}(P_{2}-P_{1})^{2}\right)\left(y - \frac{Q_{1} + Q_{2}}{2} \right)^2 + \) \(2c^{2}(P_{2}-P_{1})(Q_{2}-Q_{1})\left(x - \frac{P_{1}+ P_{2}}{2} \right)\left(y - \frac{Q_{1}+ Q_{2}}{2} \right) - 4(abc)^{2} = 0 \)

A hyperbola that has foci at \( (P_{1}, Q_{1}) \) and \( (P_{2}, Q_{2}) \) has the equation:

\( \left(b^{2}(P_{2}-P_{1})^{2} - a^{2}(Q_{2}-Q_{1})^{2}\right)\left(x - \frac{P_{1}+ P_{2}}{2} \right)^2 + \) \( \left(b^{2}(Q_{2}-Q_{1})^{2} - a^{2}(P_{2}-P_{1})^{2}\right)\left(y - \frac{Q_{1} + Q_{2}}{2} \right)^2 + \) \(2c^{2}(P_{2}-P_{1})(Q_{2}-Q_{1})\left(x - \frac{P_{1}+ P_{2}}{2} \right)\left(y - \frac{Q_{1}+ Q_{2}}{2} \right) - 4(abc)^{2} = 0 \)

where \( c = \frac{1}{2}\sqrt{(P_{2} - P_{1})^{2} + (Q_{2}-Q_{1})^{2}} \) and \( c^{2} = a^{2} + b^{2} \).

What an elegant equation! And notice that we did not have to deal with the messy trigonometry of the rotation angle!

We could make the substitution of b and c in the final equation but it just makes it more complicated.

I am not sure if we multiply it all out the equation would reduce further, but at least we have everything in place to customize our hyperbola.

Observations

When P1 = P2 or Q1 = Q2, we have a standard hyperbola. When this is the case, the xy term disappears, which is expected.

For rational location of the foci and a rational major axis length, the coefficients will be rational. However, because we have the relationship \( c^{2} = a^{2} + b^{2} \), either a or b will be irrational. In Example 1, we will choose an integer value for a so that b turns out to be irrational. The only way a, b, and c to be rational is if we use two Pythogrean triples; for example, 3-4-5 and 5-12-13 where 5 is the common number.

Examples

Example 1

Figure 1: Hyperbola with Foci at (-8, 4) and (8, -8)

Figure 1 shows a hyperbola with foci at (-8, 4) and (8, -8). The major axis has length of 16 so a is 8. The center is at (0, -2). The equation of the hyperbola is \( -24xy - 7y^{2}-48x-28y-604 = 0 \).

The hyperbola in red is the same hyperbola centered at the origin and in standard orientation.

The hyperbola does not have an \(x^{2}\) term, which means it has one horizontal asymptote.

Choosing our foci leads to very large coefficients. Choosing foci that are 45° gives simpler equations.

Figure 2: Hyperbola with Foci at (-8, 4) and (8, -12)

The hyperbola above \( -xy - 4x - 32 = 0 \) has foci that form a 45° angle and the equation is much simpler.

Moving the foci to (-8, 4) and (4, -8) gives this equation: \( 7x^{2} + 18xy + 64x + 7y^{2} + 64y + 256 = 0 \). It is graphed below. Geogebra does not reduce the coefficients.

Figure 3: Hyperbola with Foci at (-8, 4) and (4, -8)

The fact that the x and y term have the same coefficient and the \( x^{2} \) and \( y^{2} \) term also have the same coefficient represents the symmetry about the line with slope -1 or 1.