MathLabs

Mathematical physics

Celestial mechanics: the two-body and three-body problems

How Newton's law of gravitation reduces the motion of two orbiting bodies to a single conic-section orbit, why planets sweep equal areas in equal times, and why adding a third body destroys the tidy picture and opens the door to chaos.

IntuitionTwo bodies falling around each other

Drop a ball and it falls straight down. Throw it sideways hard enough and it still falls — but the ground curves away beneath it just as fast, so it never lands. That is exactly what the Moon does around Earth, and what Earth does around the Sun: a continuous fall under gravity, sideways motion fast enough to keep missing the central body. Celestial mechanics is the mathematics of precisely how bodies fall around each other, from a single planet around a star to a spacecraft threading its way past several worlds using nothing but gravity.

Interactive unit circle with a slider for the angle theta, used as an intuitive model for the polar angle (true anomaly) that locates a body on its orbit.
Drag θ\theta: the same polar angle that marks a point on the circle also marks a planet's position on its orbit. On a circle rr stays fixed as θ\theta turns; on a real orbit r(θ)=p1+ecos⁡θ,p=h2GMr(\theta) = \dfrac{p}{1+e\cos\theta},\qquad p = \dfrac{h^{2}}{GM} makes rr itself swing between the closest point (θ=0\theta=0) and the farthest point (θ=180∘\theta=180^\circ).

SchoolWhat Kepler observed

Working from decades of Tycho Brahe's naked-eye planetary data and no calculus at all, Johannes Kepler announced three purely empirical rules around 1609–1619: (1) planets move on ellipses with the Sun at one focus, not at the center; (2) a line from the Sun to a planet sweeps out equal areas in equal times, so planets move fastest near the Sun and slowest far from it; (3) the square of a planet's orbital period is proportional to the cube of its orbit's semi-major axis. Kepler had no explanation for why — that had to wait nearly seventy years for Newton's law of gravitation and calculus. The rest of this article proves all three laws, plus more, from that single inverse-square law.

UndergraduateReducing two bodies to one

Definition: Reduced mass and relative position

For two point masses m1m_1, m2m_2 attracting each other only through gravity, let r=r1−r2\mathbf r = \mathbf r_1 - \mathbf r_2 be the vector from body 2 to body 1, let M=m1+m2M = m_1 + m_2 be the total mass, and let μ=m1m2m1+m2\mu = \dfrac{m_1 m_2}{m_1+m_2} be the reduced mass. In the center-of-mass frame the true two-body problem is exactly equivalent to a single fictitious particle of mass μ\mu moving in a fixed inverse-square field sourced by mass MM sitting at the origin — the relative vector r\mathbf r traces out this fictitious particle's orbit, and the real positions r1,r2\mathbf r_1,\mathbf r_2 are recovered from r\mathbf r by simple mass-weighted scaling.

r¨=−GMr3r\ddot{\mathbf r} = -\dfrac{GM}{r^{3}}\mathbf r

Here GG is Newton's gravitational constant, M=m1+m2M=m_1+m_2, r\mathbf r is the relative separation vector and r=∣r∣r=|\mathbf r| is the distance between the bodies. Notice the reduced mass μ\mu has already canceled out of this equation entirely: every free-falling body, light or heavy, follows the same relative trajectory for given initial conditions — a direct descendant of Galileo's observation that all bodies fall at the same rate.

h=r×r˙\mathbf h = \mathbf r \times \dot{\mathbf r}

The vector h=r×r˙\mathbf h = \mathbf r \times \dot{\mathbf r} is the specific angular momentum (angular momentum per unit reduced mass). Because gravity is a central force — r¨\ddot{\mathbf r} always points along r\mathbf r — it exerts zero torque about the origin, making h\mathbf h a natural candidate for a conserved quantity. Theorem 1 below proves it rigorously, and that single fact turns out to force the orbit to lie in a fixed plane and to sweep out area at a constant rate.

AdvancedOrbit shape: Binet's equation and the conic sections

