1. Setting up the problem

Two massive bodies, the primaries of masses , describe circular orbits around their center of mass. A third body of negligible mass (the test particle) moves in their gravitational field without perturbing them. We restrict the motion to the orbital plane of the primaries.
We choose dimensionless units (Szebehely 1967, ch. 1):
- unit of mass: , and we define the mass ratio ;
- unit of length: the constant separation of the primaries;
- unit of time: such that . By Kepler’s third law, , so the mean motion of the primaries is and their period is .
In the synodic frame (which rotates with angular velocity about the center of mass) the primaries are at rest at and . The distances from the particle to them are
This is the problem that Euler (1767) and Lagrange (1772) studied in search of particular solutions of the three-body problem; Lagrange found the five equilibrium configurations that bear his name, and a century later the first Jupiter Trojans were discovered exactly where he had predicted.
2. Equations of motion in the rotating frame

Let be the position of the particle in the rotating frame and its constant angular velocity. The inertial acceleration decomposes as
where is the Coriolis term and the centrifugal one. Setting this equal to the gravitational force per unit mass, , and absorbing the centrifugal term into a potential, one obtains
with the effective potential (or pseudo-potential)
Explicitly,
Convention: Murray & Dermott (1999, §3.3) use the same (there ); some authors add the constant , which shifts all values of by that amount.
3. The Jacobi integral

Proposition. The quantity is conserved along any solution.
Proof. We multiply the first equation by , the second by and add. The Coriolis terms cancel, (the Coriolis force is perpendicular to the velocity and does no work):
because does not depend explicitly on . Integrating, .
is the only known first integral of the problem; Poincaré proved that no other uniform analytic integrals exist, which is the root of the non-integrability of the three-body problem. Note that in the inertial frame neither the energy nor the angular momentum of the particle is conserved (the field depends on time); is the combination of both, which is.
4. Zero-velocity curves (Hill)

Since , a particle with constant can only occupy the Hill region . Its boundary, , is the zero-velocity curve.
- Large : the allowed region consists of three disjoint pieces — two “bubbles” around each primary and the far exterior. A particle trapped near cannot escape: this is the basis of Hill’s stability criterion.
- As decreases, the bubbles first touch at (when ), then the inner region opens to the exterior through , afterwards through , and finally the forbidden region disappears at and .
For one has . With
(Earth–Moon) the values computed with src/lib/math/crtbp.ts are
| 0.83692 | 1.15568 | −1.00506 | 0.48785 | |
| 3.18834 | 3.17216 | 3.01215 | 2.98800 |
In the simulator, the red zone is the forbidden region for the chosen . Try launching a particle at rest near the Moon with : it can pass through the “neck” toward the Earth, but it cannot escape to the exterior.
5. The equilibrium points

The equilibria in the rotating frame satisfy and .
5.1 Triangular points ,
If , requires . Writing and in terms of and (one has , and ), it is immediate to check that
In the variables , and , whence : the particle forms an equilateral triangle with the primaries,
(The change is a local diffeomorphism away from the axis , so the critical points coincide.)
5.2 Collinear points , ,
On , and the equilibria are the roots of
Proposition. has exactly one root in each interval , , .
Proof. In each interval, , so is strictly increasing. At the endpoints: as a primary is approached from the left and from the right, whereas as . By the intermediate value theorem there is a root in each interval and, by monotonicity, only one.
This proof justifies the library’s algorithm: bisection in each interval, which converges with a guarantee (the error is halved at each iteration; ~50 iterations give machine precision). Calling the distance from to , the expansion for gives
where is the Hill radius; lies at on the other side of .
6. Linear stability

Let be an equilibrium and , . To first order,
with the second derivatives evaluated at the equilibrium. Seeking solutions , the determinant
gives the characteristic equation
It is biquadratic: with , . Linear stability (all purely imaginary and distinct) requires both roots to be real, negative and distinct: , , .
Collinear points. On , and, with , and . The equilibrium condition implies (Problem 2), so and : one root is positive and there is a real positive . , , are unstable for every (they are saddle × center points).
Triangular points. At , with :
so that , and
Routh’s criterion (1875). and are linearly stable if and only if , that is,
For there are two frequencies, . For : the slow libration frequency and the fast one (epicycle). That is a maximum of and is nevertheless stable is a genuine effect of the Coriolis force (gyroscopic stability). Linear stability does not imply nonlinear stability; the complete analysis (Deprit & Deprit-Bartholomé 1967, via KAM) excludes two resonant values of (those for which and ) and proves stability for the rest (Murray & Dermott 1999, §3.8).
7. Applications

