Post · 10 min read· pp. 178–188

Hyperbolic Trajectories (e > 1)

In the section for ellipses, we found Eq. 216:

μ2h3t=∫0νdν(1+ecos⁡ν)2\frac{\mu^2}{h^3}t = \int_{0}^{\nu}\frac{d\nu}{\left(1 + e\cos\nu\right)^2}

(240)

The third solution to the right hand side, when e>1e > 1 is:

∫dν(1+ecos⁡ν)2=1(e2−1)3/2[ee2−1sin⁡ν1+ecos⁡ν−ln⁡(e+1+e−1tan⁡ν2e+1−e−1tan⁡ν2)]\int\frac{d\nu}{\left(1 + e\cos \nu\right)^2} = \frac{1}{\left(e^2 - 1\right)^{3/2}}\left[\frac{e\sqrt{e^2 - 1}\sin \nu}{1 + e\cos \nu} - \ln\left(\frac{\sqrt{e + 1} + \sqrt{e - 1}\tan\frac{\nu}{2}}{\sqrt{e + 1} - \sqrt{e - 1}\tan\frac{\nu}{2}}\right)\right]

(241)

In Eq. 241, e>1e > 1, so it will apply for hyperbolic trajectories.

For the hyperbola, combining Eq. 216 and Eq. 241 results in:

Mh=ee2−1sin⁡ν1+ecos⁡ν−ln⁡[e+1+e−1tan⁡ν2e+1−e−1tan⁡ν2]M_h = \frac{e\sqrt{e^2 - 1}\sin\nu}{1 + e\cos\nu} - \ln\left[\frac{\sqrt{e + 1} + \sqrt{e - 1}\tan\frac{\nu}{2}}{\sqrt{e + 1} - \sqrt{e - 1}\tan\frac{\nu}{2}}\right]

(242)

where

Mh=μ2h3t(e2−1)3/2M_h = \frac{\mu^2}{h^3} t \left(e^2 - 1\right)^{3/2}

(243)

The hyperbolic mean anomaly, like the elliptical mean anomaly, is a monotonic function of the true anomaly, as shown in Fig. 61.

python
from pathlib import Path

from IPython.display import display
from matplotlib import font_manager
from matplotlib.ticker import (
    MultipleLocator,
    FuncFormatter,
    AutoMinorLocator,
)
import matplotlib.pyplot as plt
import numpy as np

# Match the page's KaTeX 0.15.2 math fonts without changing ordinary text.
font_dir = next(
    parent / "assets-src/fonts/katex"
    for parent in (Path.cwd(), *Path.cwd().parents)
    if (parent / "assets-src/fonts/katex").is_dir()
)
for font_file in font_dir.glob("*.ttf"):
    font_manager.fontManager.addfont(font_file)
katex_math = {
    "mathtext.fontset": "custom",
    "mathtext.rm": "KaTeX_Main",
    "mathtext.it": "KaTeX_Math:style=italic",
    "mathtext.cal": "KaTeX_Main",
}

with plt.rc_context(katex_math):
    fig, ax = plt.subplots(figsize=(6, 4), dpi=200)
    ax.set_ylabel("$M_h$")
    ax.set_xlabel(r"$\nu$")
    ax.set_xlim(0, np.pi)
    e_vals = [1.1, 1.5, 2.0, 3.0, 5.0]
    ax.xaxis.set_major_locator(MultipleLocator(base=np.pi / 2))
    ax.xaxis.set_major_formatter(FuncFormatter(lambda val, pos: {0: "0", np.pi/2: r"$\pi/2$", np.pi: r"$\pi$"}.get(val, "")))
    ax.xaxis.set_minor_locator(AutoMinorLocator(n=10))
    ax.xaxis.grid(which="both")
    ax.yaxis.grid(which="major")
    for e in e_vals:
        nu_inf = np.arccos(-1 / e)
        nu = np.linspace(0.1, np.pi / 2)
        nu = np.hstack((nu, np.linspace(np.pi / 2, nu_inf - 1.0E-3, 150)))
        M_h = e * np.sqrt(e**2 - 1) * np.sin(nu) / (1 + e * np.cos(nu))
        sqrt_e_p_1 = np.sqrt(e + 1)
        sqrt_e_m_1_t = np.sqrt(e - 1) * np.tan(nu / 2)
        M_h -= np.log((sqrt_e_p_1 + sqrt_e_m_1_t) / (sqrt_e_p_1 - sqrt_e_m_1_t))
        ax.semilogy(nu, M_h, label=f"$e = {e}$")
    ax.legend();
text
findfont: Font family ['cursive'] not found. Falling back to DejaVu Sans.
text
findfont: Generic family 'cursive' not found because none of the following families were found: Apple Chancery, Textile, Zapf Chancery, Sand, Script MT, Felipa, Comic Neue, Comic Sans MS, cursive

<Figure size 1200x800 with 1 Axes>

python
# Keep the same math configuration when the notebook renders the figure.
with plt.rc_context(katex_math):
    display(fig)

<Figure size 1200x800 with 1 Axes>

<Figure size 1200x800 with 1 Axes>