To find the shape of the orbit, work in the orbital plane with polar coordinates (r,θ)(r,\theta) and substitute u=1/ru=1/r. Using θ˙=hu2\dot\theta=hu^2 (from h=r2θ˙h = r^{2}\dot\theta), the chain rule gives r˙=drdθθ˙=d(1/u)dθ hu2=−hdudθ\dot r = \dfrac{dr}{d\theta}\dot\theta = \dfrac{d(1/u)}{d\theta}\,hu^{2} = -h\dfrac{du}{d\theta}, and differentiating again, r¨=−hd2udθ2θ˙=−h2u2d2udθ2\ddot r = -h\dfrac{d^{2}u}{d\theta^{2}}\dot\theta = -h^{2}u^{2}\dfrac{d^{2}u}{d\theta^{2}}.

d2udθ2+u=GMh2,u=1r\dfrac{d^{2}u}{d\theta^{2}} + u = \dfrac{GM}{h^{2}},\qquad u = \dfrac1r

Substituting r¨\ddot r and θ˙=hu2\dot\theta=hu^2 into the radial equation of motion r¨−rθ˙2=−GMu2\ddot r - r\dot\theta^{2} = -GMu^{2} and dividing by −h2u2-h^{2}u^{2} gives exactly Binet's orbit equation above — a linear, constant-coefficient ODE for u(θ)u(\theta). Its general solution is u(θ)=GMh2+Ccos⁡(θ−θ0)u(\theta) = \dfrac{GM}{h^{2}} + C\cos(\theta-\theta_0); choosing θ0=0\theta_0=0 (periapsis direction) and writing the integration constant as C=GMh2eC=\dfrac{GM}{h^{2}}e gives r(θ)=p1+ecos⁡θ,p=h2GMr(\theta) = \dfrac{p}{1+e\cos\theta},\qquad p = \dfrac{h^{2}}{GM} — the polar equation of a conic section with the attracting mass at a focus, not the center. Depending on ee: 0≤e<10\le e<1 gives an ellipse (a bound orbit, e=0e=0 a circle), e=1e=1 a parabola, and e>1e>1 a hyperbola.

Conic sections by eccentricity
EccentricityOrbit typeSpecific energyExample
0≤e<10 \le e < 1Ellipse (circle if e=0e=0)Negative (bound)Earth around the Sun, e≈0.017e\approx0.017
e=1e = 1ParabolaExactly zeroA marginally-bound long-period comet
e>1e > 1HyperbolaPositive (unbound)Interstellar object ʻOumuamua

The orbit equation reveals a shape, but energy and angular momentum alone do not obviously fix the direction of the periapsis. Remarkably, Newtonian gravity hides one more conserved vector: the Laplace–Runge–Lenz vector A=r˙×h−GMr^\mathbf A = \dot{\mathbf r}\times\mathbf h - GM\hat{\mathbf r}, where r^=r/r\hat{\mathbf r}=\mathbf r/r. Theorem 3 below proves A\mathbf A is constant and shows ∣A∣=GMe|\mathbf A| = GMe, pointing from the focus straight at periapsis — a "hidden" symmetry special to the inverse-square force (shared only with the harmonic oscillator among central forces), reflecting an underlying four-dimensional rotational symmetry of the Kepler problem.

UndergraduateProving the three classical results

Under any central force (a force always directed along r\mathbf r), the radius vector from the force center to the moving body sweeps out area at the constant rate dAdt=12r2θ˙=h2\dfrac{dA}{dt} = \dfrac12 r^{2}\dot\theta = \dfrac{h}{2}.

Why is it true?

This is Kepler's second law, and the proof below shows it has nothing specifically to do with gravity's inverse-square form — it follows purely from the force being central (parallel to the position vector), so it applies equally to any central force, gravitational or not.

Proof

Define h=r×r˙\mathbf h = \mathbf r\times\dot{\mathbf r}. Differentiating, h˙=r˙×r˙+r×r¨=0+r×r¨\dot{\mathbf h} = \dot{\mathbf r}\times\dot{\mathbf r} + \mathbf r\times\ddot{\mathbf r} = \mathbf 0 + \mathbf r\times\ddot{\mathbf r} (the first term vanishes since any vector crossed with itself is zero). For a central force, r¨\ddot{\mathbf r} is parallel to r\mathbf r — write r¨=f(r)r^\ddot{\mathbf r} = f(r)\hat{\mathbf r} for some scalar function ff — so r×r¨=f(r) r×r^=0\mathbf r\times\ddot{\mathbf r} = f(r)\,\mathbf r\times\hat{\mathbf r} = \mathbf 0 as well. Hence h˙=r×r¨=−GMr3(r×r)=0\dot{\mathbf h} = \mathbf r\times\ddot{\mathbf r} = -\dfrac{GM}{r^{3}}(\mathbf r\times\mathbf r) = \mathbf 0: h\mathbf h is a fixed vector, constant in both magnitude and direction.

