1

Assuming a hyperbola given in cartesian form

$$A x^{2} + B x y + C y^{2} + D x + E y + F = 0.$$

Coming from the nice formulas for the ellipse, what are the formulas for the parameters $a,b$ in its parametric form

$$x(t) = x_c + a \cos(\phi)\cosh(t) - b \sin(\phi)\sinh(t)\\ y(t) = y_c + a \sin(\phi)\cosh(t) + b \cos(\phi)\sinh(t), t \in \mathbb{R},$$ where $\phi = \text{atan2}(-B, C-A)/2$ and center coordinates

$$x_c = \frac{B E-2 C D}{4 A C -B^2}$$ $$y_c = \frac{B D-2 A E}{4 A C -B^2}?$$

Thanks in advance!

darksun
  • 341
  • $x^2/a^2-y^2/b^2=\pm 1,$ the two conjugate hyperbolas with semiaxes $a, b.$ Finding these from $A,B,C,D,E,F$ is a question that is often asked here. – Jan-Magnus Økland Apr 29 '25 at 09:39
  • So, it seems its an elementary question, but never solved. – darksun Apr 29 '25 at 09:49
  • 1
    Translating the center to the origin $$A(x-x_c)^2+B(x-x_c)(y-y_c)+C(y-y_c)^2+F'=0,$$ where $$F'=\frac{-AE^2+BDE-CD^2}{4AC-B^2}$$ and further writing it as a matrix equation $$\begin{pmatrix} x-x_c&y-y_c\end{pmatrix}\begin{pmatrix} A&B/2\B/2&C\end{pmatrix}\begin{pmatrix} x-x_c\y-y_c\end{pmatrix}+F'=0$$ – Jan-Magnus Økland Apr 29 '25 at 10:50
  • 1
    diagonalizing we get $$\begin{pmatrix} x-x_c&y-y_c\end{pmatrix}P\begin{pmatrix} \lambda_1&0\0&\lambda_2\end{pmatrix}P^t\begin{pmatrix} x-x_c\y-y_c\end{pmatrix}+F'=0$$ where P can be written $$\begin{pmatrix} \cos{\phi}&\sin{\phi}\-\sin{\phi}&\cos{\phi}\end{pmatrix}.$$ Then it's a matter of getting the constant term to be $\pm 1,$ the sign determines which of the two conjugate hyperbolas you arrive at. Then $a,b=\sqrt{|\lambda/F|}$ – Jan-Magnus Økland Apr 29 '25 at 10:50
  • @Jan-MagnusØkland Thanks! Looking good, but testing an example, the scale of $a,b$ seems to be off. The values are far to large, – darksun Apr 29 '25 at 11:23
  • Sorry, $\sqrt{F/\lambda}$ – Jan-Magnus Økland Apr 29 '25 at 11:27
  • Was about to write that. Yes, now it works, cheers! Getting the right branch might be connected to my answer here https://math.stackexchange.com/questions/324048/equation-of-one-branch-of-a-hyperbola-in-general-position/5058026#5058026. – darksun Apr 29 '25 at 11:28
  • @Jan-MagnusØkland Its still a bit off, but when replacing $F$ by $F+F'$ in your formula it fits in my test example. – darksun Apr 29 '25 at 11:46
  • 1
    That’s right; $F+F’.$ Didn’t have time to write and vet a proper answer – Jan-Magnus Økland Apr 29 '25 at 11:59

1 Answers1

0

The parameters $a,b$ are actually the same as for the ellipse, just with absolute values, so the following result is valid for both ellipse and hyperbola

$$ a = \frac{\sqrt{2 \left|\Delta \left(A + C + \sqrt{(A - C)^2 + B^2}\right)\right|} }{\left|4 A C - B^2\right|}\\ b = \frac{\sqrt{2 \left|\Delta \left(A + C - \sqrt{(A - C)^2 + B^2}\right)\right|} }{\left|4 A C - B^2\right|},$$

where

$$\Delta = -C D^2 + B D E - A E^2 - B^2 F + 4 A C F.$$

It does coincide with whats written in the comments above.

JHT
  • 360