Jupiter Trojans. For Sun–Jupiter, (GM from Horizons): and are stable and host thousands of Trojan asteroids that librate in “tadpole” orbits around ahead of and behind Jupiter. The linear libration period is in dimensionless units; divided by Jupiter’s period () it gives Jovian periods, about 148 years. Click “Trojan orbit (L4)” in the simulator with the Sun–Jupiter preset.
Earth–Moon. With , the Moon is km from the Earth, and , lie km and km from the Moon (values obtained from the abscissas of the table above: and ). Since does not hold (), the Earth–Moon and are linearly stable, but the solar perturbation prevents them from accumulating material durably (the “Kordylewski clouds” remain a matter of debate).
JWST at Sun–Earth L2. For the Sun–(Earth+Moon) system, and lies at au au km from the Earth, in the anti-solar direction ( au), in agreement with the “1.5 million kilometers” quoted by NASA. Since is unstable (a real positive with an -folding time of a few weeks), JWST is not at but in a halo orbit around it which, according to NASA, “takes about 6 months to complete” and is “similar in size to the Moon’s orbit around the Earth”; the drift is corrected with small periodic station-keeping maneuvers. In this way the Sun, the Earth and the Moon always stay on the same side of the sunshield and the telescope never enters the Earth’s shadow.
8. Numerical note