Because h\mathbf h has fixed direction and h=r×r˙\mathbf h = \mathbf r\times\dot{\mathbf r} is always perpendicular to r\mathbf r, the position vector r\mathbf r is confined forever to the single fixed plane perpendicular to h\mathbf h — the motion is planar. Set up polar coordinates (r,θ)(r,\theta) in that plane. Writing r=rr^\mathbf r = r\hat{\mathbf r} and r˙=r˙r^+rθ˙θ^\dot{\mathbf r} = \dot r\hat{\mathbf r} + r\dot\theta\hat{\boldsymbol\theta}, the cross product gives h=rr^×(r˙r^+rθ˙θ^)=r2θ˙ z^\mathbf h = r\hat{\mathbf r}\times(\dot r\hat{\mathbf r}+r\dot\theta\hat{\boldsymbol\theta}) = r^{2}\dot\theta\,\hat{\mathbf z}, so the scalar h=r2θ˙h=r^{2}\dot\theta is itself constant.

In time dtdt, the radius vector sweeps a thin, nearly triangular sector of area dA=12r⋅(r dθ)=12r2 dθdA = \tfrac12 r\cdot(r\,d\theta) = \tfrac12 r^{2}\,d\theta (base r dθr\,d\theta, height rr, factor 12\tfrac12 for a triangle). Dividing by dtdt gives exactly dAdt=12r2θ˙=h2\dfrac{dA}{dt} = \dfrac12 r^{2}\dot\theta = \dfrac{h}{2}. Since hh is constant, the areal sweep rate dA/dtdA/dt is constant for all time — equal areas are swept in equal times, proving Kepler's second law. ■\blacksquare

For a bound orbit (ellipse) of semi-major axis aa around a total mass MM, the orbital period TT satisfies T2=4π2GMa3T^{2} = \dfrac{4\pi^{2}}{GM}a^{3}.

Why is it true?

This links the size of an orbit directly to how long it takes to complete, with no dependence on eccentricity — a fact used every time astronomers weigh a star or planet by timing a smaller body's orbit around it.

Proof

By Theorem 1, the areal sweep rate dA/dt=h/2dA/dt=h/2 is constant, so integrating over one full period TT gives the total enclosed area A=h2TA = \tfrac{h}{2}T. For an ellipse with semi-major axis aa and semi-minor axis bb, geometry gives A=πabA=\pi ab. Equating the two: A=πab=h2TA = \pi a b = \dfrac{h}{2}T.

Next, tie hh to the shape via Binet's equation: the semi-latus rectum of the orbit is p=h2/GMp=h^{2}/GM, and for an ellipse the standard relations b=a1−e2b=a\sqrt{1-e^{2}} and p=a(1−e2)=b2/ap=a(1-e^{2})=b^{2}/a hold. Combining p=h2/GMp=h^{2}/GM with p=b2/ap=b^{2}/a gives h2=GMb2ah^{2}=\dfrac{GMb^{2}}{a}, so h=GMb2a=bGMah = \sqrt{\dfrac{GMb^{2}}{a}} = b\sqrt{\dfrac{GM}{a}}.

Substitute this expression for hh into πab=h2T\pi ab=\tfrac{h}{2}T and solve for TT: T=2πabh=2πabbGM/a=2πaaGM=2πa3GMT=\dfrac{2\pi ab}{h}=\dfrac{2\pi ab}{b\sqrt{GM/a}}=2\pi a\sqrt{\dfrac{a}{GM}}=2\pi\sqrt{\dfrac{a^{3}}{GM}}. Squaring both sides gives T2=4π2GMa3T^{2} = \dfrac{4\pi^{2}}{GM}a^{3}, which is Kepler's third law — and it holds for every ellipse regardless of ee, since ee canceled out completely. ■\blacksquare