Figure 61:The hyperbolic mean anomaly as a function of true anomaly. Note that the yy-scale is a log scale.

Notice that ν\nu cannot exceed ν∞=cos⁡−1(−1/e)\nu_{\infty} = \cos^{-1}(-1 / e).

Hyperbolic Eccentric Anomaly

Similar to the ellipse, we will define an auxiliary angle FF to simplify the equations. FF is defined with reference to the hyperbola in Fig. 62.

python
with plt.rc_context(katex_math):
    fig, ax = plt.subplots(figsize=(6, 4), dpi=200)
    ax.set_aspect("auto")

    ax.spines["top"].set_visible(False)
    ax.spines["right"].set_visible(False)
    ax.xaxis.set_tick_params(bottom=False, top=False, which="both", labelbottom=False)
    ax.yaxis.set_tick_params(left=False, right=False, which="both", labelleft=False)

    # Move remaining spines to the center
    ax.spines["bottom"].set_position("zero")  # spine for xaxis
    ax.spines["left"].set_position("zero")  # spine for yaxis

    e = 1.5
    nu_inf = np.arccos(-1 / e)
    a = 1
    b = a * np.sqrt(e ** 2 - 1)
    r_p = a * (e - 1)
    x_a = 100 * np.cos(nu_inf)
    y_a = 100 * np.sin(nu_inf)

    ax.set_xlim(-4, 1)
    ax.set_ylim(-3, 3)

    x = np.linspace(a, 3 * a, 100)
    y = b / a * np.sqrt(x ** 2 - a ** 2)
    ax.plot(np.hstack((-x[::-1], -x)), np.hstack((y[::-1], -y)))
    ax.plot((x_a, -x_a), (y_a, -y_a), ls="--", color="C1")
    ax.plot((-x_a, x_a), (y_a, -y_a), ls="--", color="C1")

    t = np.radians(100)
    r = a * (e ** 2 - 1) / (1 + e * np.cos(t))
    x_1 = -a - r_p + r * np.cos(t)
    y_1 = r * np.sin(t)
    hyperbola_focus = -a - r_p
    ax.plot((hyperbola_focus, x_1), (0, y_1), "k-o")
    ax.plot((-a, -a), (0, b), "ko-", markersize=5)
    ax.annotate("", xy=(-2*a - r_p, 0), xytext=(-2*a - r_p, y_1), arrowprops={"arrowstyle": "<->"})
    ax.annotate("$y$", xy=(-2*a - r_p, y_1/2), backgroundcolor="white", ha="center", va="center")
    ax.plot((-2*a - r_p - 0.1, x_1 - 0.1), (y_1, y_1), color="black", lw=0.5)
    ax.annotate("", xy=(0, 2*b), xytext=(x_1, 2*b), arrowprops={"arrowstyle": "<->"})
    ax.annotate("$x$", xy=(x_1/2, 2*b), backgroundcolor="white", ha="center", va="center")
    ax.plot((x_1, x_1), (2*b + 0.1, y_1 + 0.1), color="black", lw=0.5)
    ax.annotate("$b$", xy=(-a, b/2), ha="left", va="center")
    ax.annotate("", xy=(0, -0.2), xytext=(-a, -0.2), arrowprops={"arrowstyle": "<->"})
    ax.annotate("$a$", xy=(-a/2, -0.35), ha="center", va="center")
    ax.annotate("", xy=(-a, -0.2), xytext=(-a - r_p, -0.2), arrowprops={"arrowstyle": "<->"})
    ax.annotate("$r_p$", xy=(-a - r_p/2, -0.4), ha="center", va="center")
    ax.plot((-a - r_p, -a - r_p), (-0.1, -0.3), lw=0.5, color="black")
    ax.plot((-a , -a), (-0.1, -0.3), lw=0.5, color="black")
    ax.annotate("$r$", xy=((x_1 + hyperbola_focus) / 2, y_1 / 2), ha="right", va="top")
    ax.annotate("$C$", xy=(0, 0.2), va="bottom", ha="center", backgroundcolor="white");
python
with plt.rc_context(katex_math):
    display(fig)

<Figure size 1200x800 with 1 Axes>

<Figure size 1200x800 with 1 Axes>

Figure 62:A hyperbolic trajectory with definitions for distances used in the derivation of Kepler’s law for hyperbolic trajectories.

The ratio y/by/b is the definition of the hyperbolic sine of the angle FF:

sinh⁡F=yb\sinh F = \frac{y}{b}

(244)

Then, using the hyperbolic trigonometric identity:

cosh⁡2c−sinh⁡2c=1\cosh^2 c - \sinh^2 c = 1

(245)

we also define

cosh⁡F=xa\cosh F = \frac{x}{a}

(246)

Note

The hyperbolic angle FF is weird. The reason we don’t draw it on the figure is because hyperbolic angles aren’t angles per se. Instead, they can be interpreted as half the area between the xx-axis and a line drawn from the origin to the point of interest, bounded by the hyperbola. I think. At least, that’s my best interpretation from what I’ve been able to read. YMMV.

Another way of thinking about this is by analogy to a circle. For a circle, we can draw any two lines from the center of the circle to the perimeter. These two lines will have an angle ϕ\phi between them, and the area between them will be:

Acircular sector=r2ϕ2A_{\text{circular sector}} = \frac{r^2 \phi}{2}

(247)

The highlighted area is a circular sector. Modified from Original: Cburnett, CC-BY-SA 3.0, via Wikimedia Commons.

Figure 63:The highlighted area is a circular sector. Modified from Original: Cburnett, CC-BY-SA 3.0, via Wikimedia Commons.

If the circle is a unit circle (r=1r = 1), then the area of the sector will be equal to the angle divided by two. Turned around, the angle is equal to twice the area:

ϕ=2A12\phi = \frac{2A}{1^2}

(248)

Similarly, the hyperbolic angle is defined on the unit hyperbola as twice the area between two lines that start at the origin and touch the hyperbola, called a hyperbolic sector.

The area of the hyperbolic sector is half the hyperbolic angle. Hyperbolic_functions.svg: The original uploader was Marco Polo at English Wikipedia.derivative work: Jeandavid54, Public domain, via Wikimedia Commons

Figure 64:The area of the hyperbolic sector is half the hyperbolic angle. Hyperbolic_functions.svg: The original uploader was Marco Polo at English Wikipedia.derivative work: Jeandavid54, Public domain, via Wikimedia Commons

However, the circular angle between the xx-axis and the ray from the origin is not the same as the hyperbolic angle.

You can read more about hyperbolic angles on Brilliant and on Wikipedia.

We can relate FF to the true anomaly ν\nu by plugging in y=rsin⁡νy = r\sin\nu, and the orbit equation for rr. We also note that b=ae2−1b = a\sqrt{e^2 - 1}. Then:

F=sinh⁡−1(sin⁡νe2−11+ecos⁡ν)=ln⁡(sin⁡νe2−1+cos⁡ν+e1+ecos⁡ν)F = \sinh^{-1}\left(\frac{\sin\nu\sqrt{e^2 - 1}}{1 + e\cos\nu}\right) = \ln\left(\frac{\sin\nu\sqrt{e^2 - 1} + \cos\nu + e}{1 + e\cos\nu}\right)

(249)

After some more trigonometry and algebra, we find:

F=ln⁡[e+1+e−1tan⁡ν2e+1−e−1tan⁡ν2]F= \ln\left[\frac{\sqrt{e + 1} + \sqrt{e - 1}\tan\frac{\nu}{2}}{\sqrt{e + 1} - \sqrt{e - 1}\tan\frac{\nu}{2}}\right]

(250)

And, with a little more algebra and trigonometry, we find an equation for FF in terms of ν\nu more directly, analogous to the ellipse:

tanh⁡F2=e−1e+1tan⁡ν2\tanh\frac{F}{2} = \sqrt{\frac{e - 1}{e + 1}}\tan\frac{\nu}{2}

(251)

Kepler’s Equation for the Hyperbola

Substituting this back into Eq. 242, we find Kepler’s equation for the hyperbola:

Mh=esinh⁡F−FM_h = e\sinh F - F

(252)

As with the ellipse, Kepler’s equation can be solved easily if FF is known. However, if time is the known quantity, then Kepler’s equation is transcendental and must be solved numerically. The form of the equation for the Newton solver is f(F)=0f(F) = 0, or:

f(F)=0=esinh⁡F−F−Mhf(F) = 0 = e\sinh F - F - M_h

(253)

To aid in the numerical solution, the derivative of Kepler’s equation for the hyperbola is:

f′(F)=ecosh⁡F−1f'(F) = e \cosh F - 1

(254)

In addition, we can estimate an initial value for the guess of FF from Fig. 65, with a known MhM_h value.

python
fig, ax = plt.subplots(figsize=(6, 4), dpi=200)

ax.set_ylabel(r"$\log\left(M_h\right)$")
ax.set_xlabel("$F$")
ax.set_xlim(0, 2 * np.pi)
e_vals = [1.1, 1.5, 2.0, 3.0, 5.0]
F = np.linspace(0.01, 2 * np.pi, 100)
ax.xaxis.set_minor_locator(AutoMinorLocator(n=5))
ax.yaxis.set_minor_locator(AutoMinorLocator(n=5))
ax.grid(which="both")
for e in e_vals:
    M_h = np.log10(e * np.sinh(F) - F)
    ax.plot(F, M_h, label=f"$e$ = {e}")
ax.legend();
python
fig

<Figure size 1200x800 with 1 Axes>

<Figure size 1200x800 with 1 Axes>

Figure 65:The hyperbolic mean anomaly as a function of the eccentric anomaly

Note that the yy-axis plots the log base 10 of MhM_h. To use the graph, take the log base 10 of whatever value you calculate for MhM_h and find that on the graph. For example, assume that Mh=M_h = 40.69 rad and e=e = 2.5. Then,

log⁡10(40.69)=1.6\log_{10}(40.69) = 1.6

(255)

From Fig. 65, we estimate that F=F = 4, and we can use this as the initial guess for a Newton solver. Remember that for your guess it is not important to be very precise, since the solver just needs a hint about where to start finding the root.