The simulator integrates with RK4 (rk4Step) with a step adapted to the distance to the nearest primary,
, with and . RK4 is not symplectic: the error in
grows slowly (typically linearly in , ). The “ΔC/C” readout of the simulator is the natural
measure of the error: with these parameters it stays below over hundreds of time units
for orbits that do not approach the primaries. Two observations:
- The step adapted to follows the local free-fall time scale, : near a primary the field varies rapidly and must be resolved. Without that adaptation, a fixed step that works far from the primaries produces errors in of order unity during a close encounter.
- The Jacobi constant is a necessary but not sufficient diagnostic: an integration can conserve to and still have large phase errors in chaotic orbits (lesson 5). To measure the order of the method one must compare with a reference solution (much smaller step) and verify that the error scales as (Problem 6).
Problems
- (Coriolis does no work) Show that if the angular velocity of the frame were a function of , would no longer be conserved, and identify the term responsible.
Show solution
With the Euler force appears and depends on through ; then in general. Both terms vanish if and only if .
- (Instability of the collinear points) Show that at , , one has .
Show solution
At it is immediate: (since ), so . For and , rewrite as (expand and ). At , and , so the right-hand side is negative and ; at , and , the right-hand side is positive and again .
- (Routh) Check that at for every and deduce . Show that is maximal at and that has a unique root in .
Show solution
In general (use in the plane); at it equals . is increasing on , with and : by the intermediate value theorem and monotonicity there is a unique root, .
- (Hill radius) From with , , , show that at lowest order, and obtain the correction .
Show solution
With : , . . Expanding : . At lowest order, . At the next order, , that is , and .
- (Simulator) With the Earth–Moon preset, launch a particle at rest near the Moon with between and . Measure how long it takes to cross into the Earth region. Explain why, even though the crossing through is energetically allowed, the particle may take many orbits to find it.
Show solution
The time depends strongly on the initial position (the typical sensitivity of a non-integrable system). The “neck” at is narrow for just below (its width scales as ), and the particle only passes through it if it arrives with the right phase: the set of initial conditions that cross within a given time is bounded by the invariant manifolds of the Lyapunov orbit around , the basis of the low-energy “highways” used in mission design.
- (Computational: order of the integrator) Integrate with RK4 and fixed step an orbit that does not approach the primaries (for example, a Trojan orbit with the Sun–Jupiter preset) for and measure for . Plot against and estimate the slope. Repeat with leapfrog and comment.
Show solution
import numpy as np
def f(s, mu):
x, y, vx, vy = s; r1 = np.hypot(x+mu, y); r2 = np.hypot(x-1+mu, y)
Ox = x - (1-mu)*(x+mu)/r1**3 - mu*(x-1+mu)/r2**3; Oy = y - (1-mu)*y/r1**3 - mu*y/r2**3
return np.array([vx, vy, 2*vy + Ox, -2*vx + Oy])
def CJ(s, mu):
x, y, vx, vy = s; r1 = np.hypot(x+mu, y); r2 = np.hypot(x-1+mu, y)
return x*x + y*y + 2*(1-mu)/r1 + 2*mu/r2 - vx*vx - vy*vy
mu = 9.54e-4; s0 = np.array([0.5 - mu + 0.02, np.sqrt(3)/2, 0.0, 0.0]) # near L4
for h in [0.02, 0.01, 0.005, 0.0025]:
s = s0.copy(); C0 = CJ(s, mu)
for _ in range(int(50/h)):
k1 = f(s, mu); k2 = f(s + h/2*k1, mu); k3 = f(s + h/2*k2, mu); k4 = f(s + h*k3, mu)
s = s + h/6*(k1 + 2*k2 + 2*k3 + k4)
print(h, abs(CJ(s, mu) - C0))The slope of the log-log fit is (each time is divided by 2 the error is divided by ), until the round-off level () is reached. With leapfrog the slope is 2 and the error does not grow with (it oscillates, bounded), whereas that of RK4 grows linearly with : for long integrations the symplectic method wins even though it is of lower order. Note: the Coriolis term depends on the velocity, so the standard kick-drift-kick leapfrog is not directly applicable; one uses a variant for gyroscopic forces or integrates in the inertial frame (numerical methods lesson).
Self-assessment
✦ Self-assessment
Further reading
- Murray & Dermott (1999), ch. 3: complete derivation of the equations, the Jacobi integral, the Lagrange points, stability (§3.6–3.8) and the tadpole and horseshoe orbits (§3.9–3.12).
- Szebehely (1967), Theory of Orbits: the reference treatise on the restricted problem, with the equilibrium points (ch. 4) and their stability (ch. 5).
- Danby (1988), ch. 8: classical presentation with emphasis on periodic orbits.
- Routh (1875), DOI 10.1112/plms/s1-6.1.86: the original criterion; Deprit & Deprit-Bartholomé (1967), DOI 10.1086/110213: nonlinear stability of the triangular points.
- NASA Science, “Webb’s Orbit”: official description of the orbit of JWST around L₂.
🍎 Teacher guide
- Time
- 2 classes of 90 min
- Learning outcome
- By the end, the student derives the equations of the restricted problem in the rotating frame, proves the conservation of the Jacobi constant, computes the five Lagrange points justifying the bisection algorithm, derives Routh's criterion and applies it to real systems, and measures the order of an integrator with the Jacobi constant.
- Evidence of learning
- Submission of computational problem 6 (log-log plot of the error in C_J versus h with the estimated slope) and of proof 2 or 4.
Materials
- Python 3 with NumPy and Matplotlib
- Simulator "Lagrange points" with the Earth–Moon and Sun–Jupiter presets
- Table of GM for the Sun, Jupiter, the Earth and the Moon (JPL Horizons)
- Optional: list of Trojan asteroids from the Minor Planet Center to count L₄ versus L₅
Suggested sequence
Class 1. Dimensionless units and rotating frame; derivation of the equations with Coriolis and centrifugal terms (30 min). Jacobi integral and zero-velocity curves, exploring in the simulator how the necks open as decreases (30 min). Triangular points via the change to and collinear points with the uniqueness proof (30 min).
Class 2. Linearization and characteristic equation; instability of the collinear points and Routh’s criterion (40 min). Applications: Trojans (libration period), Earth–Moon and JWST (20 min). Numerical note and start of problem 6: measuring the order of RK4 live (30 min).
Common mistakes
- Interpreting the centrifugal and Coriolis forces as "real" forces: insist that they are kinematic terms of the change of frame and that they disappear in the inertial frame.
- Believing that C_J is the energy: in the inertial frame the energy of the particle is not conserved; C_J combines energy and angular momentum.
- Thinking that L₄ is stable "because it is a minimum of the potential": it is a maximum; the stability is gyroscopic.
- Confusing linear stability with stability: mention the resonant values of μ excluded by Deprit & Deprit-Bartholomé.