The vector A=r˙×h−GMr^\mathbf A = \dot{\mathbf r}\times\mathbf h - GM\hat{\mathbf r} is constant in time for motion under an inverse-square force r¨=−GMr3r\ddot{\mathbf r} = -\dfrac{GM}{r^{3}}\mathbf r, has magnitude ∣A∣=GMe|\mathbf A| = GMe, and points from the focus toward periapsis.

Why is it true?

Energy and angular momentum alone fix the size and shape of a Kepler orbit but not its orientation within the plane; the Laplace–Runge–Lenz vector is the extra conserved quantity that pins down where periapsis sits, and its very existence is special to the 1/r21/r^2 force — most central forces do not have such a vector, which is exactly why most central-force orbits (as in the restricted three-body problem below) do not stay on a fixed closed curve.

Proof

Differentiate: dAdt=r¨×h+r˙×h˙−GMdr^dt\dfrac{d\mathbf A}{dt} = \ddot{\mathbf r}\times\mathbf h + \dot{\mathbf r}\times\dot{\mathbf h} - GM\dfrac{d\hat{\mathbf r}}{dt}. Since h\mathbf h is constant (Theorem 1), the middle term vanishes. Using r¨=−GMr2r^\ddot{\mathbf r}=-\dfrac{GM}{r^{2}}\hat{\mathbf r} and h=r×r˙\mathbf h=\mathbf r\times\dot{\mathbf r}, the vector triple product identity r^×(r×r˙)=r(r^⋅r˙)−r˙(r^⋅r)\hat{\mathbf r}\times(\mathbf r\times\dot{\mathbf r}) = \mathbf r(\hat{\mathbf r}\cdot\dot{\mathbf r}) - \dot{\mathbf r}(\hat{\mathbf r}\cdot\mathbf r) gives r¨×h=−GMr2[rr˙ r^−rr˙]=GM(r˙r−r˙rr^)\ddot{\mathbf r}\times\mathbf h = -\dfrac{GM}{r^{2}}\big[r\dot r\,\hat{\mathbf r} - r\dot{\mathbf r}\big] = GM\left(\dfrac{\dot{\mathbf r}}{r} - \dfrac{\dot r}{r}\hat{\mathbf r}\right), where r˙=r^⋅r˙\dot r=\hat{\mathbf r}\cdot\dot{\mathbf r} is the scalar rate of change of the distance rr (used r^⋅r=r\hat{\mathbf r}\cdot\mathbf r=r).

On the other hand, differentiating r^=r/r\hat{\mathbf r}=\mathbf r/r directly gives dr^dt=r˙r−r r˙r2=r˙r−r˙rr^\dfrac{d\hat{\mathbf r}}{dt} = \dfrac{\dot{\mathbf r}}{r} - \dfrac{\mathbf r\,\dot r}{r^{2}} = \dfrac{\dot{\mathbf r}}{r} - \dfrac{\dot r}{r}\hat{\mathbf r} — exactly the same bracketed expression found for r¨×h/GM\ddot{\mathbf r}\times\mathbf h/GM above. So r¨×h=GMdr^dt\ddot{\mathbf r}\times\mathbf h = GM\dfrac{d\hat{\mathbf r}}{dt} identically.

Therefore dAdt=GMdr^dt−GMdr^dt=0\dfrac{d\mathbf A}{dt} = GM\dfrac{d\hat{\mathbf r}}{dt} - GM\dfrac{d\hat{\mathbf r}}{dt} = \mathbf 0, proving A\mathbf A is constant. Evaluating A\mathbf A at periapsis, where r˙\dot{\mathbf r} is purely tangential (perpendicular to r^\hat{\mathbf r}) with speed vp=h/rpv_p=h/r_p, gives r˙×h\dot{\mathbf r}\times\mathbf h pointing along −r^-\hat{\mathbf r} with magnitude h2/rph^{2}/r_p, so A=(h2rp−GM)r^\mathbf A = \left(\dfrac{h^{2}}{r_p}-GM\right)\hat{\mathbf r}; using rp=p/(1+e)=h2GM(1+e)r_p=p/(1+e)=\dfrac{h^{2}}{GM(1+e)} from the orbit equation gives A=GMe r^p\mathbf A = GMe\,\hat{\mathbf r}_p, confirming ∣A∣=GMe|\mathbf A|=GMe pointing exactly toward periapsis. ■\blacksquare

