Lagrange points

step 0
Loading the engineShared by all simulations, so the next one opens instantly.
The physics

Two bodies on circular orbits around each other have five points where a third, much lighter body can stay at rest relative to them. Leonhard Euler found the three on the line through the two masses around 1767, and Joseph-Louis Lagrange the two that form equilateral triangles with them in 1772. Spacecraft and asteroids use them: the James Webb Space Telescope circles the Sun-Earth point L2, 1.5 million km beyond the Earth, and thousands of Trojan asteroids share Jupiter’s orbit around L4 and L5, 60° ahead of and behind the planet.

What you see

A star (yellow) of mass 1−μ and a planet (blue) of mass μ move on circular orbits around their center of mass, one unit apart. Ten massless test particles start near each Lagrange point, scattered by up to 0.02 in position and 0.002 in velocity from exact co-rotation. Particles from the unstable points L1, L2 and L3 are red, those from L4 and L5 teal. Small crosses mark the five points and turn with the planet.

By default the view is the inertial frame, so the whole pattern rotates. Set corot. ω to 1 to rotate the canvas with the orbit: the star and planet then stand still, and you can watch each particle drift away from its Lagrange point or loop around it.

Governing equation

The simulation integrates Newtonian gravity in the inertial frame, with G=1, total mass 1 and separation 1, so the orbital angular velocity is 1 and the period 2π. In the frame that rotates with the orbit, a test particle feels the effective potential

Φeff=−1−μr1−μr2−x2+y22

plus the Coriolis force −2𝛀×𝐫˙, where r1 and r2 are the distances to the star and the planet. The Lagrange points are the five stationary points of Φeff. The simulation places them at

L1,2≈(1−μ∓rH, 0),L3≈(−1−5μ12, 0),L4,5=(12−μ, ±32),

with the Hill radius rH=(μ/3)1/3; the first three are the leading terms for small μ.

L1, L2 and L3 are saddle points and always unstable. L4 and L5 are maxima of Φeff, yet the Coriolis force turns a particle sliding off them into a loop around the point. This works only below the Routh limit:

μ<12(1−2327)≈0.0385.

Presets

The four presets start the same way and differ only in μ. Over about fifty orbits they behave as follows.

Sun-Jupiter (Trojans): μ=0.001. The red particles next to the planet, at L1 and L2, are scattered within a few orbits; those at L3, where the instability is weak, drift away slowly. Most teal particles stay near L4 and L5 on wide, tadpole-shaped loops.

Sun-Earth (JWST at L2): μ=3×10−6. Here L1 and L2 lie only 0.01 from the planet, closer than the spread of the starting positions. The planet is too light to hold even the teal particles against offsets this large, and most of them drift away along the orbit. JWST itself stays near L2 only with a small engine burn every few weeks.

Earth-Moon: μ=0.012, the Moon’s share of the Earth-Moon mass. Of all four presets, the teal particles stay closest to their points here.

Near Routh limit (μ=0.037): just below the threshold. Linear theory still predicts stability, but the margin is thin: about half the teal particles escape, and the rest circle their points in wide loops.

Parameters

mass ratio μ: the planet’s share of the total mass, 0.0001 to 0.038 (default 0.001).

corot. ω: rotates the view at this angular velocity, from -3 to 3 (default 0); a value of 1 follows the orbit. It changes only the drawing.

trail length: 0 to 1000 steps (default 300); trails switches them off.

integrator and softening: leapfrog and 10−5 by default. The time step is fixed at 0.005.

The remaining controls change only the drawing: labels, the center-of-mass marker, a view locked to the center of mass, velocity arrows and the field overlays.