Astronomy and Space Exploration ES

Higher Education / Celestial mechanics

The two-body problem

Reduction to one body, energy and angular-momentum integrals, the Laplace–Runge–Lenz vector and the orbit equation (Binet), verified against the JPL Horizons state vector of Mars at J2000.

⏱ 180 min vector ODEsfirst integralscross productconic sectionschange of variable u = 1/ranalysis of numerical cancellation revision

By the end you will be able to:
  • Reduce the gravitational two-body problem to a one-body problem with parameter μ = G(m₁ + m₂).
  • Prove the conservation of the specific angular momentum h, the specific energy ε and the Laplace–Runge–Lenz vector A.
  • Derive the orbit equation r = p/(1 + e cos ν) from A and, alternatively, from Binet's equation.
  • Classify orbits by the sign of ε and relate a, e, p, h and ε to one another (vis-viva, Kepler's third law).
  • Compute h, ε, A and the geometric elements of a real orbit from a JPL Horizons state vector and analyze the propagation of errors.

1. Motivation

Illustration: Motivation

Two point masses attracting each other according to Newton’s law form the only gravitational problem that can be solved exactly. All of the celestial mechanics that follows (perturbations, three bodies, space maneuvers) is built on it: every planet, comet or probe is described, instant by instant, as if it followed the two-body orbit that best fits its state. In this lesson we prove that this orbit is a conic, identify the quantities that are conserved, and check everything against the real state vector of Mars published by JPL.

2. Reduction to one body

Illustration: Reduction to one body

Let two masses m1m_1, m2m_2 have inertial positions R1\mathbf R_1, R2\mathbf R_2, and let GG be the gravitational constant. Newton’s equations are

m1R¨1=Gm1m2∥R2−R1∥3(R2−R1),m2R¨2=−Gm1m2∥R2−R1∥3(R2−R1).m_1\ddot{\mathbf R}_1 = \frac{G m_1 m_2}{\lVert\mathbf R_2-\mathbf R_1\rVert^3}(\mathbf R_2-\mathbf R_1), \qquad m_2\ddot{\mathbf R}_2 = -\frac{G m_1 m_2}{\lVert\mathbf R_2-\mathbf R_1\rVert^3}(\mathbf R_2-\mathbf R_1).

Adding them, the center of mass Rcm=(m1R1+m2R2)/(m1+m2)\mathbf R_{cm} = (m_1\mathbf R_1 + m_2\mathbf R_2)/(m_1+m_2) satisfies R¨cm=0\ddot{\mathbf R}_{cm} = 0: it moves in a straight line at constant velocity (six constants of integration). Subtracting the equations divided by their respective masses, the relative vector r=R2−R1\mathbf r = \mathbf R_2 - \mathbf R_1 obeys

  r¨=−μr3 r,μ≡G(m1+m2),r=∥r∥  \boxed{\;\ddot{\mathbf r} = -\frac{\mu}{r^3}\,\mathbf r, \qquad \mu \equiv G(m_1+m_2),\quad r = \lVert\mathbf r\rVert\;}

which is the motion of a particle in a fixed central field with gravitational parameter μ\mu (m³/s²). The energy and angular momentum of the system in the center-of-mass frame are written with the reduced mass m∗=m1m2/(m1+m2)m^* = m_1 m_2/(m_1+m_2): E=12m∗v2−Gm1m2/rE = \tfrac12 m^* v^2 - G m_1 m_2/r and L=m∗ r×v\mathbf L = m^*\,\mathbf r\times\mathbf v, with v=r˙\mathbf v = \dot{\mathbf r}. Dividing by m∗m^* we obtain the specific quantities (per unit reduced mass) that we will use from here on:

ε=v22−μr,h=r×v.\varepsilon = \frac{v^2}{2} - \frac{\mu}{r}, \qquad \mathbf h = \mathbf r\times\mathbf v .

For a planet orbiting the Sun, μ=GM⊙(1+mp/M⊙)\mu = GM_\odot(1 + m_p/M_\odot). JPL reflects this in its “Keplerian GM”: for Mars, μ=1.32712482870×1011\mu = 1.32712482870\times10^{11} km³/s², which is GM⊙=1.32712440041×1011GM_\odot = 1.32712440041\times10^{11} plus GMMars=4.2828×104GM_{\text{Mars}} = 4.2828\times10^{4} km³/s² (DE441).

3. First integrals

Illustration: First integrals

3.1 Angular momentum: the motion is planar

dhdt=r˙×v+r×r¨=v×v−μr3 r×r=0.\frac{d\mathbf h}{dt} = \dot{\mathbf r}\times\mathbf v + \mathbf r\times\ddot{\mathbf r} = \mathbf v\times\mathbf v - \frac{\mu}{r^3}\,\mathbf r\times\mathbf r = \mathbf 0 .

Since r⊥h\mathbf r\perp\mathbf h at every instant, the orbit lies in the plane perpendicular to h\mathbf h. In polar coordinates (r,ν)(r,\nu) of that plane, v=r˙ r^+rν˙ ν^\mathbf v = \dot r\,\hat{\mathbf r} + r\dot\nu\,\hat{\boldsymbol\nu} and

h=r2ν˙,dAdt=12r2ν˙=12h=const,h = r^2\dot\nu, \qquad \frac{dA}{dt} = \tfrac12 r^2\dot\nu = \tfrac12 h = \text{const},

which is Kepler’s second law (the law of areas).

3.2 Energy

ddt ⁣(v22)=v⋅r¨=−μr3 r⋅v=−μr3 rr˙=ddt ⁣(μr),\frac{d}{dt}\!\left(\frac{v^2}{2}\right) = \mathbf v\cdot\ddot{\mathbf r} = -\frac{\mu}{r^3}\,\mathbf r\cdot\mathbf v = -\frac{\mu}{r^3}\,r\dot r = \frac{d}{dt}\!\left(\frac{\mu}{r}\right),

using r⋅v=rr˙\mathbf r\cdot\mathbf v = r\dot r. Hence ε=v2/2−μ/r\varepsilon = v^2/2 - \mu/r is constant.

3.3 The Laplace–Runge–Lenz vector

Proposition. The vector A=v×h−μ rr\mathbf A = \mathbf v\times\mathbf h - \mu\,\dfrac{\mathbf r}{r} is conserved.

Proof. Since h\mathbf h is constant, ddt(v×h)=r¨×h\dfrac{d}{dt}(\mathbf v\times\mathbf h) = \ddot{\mathbf r}\times\mathbf h. With the identity a×(b×c)=b(a⋅c)−c(a⋅b)\mathbf a\times(\mathbf b\times\mathbf c) = \mathbf b(\mathbf a\cdot\mathbf c) - \mathbf c(\mathbf a\cdot\mathbf b):

r¨×h=−μr3 r×(r×v)=−μr3[r(r⋅v)−v r2]=μ[vr−(r⋅v)r3 r].\ddot{\mathbf r}\times\mathbf h = -\frac{\mu}{r^3}\,\mathbf r\times(\mathbf r\times\mathbf v) = -\frac{\mu}{r^3}\big[\mathbf r(\mathbf r\cdot\mathbf v) - \mathbf v\,r^2\big] = \mu\left[\frac{\mathbf v}{r} - \frac{(\mathbf r\cdot\mathbf v)}{r^3}\,\mathbf r\right].

On the other hand, ddtrr=vr−r˙r2r=vr−(r⋅v)r3r\dfrac{d}{dt}\dfrac{\mathbf r}{r} = \dfrac{\mathbf v}{r} - \dfrac{\dot r}{r^2}\mathbf r = \dfrac{\mathbf v}{r} - \dfrac{(\mathbf r\cdot\mathbf v)}{r^3}\mathbf r. Both expressions coincide, so A˙=r¨×h−μ ddt(r/r)=0\dot{\mathbf A} = \ddot{\mathbf r}\times\mathbf h - \mu\,\frac{d}{dt}(\mathbf r/r) = \mathbf 0. ■\blacksquare

Two immediate properties:

  • A⋅h=0\mathbf A\cdot\mathbf h = 0 (both terms are perpendicular to h\mathbf h): A\mathbf A lies in the orbital plane.
  • A2=μ2+2εh2A^2 = \mu^2 + 2\varepsilon h^2. Indeed, v⊥h\mathbf v\perp\mathbf h gives ∥v×h∥2=v2h2\lVert\mathbf v\times\mathbf h\rVert^2 = v^2h^2, and (v×h)⋅r=h⋅(r×v)=h2(\mathbf v\times\mathbf h)\cdot\mathbf r = \mathbf h\cdot(\mathbf r\times\mathbf v) = h^2, so A2=v2h2−2μh2/r+μ2=μ2+2h2(v22−μr)A^2 = v^2h^2 - 2\mu h^2/r + \mu^2 = \mu^2 + 2h^2\left(\tfrac{v^2}{2}-\tfrac{\mu}{r}\right).

Let us count constants: h\mathbf h (3), ε\varepsilon (1) and A\mathbf A (3) give 7, but the two relations above reduce the number of independent integrals to 5. The sixth constant that fixes the solution is the time of periapsis passage τ\tau, which will appear in Kepler’s equation (lesson 1). The vector A\mathbf A was found by Laplace in 1799 and rediscovered several times (Goldstein 1975); in quantum mechanics it is responsible for the “accidental” degeneracy of the hydrogen atom.

4. The orbit equation

Illustration: The orbit equation

We take the dot product of A\mathbf A with r\mathbf r:

A⋅r=(v×h)⋅r−μr=h2−μr.\mathbf A\cdot\mathbf r = (\mathbf v\times\mathbf h)\cdot\mathbf r - \mu r = h^2 - \mu r .

If ν\nu is the angle between A\mathbf A and r\mathbf r (the true anomaly), A⋅r=Arcos⁡ν\mathbf A\cdot\mathbf r = A r\cos\nu and, rearranging,

  r=p1+ecos⁡ν,p≡h2μ,e≡Aμ  \boxed{\;r = \frac{p}{1 + e\cos\nu}, \qquad p \equiv \frac{h^2}{\mu},\quad e \equiv \frac{A}{\mu}\;}

This is the polar equation of a conic with one focus at the origin, with semi-latus rectum pp and eccentricity ee; the vector A\mathbf A points toward periapsis (ν=0\nu = 0, minimum rr). This is Kepler’s first law, generalized to all conics. Dividing A2=μ2+2εh2A^2 = \mu^2 + 2\varepsilon h^2 by μ2\mu^2:

e2=1+2εh2μ2⟹ε<0⇔e<1 (ellipse),ε=0⇔e=1 (parabola),ε>0⇔e>1 (hyperbola).e^2 = 1 + \frac{2\varepsilon h^2}{\mu^2} \quad\Longrightarrow\quad \varepsilon < 0 \Leftrightarrow e < 1 \text{ (ellipse)},\quad \varepsilon = 0 \Leftrightarrow e = 1 \text{ (parabola)},\quad \varepsilon > 0 \Leftrightarrow e > 1 \text{ (hyperbola)}.

For the ellipse, p=a(1−e2)p = a(1-e^2) with aa the semi-major axis, and from the previous relation h2=μa(1−e2)h^2 = \mu a(1-e^2) one obtains

ε=−μ2a,v2=μ(2r−1a)  (vis-viva equation).\varepsilon = -\frac{\mu}{2a}, \qquad v^2 = \mu\left(\frac{2}{r} - \frac{1}{a}\right) \;\text{(vis-viva equation)}.

The extreme values of rr are rp=a(1−e)r_p = a(1-e) (periapsis) and ra=a(1+e)r_a = a(1+e) (apoapsis). Finally, the area of the ellipse, πab\pi ab with b=a1−e2b = a\sqrt{1-e^2}, is swept at the rate h/2h/2, so the period is T=2πab/hT = 2\pi ab/h and, substituting hh:

T=2πa3μ(Kepler’s third law),n≡2πT=μa3 (mean motion).T = 2\pi\sqrt{\frac{a^3}{\mu}} \qquad \text{(Kepler's third law)}, \qquad n \equiv \frac{2\pi}{T} = \sqrt{\frac{\mu}{a^3}} \ \text{(mean motion)}.

5. Binet’s equation

There is an alternative route, without A\mathbf A, which moreover works for any central force. With u=1/ru = 1/r and h=r2ν˙h = r^2\dot\nu:

r˙=drdνν˙=hr2drdν=−h dudν,r¨=−h d2udν2 ν˙=−h2u2 d2udν2.\dot r = \frac{dr}{d\nu}\dot\nu = \frac{h}{r^2}\frac{dr}{d\nu} = -h\,\frac{du}{d\nu}, \qquad \ddot r = -h\,\frac{d^2u}{d\nu^2}\,\dot\nu = -h^2u^2\,\frac{d^2u}{d\nu^2}.

The radial component of r¨=−μr/r3\ddot{\mathbf r} = -\mu\mathbf r/r^3 in polar coordinates is r¨−rν˙2=−μ/r2\ddot r - r\dot\nu^2 = -\mu/r^2, that is, −h2u2u′′−h2u3=−μu2-h^2u^2u'' - h^2u^3 = -\mu u^2. Dividing by −h2u2-h^2u^2:

  d2udν2+u=μh2  \boxed{\;\frac{d^2u}{d\nu^2} + u = \frac{\mu}{h^2}\;}

This is the equation of a harmonic oscillator driven by a constant; its general solution is u=μ/h2+Ccos⁡(ν−ν0)u = \mu/h^2 + C\cos(\nu-\nu_0), which with ν0=0\nu_0 = 0 and C=μe/h2C = \mu e/h^2 reproduces exactly r=p/(1+ecos⁡ν)r = p/(1+e\cos\nu). For an arbitrary central force per unit mass f(r)f(r) the equation is u′′+u=−f(1/u)/(h2u2)u'' + u = -f(1/u)/(h^2u^2); the fact that only forces ∝r\propto r and ∝r−2\propto r^{-2} give closed orbits for all initial conditions is Bertrand’s theorem (1873), and a perturbation ∝r−3\propto r^{-3} produces a precession of the periapsis (Problem 4), which is the mechanism behind the relativistic advance of Mercury’s perihelion.

6. Verification with a real body: Mars at J2000

Illustration: Verification with a real body: Mars at J2000

JPL Horizons (DE441 ephemerides, Park et al. 2021) gives for Mars, with respect to the center of the Sun, in the J2000 ecliptic plane and at the epoch JD 2451545.0 TDB (2000-Jan-01 12:00):

xxyyzz
r\mathbf r (km)2.080481406×1082.080481406\times10^{8}−2.007052628×106-2.007052628\times10^{6}−5.156288959×106-5.156288959\times10^{6}
v\mathbf v (km/s)1.1626724041.16267240426.2960645526.296064550.52229702300.5222970230

with μ=1.3271248287×1011\mu = 1.3271248287\times10^{11} km³/s². We compute (in km, s; the values are rounded to 6 significant figures):

QuantityFormulaValue
rr∥r∥\lVert\mathbf r\rVert2.08122×1082.08122\times10^{8} km
vv∥v∥\lVert\mathbf v\rVert26.326926.3269 km/s
h\mathbf hr×v\mathbf r\times\mathbf v(1.34542×108, −1.14658×108, 5.47318×109)(1.34542\times10^{8},\ -1.14658\times10^{8},\ 5.47318\times10^{9}) km²/s
hh5.47603×1095.47603\times10^{9} km²/s
ε\varepsilonv2/2−μ/rv^2/2 - \mu/r−291.114-291.114 km²/s²
aa−μ/(2ε)-\mu/(2\varepsilon)2.27939×1082.27939\times10^{8} km =1.52368= 1.52368 au
pph2/μh^2/\mu2.25954×1082.25954\times10^{8} km
A/μ\mathbf A/\muv×h/μ−r/r\mathbf v\times\mathbf h/\mu - \mathbf r/r(0.0852778, −0.0377765, −0.00288768)(0.0852778,\ -0.0377765,\ -0.00288768)
eeA/μA/\mu0.09331510.0933151
TT2πa3/μ2\pi\sqrt{a^3/\mu}686.97686.97 d

Horizons publishes, for the same epoch, a=2.279391329739×108a = 2.279391329739\times10^{8} km and e=0.09331510146e = 0.09331510146: our calculation agrees in every figure shown (the test elementos.test.ts checks it to 10−910^{-9} relative). Two further checks: the inclination of the orbital plane with respect to the ecliptic is arccos⁡(hz/h)=1.84988°\arccos(h_z/h) = 1.84988° (Horizons: 1.849876°1.849876°), and p/r=1.08568=1+ecos⁡νp/r = 1.08568 = 1 + e\cos\nu with ν=23.333°\nu = 23.333°, which is exactly the true anomaly given by Horizons. The orbit equation works to ten figures on a real planet: the residual is explained by the perturbations of the other planets, which slowly change these osculating elements (lesson 4).

7. Numerical analysis

Illustration: Numerical analysis

Cancellation in ee. A/μ\mathbf A/\mu is the difference of two vectors of magnitude close to 1 (∥v×h∥/μ≈1+ecos⁡ν\lVert\mathbf v\times\mathbf h\rVert/\mu \approx 1 + e\cos\nu and ∥r/r∥=1\lVert\mathbf r/r\rVert = 1). If the orbit is nearly circular, the subtraction loses digits: the relative error in ee is of order ϵmach/e\epsilon_{\text{mach}}/e, with ϵmach≈2.2×10−16\epsilon_{\text{mach}} \approx 2.2\times10^{-16} in double precision. For Mars (e≈0.09e \approx 0.09) one digit is lost; for an orbit with e∼10−6e \sim 10^{-6} six are lost. The alternative e2=1+2εh2/μ2e^2 = 1 + 2\varepsilon h^2/\mu^2 does not help (it is also a subtraction, 1−(1−e2)1 - (1 - e^2)). The robust approach is to compute directly the small components ecos⁡ν=p/r−1e\cos\nu = p/r - 1 and esin⁡ν=(r⋅v) h/(μr)e\sin\nu = (\mathbf r\cdot\mathbf v)\,h/(\mu r), which are obtained without subtracting large, nearly equal quantities (Problem 6).

Sensitivity of aa to the velocity. From a=μr/(2μ−rv2)a = \mu r/(2\mu - rv^2),

δaa=v2∣ε∣ δvv(for Mars, v2/∣ε∣=2.38).\frac{\delta a}{a} = \frac{v^2}{|\varepsilon|}\,\frac{\delta v}{v} \qquad\text{(for Mars, } v^2/|\varepsilon| = 2.38\text{)} .

The factor v2/∣ε∣=2(2a/r−1)v^2/|\varepsilon| = 2(2a/r - 1) grows without bound as the orbit approaches the parabola (ε→0\varepsilon\to0): the orbit determination of a nearly parabolic comet from a few observations is intrinsically ill-conditioned in aa and in TT (δT/T=32 δa/a\delta T/T = \tfrac32\,\delta a/a), even though pp and ee are obtained well.

Diagnostics for integrators. Since h\mathbf h, ε\varepsilon and A\mathbf A are exactly constant, their drift in a numerical integration measures the error of the method. In RK4, the direction of A\mathbf A rotates slowly (numerical precession of the periapsis) and ε\varepsilon drifts secularly ∝t h4\propto t\,h^4; a symplectic integrator (leapfrog) keeps ε\varepsilon bounded but also makes A\mathbf A precess (see metodos-numericos/01). The simulator displays the energy at every instant.

8. Simulator

Period T = 1.000 years · t = 0.000 years · r = 0.000 au · v = 0.00 km/s

Questions for analysis:

  1. With e=0.9e = 0.9, compare the speed at periapsis and at apoapsis with the vis-viva equation: it must satisfy vp/va=(1+e)/(1−e)=19v_p/v_a = (1+e)/(1-e) = 19.
  2. Keep aa fixed and increase ee: the period does not change (third law) even though the trajectory is very different.
  3. Notice that the velocity vector never points toward the focus except at the apsides, where it is perpendicular to r\mathbf r.

Problems

  1. (Proof) Show that v×h=μ [(1+ecos⁡ν) r^−esin⁡ν ν^]\mathbf v\times\mathbf h = \mu\,\big[(1+e\cos\nu)\,\hat{\mathbf r} - e\sin\nu\,\hat{\boldsymbol\nu}\big] in the polar basis (r^,ν^)(\hat{\mathbf r},\hat{\boldsymbol\nu}) of the orbital plane, and deduce again that A=μe p^\mathbf A = \mu e\,\hat{\mathbf p}, where p^\hat{\mathbf p} is the direction of periapsis.
Show solution

In the plane, v=r˙ r^+(h/r) ν^\mathbf v = \dot r\,\hat{\mathbf r} + (h/r)\,\hat{\boldsymbol\nu} and h=h z^\mathbf h = h\,\hat{\mathbf z} with r^×z^=−ν^\hat{\mathbf r}\times\hat{\mathbf z} = -\hat{\boldsymbol\nu}, ν^×z^=r^\hat{\boldsymbol\nu}\times\hat{\mathbf z} = \hat{\mathbf r}. Hence v×h=−hr˙ ν^+(h2/r) r^\mathbf v\times\mathbf h = -h\dot r\,\hat{\boldsymbol\nu} + (h^2/r)\,\hat{\mathbf r}. Differentiating r=p/(1+ecos⁡ν)r = p/(1+e\cos\nu): r˙=(pesin⁡ν/(1+ecos⁡ν)2)ν˙=(μ/h) esin⁡ν\dot r = (p e\sin\nu/(1+e\cos\nu)^2)\dot\nu = (\mu/h)\,e\sin\nu, and h2/r=μ(1+ecos⁡ν)h^2/r = \mu(1+e\cos\nu). Thus v×h=μ[(1+ecos⁡ν)r^−esin⁡ν ν^]\mathbf v\times\mathbf h = \mu[(1+e\cos\nu)\hat{\mathbf r} - e\sin\nu\,\hat{\boldsymbol\nu}] and A=v×h−μr^=μe(cos⁡ν r^−sin⁡ν ν^)=μe p^\mathbf A = \mathbf v\times\mathbf h - \mu\hat{\mathbf r} = \mu e(\cos\nu\,\hat{\mathbf r} - \sin\nu\,\hat{\boldsymbol\nu}) = \mu e\,\hat{\mathbf p}, since from r^=cos⁡ν p^+sin⁡ν q^\hat{\mathbf r} = \cos\nu\,\hat{\mathbf p} + \sin\nu\,\hat{\mathbf q} and ν^=−sin⁡ν p^+cos⁡ν q^\hat{\boldsymbol\nu} = -\sin\nu\,\hat{\mathbf p} + \cos\nu\,\hat{\mathbf q} it follows that cos⁡ν r^−sin⁡ν ν^=p^\cos\nu\,\hat{\mathbf r} - \sin\nu\,\hat{\boldsymbol\nu} = \hat{\mathbf p}, the fixed unit vector toward ν=0\nu = 0.

  1. (Proof) Derive the vis-viva equation v2=μ(2/r−1/a)v^2 = \mu(2/r - 1/a) for the ellipse and write its hyperbolic version. What is vv as r→∞r\to\infty on the hyperbola?
Show solution

ε=v2/2−μ/r\varepsilon = v^2/2 - \mu/r and ε=−μ/(2a)\varepsilon = -\mu/(2a) give v2=μ(2/r−1/a)v^2 = \mu(2/r - 1/a). On the hyperbola e>1e > 1, p=a(1−e2)p = a(1-e^2) requires a<0a < 0; with ah=−a>0a_h = -a > 0: v2=μ(2/r+1/ah)v^2 = \mu(2/r + 1/a_h) and v∞=μ/ah=2εv_\infty = \sqrt{\mu/a_h} = \sqrt{2\varepsilon}, the hyperbolic excess velocity, which is central to lesson 6.

  1. (Hodograph) Show that the tip of the velocity vector traces a circle of radius μ/h\mu/h centered at (0, μe/h)(0,\ \mu e/h) in the perifocal frame (xx axis toward periapsis).
Show solution

From v×h=A+μr^\mathbf v\times\mathbf h = \mathbf A + \mu\hat{\mathbf r} and h⊥v\mathbf h\perp\mathbf v: taking the cross product with h\mathbf h on the left, h×(v×h)=vh2\mathbf h\times(\mathbf v\times\mathbf h) = \mathbf v h^2, so v=h×A/h2+(μ/h2) h×r^\mathbf v = \mathbf h\times\mathbf A/h^2 + (\mu/h^2)\,\mathbf h\times\hat{\mathbf r}. The first term is constant, of magnitude μe/h\mu e/h and perpendicular to A\mathbf A (it points along perifocal +y+y); the second has constant magnitude μ/h\mu/h and rotates with r^\hat{\mathbf r}. In components, v=(μ/h)(−sin⁡ν, e+cos⁡ν)\mathbf v = (\mu/h)(-\sin\nu,\ e + \cos\nu), which confirms the center (0,μe/h)(0,\mu e/h) and radius μ/h\mu/h.

  1. (Binet and precession) For the force per unit mass f(r)=−μ/r2−δ/r3f(r) = -\mu/r^2 - \delta/r^3 with δ≪h2\delta \ll h^2, solve Binet’s equation and show that the periapsis advances by Δϖ≈πδ/h2\Delta\varpi \approx \pi\delta/h^2 per revolution.
Show solution

u′′+u=μ/h2+(δ/h2)u⇒u′′+κ2u=μ/h2u'' + u = \mu/h^2 + (\delta/h^2)u \Rightarrow u'' + \kappa^2 u = \mu/h^2 with κ2=1−δ/h2\kappa^2 = 1 - \delta/h^2. Solution: u=μ/(h2κ2)+Ccos⁡(κν)u = \mu/(h^2\kappa^2) + C\cos(\kappa\nu). Periapsis recurs when κν=2π\kappa\nu = 2\pi, that is, every Δν=2π/κ≈2π(1+δ/(2h2))\Delta\nu = 2\pi/\kappa \approx 2\pi(1 + \delta/(2h^2)): an advance of Δϖ=2π/κ−2π≈πδ/h2\Delta\varpi = 2\pi/\kappa - 2\pi \approx \pi\delta/h^2. In general relativity the effective term is δ=3μh2/c2\delta = 3\mu h^2/c^2 (Schwarzschild lesson), which gives 6πμ/(c2p)6\pi\mu/(c^2 p) per orbit: 42.98′′42.98'' per century for Mercury.

  1. (Hyperbola) A body arrives from infinity with excess velocity v∞v_\infty and passes at minimum distance rpr_p from the center. Show that e=1+rpv∞2/μe = 1 + r_p v_\infty^2/\mu and that the asymptotes make an angle with the axis such that the total deflection angle is δ=2arcsin⁡(1/e)\delta = 2\arcsin(1/e).
Show solution

At periapsis vp2=v∞2+2μ/rpv_p^2 = v_\infty^2 + 2\mu/r_p (vis-viva with ε=v∞2/2\varepsilon = v_\infty^2/2) and h=rpvph = r_pv_p. With p=h2/μ=rp(1+e)p = h^2/\mu = r_p(1+e): rp2(v∞2+2μ/rp)/μ=rp(1+e)⇒e=1+rpv∞2/μr_p^2(v_\infty^2 + 2\mu/r_p)/\mu = r_p(1+e) \Rightarrow e = 1 + r_pv_\infty^2/\mu. The asymptotes correspond to r→∞r\to\infty, i.e. 1+ecos⁡ν∞=01 + e\cos\nu_\infty = 0, cos⁡ν∞=−1/e\cos\nu_\infty = -1/e. The angle between the two asymptotes and the direction of arrival is δ=2ν∞−π\delta = 2\nu_\infty - \pi, and sin⁡(δ/2)=−cos⁡ν∞=1/e\sin(\delta/2) = -\cos\nu_\infty = 1/e.

  1. (Computational) Horizons gives for Earth (Sun center, ecliptic J2000, JD 2451545.0 TDB): r=(−2.649903368×107, 1.446972968×108, −6.111494260×102)\mathbf r = (-2.649903368\times10^{7},\ 1.446972968\times10^{8},\ -6.111494260\times10^{2}) km, v=(−29.79426007, −5.469294940, 1.817836785×10−4)\mathbf v = (-29.79426007,\ -5.469294940,\ 1.817836785\times10^{-4}) km/s, μ=1.3271283864×1011\mu = 1.3271283864\times10^{11} km³/s². Write a program that computes hh, ε\varepsilon, aa, ee, the inclination i=arccos⁡(hz/h)i = \arccos(h_z/h) and ν\nu (use the robust formulas of section 7) and compare it with Horizons: a=1.496650146×108a = 1.496650146\times10^{8} km, e=0.01711862907e = 0.01711862907, i=4.181×10−4i = 4.181\times10^{-4} degrees, ν=358.5689°\nu = 358.5689°. Why is aa not exactly 1 au, nor ii exactly 0?
Show solution
import numpy as np
mu = 1.3271283864171489e11
r = np.array([-2.649903367743050e7, 1.446972967925493e8, -6.111494259536266e2])
v = np.array([-29.79426007043741, -5.469294939770602, 1.817836785027449e-4])
rn, vn = np.linalg.norm(r), np.linalg.norm(v)
h = np.cross(r, v); hn = np.linalg.norm(h)
eps = vn**2/2 - mu/rn;  a = -mu/(2*eps);  p = hn**2/mu
ecos = p/rn - 1;  esin = np.dot(r, v)*hn/(mu*rn)       # no cancellation
e = np.hypot(ecos, esin);  nu = np.degrees(np.arctan2(esin, ecos)) % 360
i = np.degrees(np.arccos(h[2]/hn))
print(a, e, i, nu)   # 1.4966501455e8  0.017118629  4.181e-4  358.5689

One obtains a=1.49665×108a = 1.49665\times10^{8} km, e=0.0171186e = 0.0171186, i=4.18×10−4i = 4.18\times10^{-4}°, ν=358.569°\nu = 358.569°. The vector is that of the center of the Earth, not of the Earth–Moon barycenter: the Earth oscillates around that barycenter (about 4 670 km from its center) with the lunar period, which displaces the osculating orbit with respect to the mean one (1 au, in the ecliptic). These are perturbations, the subject of lesson 4.

  1. (Virial) Show that in an elliptical orbit the time averages satisfy ⟨1/r⟩t=1/a\langle 1/r\rangle_t = 1/a and ⟨v2⟩t=μ/a\langle v^2\rangle_t = \mu/a, that is, 2⟨T⟩=−⟨V⟩2\langle T\rangle = -\langle V\rangle.
Show solution

With the eccentric anomaly EE (lesson 1), r=a(1−ecos⁡E)r = a(1-e\cos E) and n dt=(1−ecos⁡E) dE=(r/a) dEn\,dt = (1 - e\cos E)\,dE = (r/a)\,dE. Then ⟨1/r⟩=1T∫0Tdtr=12π∫02πdEa=1a\langle 1/r\rangle = \frac1T\int_0^T\frac{dt}{r} = \frac{1}{2\pi}\int_0^{2\pi}\frac{dE}{a} = \frac1a. From vis-viva, ⟨v2⟩=2μ⟨1/r⟩−μ/a=μ/a\langle v^2\rangle = 2\mu\langle1/r\rangle - \mu/a = \mu/a. With T=v2/2T = v^2/2 and V=−μ/rV = -\mu/r per unit mass: 2⟨T⟩=μ/a=−⟨V⟩2\langle T\rangle = \mu/a = -\langle V\rangle.

Self-assessment

✦ Self-assessment

  1. 1. In the equation r̈ = −μ r/r³ of the relative problem, the parameter μ equals…
  2. 2. The conservation of h = r × v directly implies that…
  3. 3. The Laplace–Runge–Lenz vector A = v × h − μ r/r…
  4. 4. An orbit with specific energy ε = 0 is…
  5. 5. Binet's equation u″ + u = μ/h² (with u = 1/r) is the equation of…
  6. 6. When computing e = |v × h/μ − r/r| for a nearly circular orbit, the relative error in e is of order…
Answer all the questions to check.

Further reading

  • Murray & Dermott (1999), Solar System Dynamics, ch. 2: the two-body problem in the notation used here (§2.3–2.5).
  • Danby (1988), Fundamentals of Celestial Mechanics, ch. 6: classical treatment with the three anomalies and the hodograph.
  • Curtis (2020), Orbital Mechanics for Engineering Students, ch. 2: engineering approach, with the numerical examples 2.x in km and km/s.
  • Vallado (2013), Fundamentals of Astrodynamics and Applications, ch. 1 and §2.2: constants, integrals and degenerate cases.
  • Goldstein, Poole & Safko (2002), Classical Mechanics, §3.7–3.9: Bertrand’s theorem and the Laplace–Runge–Lenz vector; Goldstein (1975), DOI 10.1119/1.9745, on the history of the vector.
  • Park et al. (2021), DE440/DE441, DOI 10.3847/1538-3881/abd414: the ephemerides from which the Horizons vectors are taken.
🍎 Teacher guide
Time
2 classes of 90 min
Learning outcome
By the end, the student reduces the two-body problem to a one-body problem, proves the conservation of h, ε and A, derives the orbit equation by two routes (the vector A and Binet's equation) and verifies the results on a real state vector, quantifying the propagation of errors.
Evidence of learning
Submission of computational problem 6 (code + comparison with Horizons + explanation of the discrepancies) and of one of proofs 1–5 written up rigorously.

Materials

  • Python 3 with NumPy (or a spreadsheet with cross product)
  • Access to JPL Horizons (ssd.jpl.nasa.gov/horizons) to download vectors of other bodies
  • Simulator "Keplerian orbit"

Suggested sequence

Class 1. Start from the two Newtonian equations and arrive at r¨=−μr/r3\ddot{\mathbf r} = -\mu\mathbf r/r^3 on the board (15 min). Conservation of h\mathbf h and ε\varepsilon with their geometric consequences (20 min). Complete proof of A˙=0\dot{\mathbf A} = 0 and of the orbit equation; discuss the count of integrals (40 min). Closing: classification by the sign of ε\varepsilon and vis-viva (15 min).

Class 2. Binet’s equation and Bertrand’s theorem as motivation for precession (25 min). Workshop with the Mars vector: each pair computes one row of the table in section 6 and the results are compared with Horizons (35 min). Cancellation and sensitivity analysis with numerical examples in the simulator (20 min). Assign problem 6 and one proof.

Common mistakes

  • Using μ = GM of the central body while forgetting the mass of the secondary: for Mars the effect is 3×10⁻⁷ relative, but in a binary star system it is of order 1. Show the "Keplerian GM" of Horizons.
  • Confusing the angle ν (true anomaly, measured from A) with the polar angle measured from an arbitrary axis. Insist that A defines the origin of ν.
  • Believing that the conservation of h is enough to obtain the ellipse. Make clear that h only gives the plane and the law of areas; the shape comes from A (or from Binet, which requires the 1/r² law).
  • Treating a and T as well determined in nearly parabolic orbits: ask for the factor v²/|ε| for a comet with e = 0.9999.
Key terms in this lesson (12)

Glossary terms that appear in the text. Each one links to its full entry.

  • Two-body problem Working out how two bodies move when they attract only each other, like the Sun and a planet. It has an exact solution: Kepler's ellipses. With three bodies there is no longer a closed formula.
  • Orbital velocity The speed at which a body travels along its orbit. The Space Station goes around Earth at 7.7 km/s; Earth goes around the Sun at almost 30 km/s.
  • Orbit The path one body follows around another because of gravity: the Moon around Earth, Earth around the Sun. Almost all are ellipses, slightly flattened ovals.
  • Horizon The line where the sky seems to touch the land or the sea. A celestial object "rises" when it crosses the horizon going up and "sets" when it crosses it going down.
  • Kepler's laws Three rules about how the planets move: (1) they follow ellipses with the Sun at one focus, (2) they move faster when they are closer to the Sun and (3) distant planets take much longer to go around.
  • Perihelion The point of the orbit closest to the Sun; there the planet moves fastest. Earth passes through it in early January. For the Moon around Earth it is called perigee.
  • Semi-major axis Half the length of the ellipse: the planet's "average" distance from the Sun. It is the number that rules Kepler's third law: the larger it is, the slower the planet.
  • Kepler's equation The equation that says where on its ellipse a planet is on a given date. It cannot be solved with algebra: it has to be solved by successive approximations, as astronomy programs do.
  • Perturbation Any small "nudge" that pulls an orbit away from a perfect ellipse: the attraction of other planets, Earth's flattening, air drag. That is how Neptune was discovered, through the perturbations of Uranus.
  • Precession Earth's axis wobbles very slowly, like a spinning top, and takes about 26 000 years to complete one turn. That is why the star marking north changes over the millennia.
  • Eccentricity A number between 0 and 1 that says how flattened an orbit is: 0 is a perfect circle, and the closer to 1, the more elongated. Earth's is 0.017, almost a circle; Halley's comet's, 0.97.
  • Orbital elements The six numbers that fully describe an orbit: its size, its shape, how it is tilted and oriented, and where the body is at a given moment.

See the whole glossary →

References

  • Murray, C. D. & Dermott, S. F. (1999). Solar System Dynamics. Cambridge University Press, ch. 2 (§2.1–2.5).
  • Danby, J. M. A. (1988). Fundamentals of Celestial Mechanics, 2nd ed. Willmann-Bell, ch. 6.
  • Curtis, H. D. (2020). Orbital Mechanics for Engineering Students, 4th ed. Butterworth-Heinemann, ch. 2.
  • Vallado, D. A. (2013). Fundamentals of Astrodynamics and Applications, 4th ed. Microcosm Press, ch. 1 and §2.2.
  • Goldstein, H., Poole, C. & Safko, J. (2002). Classical Mechanics, 3rd ed. Addison-Wesley, §3.7–3.9 (Laplace–Runge–Lenz vector).
  • Goldstein, H. (1975). Prehistory of the 'Runge–Lenz' vector. American Journal of Physics 43, 737–738. DOI 10.1119/1.9745
  • Park, R. S. et al. (2021). The JPL Planetary and Lunar Ephemerides DE440 and DE441. The Astronomical Journal 161, 105. DOI 10.3847/1538-3881/abd414
  • JPL Horizons System (ssd.jpl.nasa.gov/horizons), vectors of Mars and Earth, Sun center, ecliptic J2000, epoch JD 2451545.0 TDB; queried 2026-10-29.

Simulators for this lesson: Keplerian orbit