AdvancedBeyond two bodies: the restricted three-body problem

Add a third body of negligible mass (a spacecraft, an asteroid) moving under the gravity of two large masses M1,M2M_1,M_2 that orbit each other in a circle. In a reference frame rotating with the two large masses at their orbital angular speed ω\omega, the small body's motion is governed by gravity plus the fictitious centrifugal and Coriolis forces of the rotating frame, combined into the effective potential below.

Ω(x,y)=−GM1r1−GM2r2−12ω2(x2+y2)\Omega(x,y) = -\dfrac{GM_1}{r_1} - \dfrac{GM_2}{r_2} - \dfrac12\omega^{2}(x^{2}+y^{2})

Definition: The five Lagrange points

The five points where the effective force (gradient of Ω\Omega, including the Coriolis term for a body at rest in the rotating frame) vanishes are the Lagrange points. L1L_1 sits between the two masses; L2L_2 sits just beyond the smaller mass, on the far side from M1M_1; L3L_3 sits on the opposite side of M1M_1 from M2M_2. For m2≪M1m_2\ll M_1 (e.g. Earth around the Sun), L1L_1 and L2L_2 are both at approximately r≈a(m23M1)1/3r \approx a\left(\dfrac{m_2}{3M_1}\right)^{1/3} from the smaller mass, where aa is the orbital separation. L4L_4 and L5L_5 complete an equilateral triangle with M1M_1 and M2M_2, leading and trailing the smaller mass by 60∘60^{\circ}.

L1L_1, L2L_2, L3L_3 are always dynamically unstable (saddle points of Ω\Omega) — a body placed there drifts away without station-keeping. L4L_4 and L5L_5, though saddle points of Ω\Omega itself, become genuinely stable once the Coriolis force is included, provided the mass ratio satisfies Routh's criterion μ=m2m1+m2<0.03852\mu = \dfrac{m_2}{m_1+m_2} < 0.03852. The Sun–Jupiter system comfortably satisfies this, which is why thousands of Trojan asteroids sit locked at Jupiter's L4L_4 and L5L_5 points, discovered starting in 1906 — over a century after Lagrange predicted their existence mathematically.

Unlike the two-body problem, the general three-body problem has no analogous closed-form solution. Beyond the ten classical conserved quantities (energy, three components each of linear and angular momentum, and the uniform motion of the center of mass), Henri Poincaré proved in his 1890 prize memoir for King Oscar II of Sweden that no further single-valued analytic integral of motion exists in general — the extra "hidden" conservation laws that make the two-body problem exactly solvable (like the Laplace–Runge–Lenz vector above) simply do not survive the addition of a third body. Trajectories can then depend so sensitively on initial conditions that long-term prediction becomes practically impossible, even though the underlying equations are perfectly deterministic. This discovery, born from Poincaré's attempt to settle the stability of the solar system, is generally regarded as the birth of chaos theory.

UndergraduateReal-World Applications and Worked Examples

Mission designers fly real spacecraft by patching together exactly the two-body building blocks proved above. A Hohmann transfer uses the theorem-3 orbit-shape result to choose the cheapest possible transfer ellipse between two circular orbits. A telescope parked at a Lagrange point uses the theory above to sit in place (in a small "halo" loop) using almost no fuel. A gravity-assist flyby exploits the fact that, viewed in the flying-by planet's own frame, the encounter is just an elastic two-body scattering event — only the reference frame changes the spacecraft's energy.

Example: Hohmann transfer to Mars

Earth's orbit has aE=1 AUa_E=1\text{ AU} and Mars's has aM=1.524 AUa_M=1.524\text{ AU} (both nearly circular and coplanar). Using T[yr]2=a[AU]3T[\text{yr}]^{2} = a[\text{AU}]^{3} (Kepler's third law with the Sun's mass absorbed into the units), find the one-way transfer time of a Hohmann transfer orbit from Earth to Mars.

Solution

The transfer ellipse must touch both circular orbits, so its semi-major axis is at=aE+aM2=1+1.5242=1.262 AUa_t = \dfrac{a_E+a_M}{2} = \dfrac{1+1.524}{2} = 1.262\text{ AU} (Earth's orbit at perihelion of the transfer, Mars's orbit at aphelion).

Apply T[yr]2=a[AU]3T[\text{yr}]^{2} = a[\text{AU}]^{3} to the transfer orbit: its full period is Tt=at3/2 yr=1.2621.5 yr≈1.418 yrT_t = a_t^{3/2}\text{ yr} = 1.262^{1.5}\text{ yr} \approx 1.418\text{ yr}.

The one-way trip is only half this ellipse, from perihelion to aphelion, so the transfer time is Tt/2≈0.709 yr≈259T_t/2 \approx 0.709\text{ yr} \approx 259 days — remarkably close to the roughly 7-to-9-month cruise times used by real Mars missions, which fly close to this minimum-energy Hohmann trajectory.

Example: Gravity-assist flyby past Jupiter

A spacecraft flies past Jupiter (heliocentric orbital speed vJ=13.1 km/sv_J=13.1\text{ km/s}) on a trailing-side trajectory that, in the idealized limit of a very large deflection angle, is well approximated by an elastic "bounce" off the planet: vout=2vJ−vinv_{\text{out}} = 2v_J - v_{\text{in}}. If the spacecraft arrives with heliocentric speed vin=10.0 km/sv_{\text{in}}=10.0\text{ km/s} in the same direction as Jupiter's motion, find its departure speed voutv_{\text{out}} and explain where the extra energy comes from.

Solution

In Jupiter's own (nearly inertial) rest frame, the spacecraft's encounter with the planet's gravity is a purely central-force scattering event: by energy conservation in that frame, the spacecraft's speed relative to Jupiter is the same long before and long after the flyby, only its direction changes by some deflection angle. In the idealized trailing-side geometry with maximal deflection, that relative velocity reverses direction exactly.

Transforming back to the Sun's frame by adding Jupiter's velocity vJv_J turns a full reversal of the relative velocity u=vin−vJu=v_{\text{in}}-v_J into vout=−u+vJ=2vJ−vinv_{\text{out}} = -u+v_J = 2v_J-v_{\text{in}}, which is exactly the formula given. Plugging in numbers: vout=2(13.1)−10.0=16.2 km/sv_{\text{out}} = 2(13.1)-10.0 = 16.2\text{ km/s}, a gain of Δv=6.2 km/s\Delta v = 6.2\text{ km/s}.

This energy is not created from nothing: in the Sun's frame, Jupiter's own orbital speed drops by an imperceptibly tiny amount (Jupiter is roughly 6×10266\times10^{26} times more massive than a spacecraft, so momentum conservation spreads the trade evenly but the velocity change on Jupiter's side is utterly negligible) — the spacecraft has effectively borrowed a sliver of Jupiter's enormous orbital kinetic energy. Real flybys never achieve the full 180∘180^{\circ} idealized reversal, so actual gains are a fraction of this maximum, and a leading-side flyby (arriving ahead of the planet instead of behind it) produces exactly the reverse effect, slowing the spacecraft down.

For an ellipse of semi-major axis aa and eccentricity ee, with the attracting mass at the focus, what is the perihelion (closest) distance?

An asteroid orbits the Sun with semi-major axis a=4 AUa=4\text{ AU}. Using T[yr]2=a[AU]3T[\text{yr}]^{2} = a[\text{AU}]^{3}, its orbital period is closest to:

Which pair of Lagrange points can be linearly stable (trapping objects like Jupiter's Trojan asteroids) when the mass ratio satisfies Routh's criterion μ=m2m1+m2<0.03852\mu = \dfrac{m_2}{m_1+m_2} < 0.03852?

Why is the James Webb Space Telescope stationed in a halo orbit around the Sun–Earth L2L_2 point rather than orbiting Earth directly like Hubble?

References

  1. Carl D. Murray, Stanley F. Dermott (1999). Solar System Dynamics
  2. Alain Chenciner, Richard Montgomery (2000). A remarkable periodic solution of the three-body problem in the case of equal masses
  3. NASA Science (2024). Webb's Orbit at Sun-Earth Lagrange Point 2 (L2)
  4. NASA Science (2024). Basics of Spaceflight: A Gravity Assist Primer