# The Three-Body Problem Built 2026-09-23. CC BY 4.0. https://nanobotco.github.io/three-body/ ## Everything pulls on everything Two things pull on each other. The pull goes up with the weight and down with the square of the distance. That one line is the whole engine. Put two rocks in empty space and let go. They drift toward each other. Newton wrote down how hard, and the sentence has held for three hundred years. Weight helps the pull. Distance hurts it, and it hurts it twice over: move the rocks twice as far apart and the pull drops to a quarter. Ten times as far, a hundredth. That is what **inverse square** means, and it is the reason a tractor a mile off does nothing to your coffee while the Earth under the porch holds you in the chair. The second line matters as much as the first. The pull is a force, and a force divided by weight is how fast something picks up speed. Divide, and your own weight cancels out. A feather and an anvil dropped on the Moon land together — the Moon pulls the anvil harder, and the anvil is harder to move, by the same factor. So each rock's speeding-up depends on the **other** rock's weight, not its own. Hold that and the rest of this site follows. F = G m1 m2r2 — The pull between two things equals a fixed number G, times the first weight, times the second weight, divided by the distance between them multiplied by itself. a1 = Fm1 = G m2r2 — How fast the first one picks up speed does not depend on its own weight at all. Only on the other one's weight and the distance. (This cancellation is why the Sun's grip on the Earth can be worked out without knowing what the Earth weighs.) G = 6.674 30 × 10−11 m3 kg−1 s−2 — G is a tiny number, which is why you never feel your neighbour's gravity. (Measured, not derived. The 2022 value carries an uncertainty of 22 parts in a million — the worst-known of the fundamental constants.) Sources: Newton, Philosophiæ Naturalis Principia Mathematica (1687), Book I ; NIST, Newtonian constant of gravitation ; Wikipedia, Newton's law of universal gravitation ## Two is easy With two bodies you can write the answer down, once, and it is right forever. This is the only case that works that way. Two rocks, nothing else. Watch the pair from the point that sits between them — the **barycentre**, the balance point. That point either sits still or coasts in a straight line at a steady speed, no matter what the rocks do, because the two pulls are equal and opposite and cancel in the total. Sit on the balance point and there is only one thing left to track: the line from one rock to the other. Its length and its direction. Two moving bodies collapse into one moving arrow, and the arrow obeys the same inverse-square law with the two weights added together. Solve that and you get a shape, not a list of positions. An ellipse, or a parabola, or a hyperbola — a slice through a cone. Each rock runs its own copy of the shape around the balance point, the lighter one on the bigger copy, and it repeats. Forever, exactly, with no stepping and no computer. Kepler had the ellipse from Tycho Brahe's naked-eye records before Newton had the law that explains it. Newton then showed the inverse square and the ellipse are the same fact said two ways. Two is the case where a formula exists. Everything hard about three bodies is the loss of this page. r = r2 − r1 d2rdt2 = −G(m1+m2) rr3 — Track only the arrow from one body to the other. It speeds up toward the other end, at a rate set by the two weights added together. (Twelve numbers (two positions, two velocities, in space) become six. This is the whole trick, and there is no version of it for three.) r = a(1 − e2)1 + e cos θ — The distance at any angle around the orbit. One number sets the size, one sets how squashed it is. (e = 0 is a circle. e below 1 is an ellipse and closes. e = 1 is a parabola, e above 1 a hyperbola — those leave and do not come back.) T2 = 4π2 a3G(m1+m2) — Square the time it takes to go around and you get the cube of the orbit's size, times a constant. Farther out means slower, and by exactly this much. (Kepler's third law. Written this way it is also a scale: the same equation weighs the Sun, weighs a black hole, and weighs a pair of stars nobody will ever visit.) Sources: Wikipedia, Two-body problem ; Wikipedia, Kepler's laws of planetary motion ; Wikipedia, Barycentre ## Add one rock The equations for three bodies fit on one line and hide nothing. What breaks is not the writing down. It is the solving. Three bodies. Each one feels the pull of the other two, added as arrows. That is the entire physics, and here it is, written out. Nothing is missing from that line. No approximation, no fudge, no term dropped for being small. If you know where the three are and how fast each is going, the line tells you what happens next, to as many decimal places as you care to carry. Count what you have to keep track of. Three bodies, three coordinates each, is nine numbers for position and nine for velocity: **eighteen numbers**, and the line above says how each of the eighteen changes. In a flat plane it is twelve. That is a small bookkeeping job. And yet. There is no formula that takes the eighteen numbers and the time and hands back where everything is. Not a hard one, not a long one — there is none, and the next two chapters are about how that got proved rather than assumed. Newton knew. Book I of the *Principia*, Proposition 66, is him going at the Sun–Earth–Moon case by hand, with twenty-two corollaries and no clean answer. Three and a half centuries later the plain statement has not changed much: you can say what the rules are, and to find out what they do you have to watch. d2ridt2 = G Σj≠i mj (rj − ri)|rj − ri|3 — For each body: add up, over the other two, the other one's weight times the direction toward it, divided by the distance cubed. That sum is how fast this body's velocity is changing. (The cube on the bottom is the inverse square plus one more power to turn the arrow on top into a pure direction. Same law as chapter one, written for a crowd.) 18 numbers → 18 equations → no formula — Enough equations to fix the answer, and no way to write the answer as a formula. (Existence and uniqueness are not in doubt: the path is there and it is the only one. Writing it in closed form is the part that fails.) Sources: Wikipedia, Three-body problem ; Newton, Principia, Book I, Proposition 66 ; Wikipedia, n-body problem ## Ten things that never change Eighteen numbers, ten of them pinned down by conservation laws. The eight left over are where the trouble lives — and two theorems say no further law is coming. There is a way of solving equations by bookkeeping. Find a quantity that never changes, and you have traded one unknown for a known. Enough of those and the problem falls open. Three bodies hand you ten of them for free. The total momentum is three numbers that hold steady. The balance point's coasting gives three more. The total energy is one. The total spin — **angular momentum** — is three. Ten quantities, fixed for all time, whatever the three rocks get up to. Eighteen minus ten is eight. Then you can slide the clock, because the laws do not care what time it is, and you can turn the whole picture, because they do not care which way is north. Call it **six**. Six stubborn numbers. For two hundred years the hope was that somebody would find another conserved quantity and then another, until the six were gone and the formula appeared. Two results ended that hope. **Heinrich Bruns, 1887.** Beyond the ten, there are no more conserved quantities that are algebraic in the coordinates, the velocities and the time. **Henri Poincaré, 1890.** In the restricted case, with the mass ratio small and not special, no further conserved quantity exists that is analytic and single-valued. Read those narrowly, the way they were proved. Neither says that no expression of any kind can exist — Sundman later wrote one down, and it is in a later chapter. They say that the *bookkeeping* route is closed. You cannot grind the six numbers away by finding more things that never change, because there are no more of the usable kind. P = Σ mi vi (3) · R − Vt (3) · L = Σ mi ri × vi (3) — Total momentum, three numbers. The balance point's straight-line drift, three more. Total spin, three. (Ten counting the energy below. These are the classical integrals, and they are all of them.) E = Σ ½ mi vi2 − G Σi<j mi mjrij — Add up the motion of all three, then subtract the pull holding them together. That total never changes. (This one is the workhorse of the numbers chapter: a computer's answer is checked by watching whether its energy stays put.) 18 − 10 = 8 → clock and compass → 6 — The bookkeeping gets you from eighteen unknowns down to six and stops there. (Bruns 1887 and Poincaré 1890 are the proofs that it stops.) Sources: Florin Diacu, The solution of the n-body problem (Mathematical Intelligencer, 1996) ; Wikipedia, n-body problem: integrals and Bruns' theorem ; June Barrow-Green, Poincaré and the Three Body Problem (1997) ; Wikipedia, Henri Poincaré ## A hair's difference, and a different sky Move one rock by the width of an atom and an hour later the whole arrangement is different. The equations are exact; the answer is still out of reach. Here is the thing that makes three bodies different in kind, not in difficulty. Start two copies of the same three rocks. In the second copy, nudge one of them by a millionth of a millimetre. Run both. For a while the two copies agree. Then they part, and the gap does not grow by a little each time — it **doubles**, and doubles again, on a fixed schedule. Twenty doublings turns a millionth into a whole. After that the two copies have nothing to do with each other. The time it takes to grow by a factor of e — about three — has a name: the **Lyapunov time**. It is the shelf life of a prediction. Past a few dozen Lyapunov times, knowing the starting numbers to any precision you can name buys you nothing. This is not sloppiness in the equations and it is not randomness. Run the same start twice and you get the same path twice, to the last decimal. The trouble is that you never have the start to the last decimal. Nobody does. The rocks are not measured that well, and cannot be. Poincaré found this in 1889 while competing for a prize from Oscar II of Sweden, and he found it by finding a mistake in his own winning entry. The corrected memoir describes two curves that were supposed to meet cleanly and instead cross each other an infinite number of times, folded into what he called a tangle so complicated he would not attempt to draw it. He paid to have the printed copies replaced. That reversal is where the study of chaos begins, thirty years before anyone had a computer to see it with. The cleanest demonstration is the oldest test case in the subject. **Carl Burrau, 1913**: weights of three, four and five, at rest, at the corners of a three-four-five triangle. Nothing is moving and nothing is arranged. It falls together, misses, swings, misses again for about sixty time units, and then throws one body out for good and leaves the other two paired up — and which body that is depends on the last decimal place you kept. Our own solar system is in this condition, mildly. Track the inner planets and the predictions go soft after around **five million years** — fine for a calendar, useless for asking where Mercury will be in a hundred million. δ(t) ≈ δ0 et/τ — The gap between two nearly identical starts multiplies itself as time goes on, instead of adding. (τ is the Lyapunov time. The demo below measures it for whatever start you give it, by fitting a straight line to the gap on a log scale.) tuseful ≈ τ · ln accuracy wantedaccuracy of the start — How long a prediction lasts: the Lyapunov time, times the logarithm of how much better your starting numbers are than the error you will accept. (The logarithm is the bad news. A thousand times better measurements buy about seven more Lyapunov times. Not a thousand times longer — seven times the constant.) τinner planets ≈ 5 × 106 yr — The solar system's own shelf life, from Laskar's calculations. (Which is why the standard result is a probability — about a 1% chance of Mercury's orbit going unstable within five billion years — and not a date.) Sources: June Barrow-Green, Poincaré and the Three Body Problem (1997) ; Florin Diacu, The solution of the n-body problem (Mathematical Intelligencer, 1996) ; Laskar & Gastineau, Existence of collisional trajectories of Mercury (Nature, 2009) ; Wikipedia, Lyapunov time ; Wikipedia, Stability of the Solar System ## Two big, one small Let the third body be a pebble too light to pull back. Now the problem has a fence you can draw, five places where a pebble can sit still, and a number that says which side of the fence you are on. Most useful three-body arrangements have one body that does not matter to the other two. A spacecraft between the Earth and the Sun. A pebble near Jupiter. Set its weight to zero — it still gets pulled, it does not pull — and the problem changes character. The two heavy bodies now run a plain two-body orbit, which is solved, and the pebble moves in a field that repeats. Take the next step and spin the paper. Put the two heavy bodies on a turntable that rotates with them, so they sit still on the page. In that turning frame the pebble feels gravity from both plus the outward throw of the spin, and all three of those can be rolled into one hill-and-valley surface. On that surface there is a quantity the pebble cannot change: Jacobi's constant. Carl Gustav Jacob Jacobi found it in 1836 and it is the only conserved quantity this case has left. Rearranged, it says the pebble's speed is fixed by where it is — so at the places where the arithmetic would need the speed to be negative, the pebble cannot go. Draw that boundary and you have drawn a fence. On the inside, the pebble is trapped with one body; loosen the fence and a gate opens between them. Five places on the surface are flat — the pull and the throw cancel exactly. **L1, L2, L3** sit on the line through the two bodies and are saddles: a pebble there slides off, slowly, which is why the James Webb telescope at L2 has to nudge itself back every three weeks. **L4 and L5** sit at the corners of equilateral triangles with the two bodies, and they are hilltops that nevertheless hold, provided the lighter of the two heavy bodies is under about 4% of the total. Jupiter clears that by a mile, and its L4 and L5 have been collecting asteroids for four billion years — over ten thousand catalogued. The same surface gives you the **Hill sphere**: how close a moon has to be for a planet to keep it rather than the Sun taking it. For the Earth that radius is about 1.5 million km, and the Moon sits at a quarter of it. C = 2Ω(x,y) − v2, Ω = ½(x2+y2) + 1−μr1 + μr2 — Jacobi's constant: twice the hill-and-valley surface at the pebble's position, minus its speed squared. It does not change, ever. (μ is the small body's share of the two weights. The first term is the spin's outward throw, the other two are the two pulls.) v2 = 2Ω − C ≥ 0 — Speed squared cannot be negative, so the pebble is shut out of everywhere the surface sits below its own constant. (The boundary where it equals zero is the zero-velocity curve. Drawn in the demo, and it is a fence with gates that open in a fixed order as C comes down.) μ < ½(1 − √(23/27)) ≈ 0.0385 — The triangle points hold onto things only if the smaller heavy body is under about four percent of the pair. (Sun and Jupiter: 0.00095. Earth and Moon: 0.0121 — both under, both hold. Pluto and Charon: 0.104, over the line.) rHill ≈ a 3√m3√(3M) — A planet's grip reaches out about its distance from the Sun times the cube root of its share of weight. (Earth: 1.5 million km. The Moon at 0.384 million km is comfortably inside, which is the whole reason we have one.) Sources: Wikipedia, Jacobi integral ; Wikipedia, Lagrange point ; Wikipedia, Hill sphere ; NASA, Webb orbit at L2 ; IAU Minor Planet Center, Jupiter Trojans ## The two ways three rocks can hold a shape Three bodies can keep the same shape while they spin, and there are exactly two shapes that allow it: a straight line and an equilateral triangle. Euler found the first in 1767, Lagrange the second in 1772. Forget the general case for a minute and ask a smaller question. Can three bodies move so that the triangle they make never changes shape — only turns and scales? That is a shape you could write down. **Euler, 1767.** Put all three on a line, spinning about the balance point like a baton. It works, but only at one spacing, and finding it means solving a fifth-degree equation. There is no formula for a general fifth-degree equation — that is Abel's theorem, a different piece of mathematics arriving in the same century — so even this tidy case ends in a number you have to hunt for rather than write. It has exactly one answer for any three weights you choose. **Lagrange, 1772.** Put the three at the corners of an equilateral triangle and spin. This one works for **any** three weights, with no equation to solve: the triangle holds, each body running an ellipse of its own around the balance point. A heavy body and a light one at two corners is the Trojan asteroid case from the last chapter. Those two are the only ones. For three bodies there are five such arrangements in total — three collinear ones, depending on which body sits in the middle, and the two mirror-image triangles — and that is the complete list. Nobody has proved the equivalent for every number of bodies; whether the count is always finite is Smale's sixth problem, still open. This is worth sitting with. The general three-body problem has no formula, and yet within it sit these exact, eternal, writable solutions. A problem being unsolvable in general does not mean it is dark everywhere. r5 − (3−μ)r4 + (3−2μ)r3 − μr2 + 2μr − μ = 0 — Where the inner balance point sits: the one distance that satisfies this fifth-degree equation. (This is the L1 case of Euler's quintic. Solved by hunting, not by formula. For the Sun and the Earth it puts L1 about 1.5 million km sunward of us — the figure printed on the page is this equation solved at build time.) ω2 = G(m1+m2+m3)a3 — An equilateral triangle of any three weights, sides of length a, spins at this rate and holds its shape. (Compare Kepler's third law for two bodies — same form, with all three weights added. Lagrange's triangle is the closest thing the three-body problem has to a napkin answer.) 3 collinear + 2 triangles = 5 — Five arrangements that keep their shape, for any three weights. That is all of them. (Called central configurations. Five for three bodies; fifty for five bodies with generic weights; no general count is proved.) Sources: Wikipedia, Euler's three-body problem ; Wikipedia, Central configuration ; Wikipedia, Lagrange point derivation ; Wikipedia, Smale's problems ## The ones that come back around Some starts run a closed loop and repeat forever. Three equal weights chasing each other around a figure eight is the famous one, and it was found by looking, not by solving. A **periodic** orbit is one that returns to exactly where it started, at exactly the speeds it started with, and then does the whole thing again. Two bodies always do this. Three bodies almost never do — but the almost is doing some work in that sentence. In 1993 Cris Moore, looking for closed orbits by computer, found three equal masses that chase one another around a single figure eight. All three on the same track, evenly spaced in time, no spin in the system at all. In 2000 Alain Chenciner and Richard Montgomery proved it exists, by a route worth knowing: instead of solving the equations, they showed that the path which minimises a certain total over all possible looping paths has to be that eight. The orbit is the answer to a *least-effort* question. The trick that makes such searching possible is to throw away what does not matter. Three bodies make a triangle. Ignore how big the triangle is and which way it points, and what is left is its shape — and the space of all triangle shapes is a **sphere**. Three points on its equator are the three two-body collisions; the poles are the two equilateral triangles; Euler's straight lines lie on the equator between the collisions. Every three-body motion, however wild, is a curve drawn on that sphere. The figure eight is a curve that crosses the equator between collisions and closes. In 2013 Milovan Šuvakov and Veljko Dmitrašinović scanned a whole sheet of starting speeds by computer and reported thirteen new families, with names off the shapes they draw — butterfly, moth, yin-yang, goggles. Xiaoming Li and Shijun Liao and colleagues then pushed the same search much further with more computing and higher precision, into the hundreds and then the thousands of families. The orbits on this site's **Orbits** page were found the same way, here, on this machine: a grid of starting speeds, run forward, looking for the ones that come back near their own start, then a solver that walks each candidate in until it closes. Each one carries the distance it closes to. s(T) = s(0) — The whole state — all the positions and all the speeds — is the same after a time T as it was at the start. (Twelve equations in the plane. The solver on this site treats them as twelve residuals in three unknowns and drives them toward zero.) A = ∫0T ( kinetic + potential ) dt → least — Add up the motion and the pull along the whole loop. The figure eight is the loop that makes this total as small as it can be. (The action. Chenciner and Montgomery's 2000 proof works by minimising it over loops of a fixed symmetry type, which is how a shape gets proved to exist without ever being written as a formula.) shape of a triangle → a point on a sphere — Drop the size and the direction and all possible triangles form a sphere. Collisions sit on its equator. (The shape sphere. The reason searches of this kind are possible at all: it turns an eighteen-number problem into a curve on a two-dimensional surface.) Sources: Chenciner & Montgomery, A remarkable periodic solution of the three-body problem (Annals of Mathematics, 2000) ; Moore, Braids in classical dynamics (Physical Review Letters, 1993) ; Šuvakov & Dmitrašinović, Three classes of Newtonian three-body planar periodic orbits (PRL, 2013) ; Li & Liao, More than six hundred new families of Newtonian periodic planar collisionless three-body orbits (2017) ; Montgomery, The three-body problem and the shape sphere (American Mathematical Monthly, 2015) ## There is a formula. Nobody can add it up. In 1912 Karl Sundman wrote a series that converges to the answer for almost every three-body start. One estimate of how many terms you would need to use it runs to a 1 followed by eight million zeros. The last two chapters said there is no formula. That needs narrowing, because there is one, and the story of it is the best joke in the subject. **Karl Frithiof Sundman, 1912**, working in Helsinki, proved that the three-body problem can be written as a power series that converges for all time — provided the total spin is not zero, which rules out only the triple collisions. Not an approximation. A convergent series, the answer, on paper. The catch is in the fine print twice over. First, the series runs in powers of the cube root of time, not time — a fractional power, because a near-collision does something to the solution that whole powers cannot follow. Second, and fatally, it converges slowly. Slowly enough that in 1930 D. Beloriszky estimated the number of terms needed to compute a position at astronomical accuracy at around 10 to the eight-millionth power. For scale: the observable universe holds something like 10⁸⁰ atoms. The exponent here is eight million, not eighty. A recipe that calls for more steps than there are particles is a recipe in name only. Qiu-Dong Wang extended Sundman's result to any number of bodies in 1991, with the same catch. So the state of play is this: an exact expression exists and cannot be used; the bookkeeping route is proved closed; and every number anybody has ever actually used for a three-body system came out of stepping the equations forward and watching. That is the next chapter. q(t) = Σn≥0 cn τn, τ ∝ t1/3 — The positions written as an endless sum of powers — not of time, but of the cube root of time. (The cube root is forced by what happens near a two-body collision. Sundman's regularising change of variable is the same idea the numbers chapter uses to keep a computer from choking on a close pass.) terms needed ≈ 108 000 000 vs atoms in the universe ≈ 1080 — The number of terms you would have to add up, against the number of atoms there are. (Beloriszky's 1930 estimate, quoted in the standard references. A convergent series and a usable method are not the same thing, and this is the cleanest example anywhere of the difference.) Sources: Wikipedia, n-body problem: Sundman's theorem and Wang's global solution ; Florin Diacu, The solution of the n-body problem (Mathematical Intelligencer, 1996) ; Wang, The global solution of the n-body problem (Celestial Mechanics, 1991) ## Crashes, and the kind of trouble that is not a crash Solutions can stop existing. With three bodies the only way is a collision, and a three-way collision needs the whole system to have no spin. With four or more, something stranger is possible. The equations have a division in them, by the distance cubed. Let a distance go to zero and the arithmetic stops meaning anything. That is a **singularity**: a moment beyond which the solution does not continue. Two bodies hitting each other does it. So does all three arriving at the same point at the same instant. **Paul Painlevé proved in 1895** that for three bodies those are the only ways — every singularity is a collision. No other kind of breakdown is available. Sundman added the condition on the three-way case, and it is a strange and beautiful one. A **triple collision requires the total angular momentum to be exactly zero.** Give the system the faintest overall spin and all three can never meet. Not unlikely — impossible. The spin is conserved, and it cannot be carried by a single point. Painlevé also guessed that for more bodies there would be a singularity that is not a collision: a solution that ceases to exist in finite time with nothing having hit anything. It took until **1992**, when **Zhihong (Jeff) Xia** built one with five bodies — an arrangement in which distances and speeds run to infinity in a finite time, each body having only ever passed near the others. Joseph Gerver later did it with four. For three, Painlevé's proof stands: a crash is the only way out. This is where the three-body problem earns its position. Two bodies are solvable. Four or more can misbehave in ways three cannot. Three is the narrowest place where the trouble starts and the last place it is still fully mapped. L = 0 ⟺ triple collision possible — All three can meet at one point only if the whole system has no spin at all. (Sundman's theorem, 1907. The one-line reason: a point has no room for angular momentum, and angular momentum never changes.) I = Σ mi ri2, d2Idt2 = 4E − 2U — Take the spread of the system. How its spread speeds up or slows depends only on the energy and the pull. (Lagrange–Jacobi. If the total energy is positive the spread must grow without limit: a system with too much energy cannot stay together, whatever anybody arranges.) Sources: Wikipedia, Painlevé conjecture ; Xia, The existence of noncollision singularities in Newtonian systems (Annals of Mathematics, 1992) ; Wikipedia, n-body problem: singularities ; Wikipedia, Virial theorem and the Lagrange–Jacobi identity ## So you step it Nobody solves the three-body problem. Everybody steps it: work out the pulls, move everything a little, do it again. The skill is in knowing when your own arithmetic has started lying. Here is the whole method, and it is old enough that Euler used it by hand. Where is everything? What is the pull on each? Move each one a little way at its current speed, change each speed a little by its current pull. Repeat a million times. Done the obvious way — move, then change speed, with the same step — it is called **Euler's method** and it leaks. Energy climbs, orbits spiral outward, and nothing warns you. The fix is almost free: change the speed by half a step, move a whole step, change the speed by the other half. That is **leapfrog**, also called Verlet, and it belongs to a family called **symplectic** methods whose defining virtue is that they do not leak. The energy wobbles up and down with each orbit and comes back. Over a million orbits it is still wobbling around the same value. That wobble is the audit. Total energy is a quantity that cannot change, so watching what your computer does to it tells you what your computer is doing to everything else. Every demo on this site prints it, and the demo on this page runs both methods side by side so the leak is visible. Close passes are where stepping fails. When two bodies nearly touch, the pull goes up like the square of the closing distance and a step that was fine a second ago now throws a body across the screen. Two ways out. **Softening** — add a small constant under the square root, which rounds off the bottom of the well and is a lie you have chosen knowingly. Or **regularisation** — change variables so a collision stretches out into something smooth, which Levi-Civita did in 1903 and which is what serious codes use. Burrau's problem from the chaos chapter is the worked example of all of this. At a fixed step it comes out with the energy wrong by a factor of about a thousand and **the wrong body thrown out**. Give it a step taken from the closest pair and the energy error drops to about a millionth and the lightest body leaves, which is the answer Szebehely and Peters got in 1967 with a change of variables. Same equations, same start, three different endings depending only on how the arithmetic was done. Then there is the deeper problem the chaos chapter set up. A computer carries about sixteen digits. In a chaotic triple, the error in the sixteenth digit doubles its way up to the first one, and after a few dozen Lyapunov times the trajectory on the screen is a trajectory, not *the* trajectory. Boekholt and Portegies Zwart put a number on it in 2015 by running the same systems in arbitrary precision: a large share of chaotic triples are **not reproducible** at ordinary double precision. Their answer was Brutus, a code that carries as many digits as needed and slows down to whatever extent that takes. So a picture of a three-body orbit is a claim about a calculation. The version of the claim worth printing comes with the method, the step size, and what the energy did. Euler: v ← v + a h, r ← r + v h — Change the speed by the pull times the step, then move at the new speed. One line, and it leaks energy. (Error per step proportional to h². The leak is systematic, not random, which is what makes it dangerous: the orbit drifts one way forever.) Leapfrog: v ← v + a h2, r ← r + vh, a ← a(r), v ← v + a h2 — Half a kick, a full drift, then the other half kick with the new pull. Four lines instead of two, and the energy stays put. (Symplectic and time-reversible: run it backwards and you land on the start. This is what runs the demos on this site, in the browser, and tools/physics.py, in Python.) h ≲ rminvmax × 1100 — Your step has to be a small fraction of the time the closest pair takes to cross its own separation. (A rule of thumb, not a theorem. Codes that mean business compute a step from the current configuration every time round, rather than fixing one in advance.) Sources: Wikipedia, Verlet integration ; Wikipedia, Symplectic integrator ; Boekholt & Portegies Zwart, On the reliability of N-body simulations (2015) ; Wikipedia, Levi-Civita regularisation / Kustaanheimo–Stiefel transformation ; Szebehely & Peters, Complete solution of a general problem of three bodies (1967) ## What usually happens Throw three bodies together and the usual ending is a fight two of them win: one gets thrown out, the other two are left closer than they started. You cannot predict which — but you can price it. Give up on predicting the path and ask a different question: out of many random triples, what fraction end which way? That question has answers, and they are stable, and they are useful. Start a pair in orbit and send a third body in. Three things can happen. It can fly past, leaving the pair a little changed — a **flyby**. It can trade places with one of the pair and leave the other one out in the cold — an **exchange**. Or all three can mill about for a while in a **resonance**, drawing loops around each other, and then one leaves for good — an **ejection**. Given enough time, and with the energy to allow it, ejection is what almost always happens. The bookkeeping is exact even though the path is not. Energy is conserved, so the body that leaves takes kinetic energy with it, and the pair left behind must go **down** by the same amount — which for a gravitational pair means closer together and faster. This is how a binary tightens: by throwing things out. It is also where a slingshot comes from. Voyager 2 did not gain energy from nothing; Jupiter lost a slice, and Jupiter can afford it. In 2019 Nicholas Stone and Nathan Leigh derived the outcome distribution — a closed-form answer for the *statistics* of the chaotic problem, with the escaper's energy and the leftover pair's shape as probabilities. The individual path stays unpredictable; the odds are now written down. The stable arrangements are the **hierarchical** ones: a close pair with a distant third, each level looking like a two-body orbit with a small correction. Sun, Earth, Moon. Every triple star that has lasted. Even those have a slow knife: if the outer orbit is tilted more than about 39.2° from the inner one, the **Kozai–Lidov** mechanism trades the tilt for stretch, and the inner pair's orbit swings between round and cigar-shaped over thousands of orbits. That mechanism is now standard equipment in explanations of hot Jupiters and of black-hole pairs that merge. The demo below runs a few hundred random triples in your browser and counts what they did. The percentages on the page are whatever the run produced, computed there and then. Epair, after = Epair, before − Eescaper — Whatever energy the ejected body leaves with comes out of the pair that stays, which pulls them closer together. (A tighter pair is a lower-energy pair, because the energy is negative and grows more so. This is the engine behind hard binaries in star clusters getting harder.) aafter = abefore1 + abeforeΔ · cos icrit = ±√(3/5), i ≈ 39.2° — How much the pair tightens, and the tilt beyond which a distant third body starts stretching the inner orbit. (The second is the Kozai–Lidov threshold. Above it, the inner pair's roundness and its tilt trade back and forth on a long cycle.) teject — heavy tailed — How long the milling-about lasts has no typical value worth quoting: mostly quick, with a long tail of triples that hang on. (Which is why the demo shows the spread rather than an average. An average over a heavy-tailed distribution is a number that describes nothing.) Sources: Stone & Leigh, A statistical solution to the chaotic, non-hierarchical three-body problem (Nature, 2019) ; Hut & Bahcall, Binary–single star scattering (Astrophysical Journal, 1983) ; Wikipedia, Kozai mechanism ; Wikipedia, Gravity assist ; Wikipedia, Hierarchical triple star system ; Wikipedia, Pythagorean three-body problem ## What it is not Five things the phrase 'the three-body problem' gets used for that it does not mean. **It is not unsolvable.** The path exists, it is unique, and it can be computed to as many digits as you are willing to pay for. What does not exist is a closed-form formula of certain kinds — algebraic conserved quantities, single-valued analytic ones — and a usable one in general. 'No formula' and 'no answer' are different claims and only the first one is true. **Chaos is not randomness.** The same start gives the same path every time, exactly. What chaos adds is that nearby starts part company at an exponential rate, so a prediction's useful life is finite. A dice roll has no path; a three-body system has one and you cannot get at it. **Three bodies are not automatically unstable.** Lagrange's triangle holds its shape forever. The figure eight repeats forever. Jupiter's Trojan asteroids have sat at L4 and L5 for billions of years, and the Sun–Earth–Moon arrangement is older than anything that has ever looked at it. **Computers did not solve it.** They step it, which is a different thing, and the stepping has to be audited. Some chaotic triples are not reproducible at ordinary sixteen-digit precision — the figure on the numbers page — so a simulation is a hypothesis with a method attached. **More bodies is not strictly worse.** A galaxy of a hundred billion stars is described well by smooth approximations, because the crowd averages out. Three is the awkward middle: too many for a formula, too few for statistics. Which is why it took two hundred and fifty years and is still producing papers. And the novel is a novel. Liu Cixin's *The Three-Body Problem* takes the name and the chaos seriously enough, and then goes where fiction goes. The planet with three suns in it would be governed by the mathematics on this site; the rest is the book's own. Sources: Wikipedia, Three-body problem ; Wikipedia, Chaos theory ; Boekholt & Portegies Zwart, On the reliability of N-body simulations (2015) ## Orbits - The braided eight: start speeds (0.339407412, 0.536184978) on the line x=(-1,0),(1,0),(0,0) with v3 = -2 v1; period 6.29081877; closes to 1.78e-08; found by the scan on this machine - The figure eight: start speeds (0.347116888, 0.532724945) on the line x=(-1,0),(1,0),(0,0) with v3 = -2 v1; period 6.32591398; closes to 1.48e-08; found here, and published before - The moth: start speeds (0.464445163, 0.396060015) on the line x=(-1,0),(1,0),(0,0) with v3 = -2 v1; period 14.89430474; closes to 4.25e-07; found here, and published before - The lacewing: start speeds (0.181942880, 0.514805998) on the line x=(-1,0),(1,0),(0,0) with v3 = -2 v1; period 18.14136765; closes to 4.88e-08; found by the scan on this machine - The shawl: start speeds (0.189004892, 0.539762453) on the line x=(-1,0),(1,0),(0,0) with v3 = -2 v1; period 19.73539189; closes to 1.05e-07; found by the scan on this machine - The thicket: start speeds (0.327578071, 0.579861680) on the line x=(-1,0),(1,0),(0,0) with v3 = -2 v1; period 29.21293407; closes to 2.06e-07; found by the scan on this machine - The ribbon: start speeds (0.209661505, 0.525702389) on the line x=(-1,0),(1,0),(0,0) with v3 = -2 v1; period 33.86151867; closes to 1.61e-08; found by the scan on this machine - The wide ribbon: start speeds (0.255430936, 0.516385839) on the line x=(-1,0),(1,0),(0,0) with v3 = -2 v1; period 35.04308702; closes to 4.54e-08; found by the scan on this machine - The skein: start speeds (0.254918844, 0.539739712) on the line x=(-1,0),(1,0),(0,0) with v3 = -2 v1; period 37.77007981; closes to 4.70e-08; found by the scan on this machine ## History - 1687 — The law, and the problem in the same book. Newton publishes the inverse-square law, solves two bodies, and then spends Proposition 66 of Book I failing to solve three. Proposition 66 and its twenty-two corollaries work at the Sun–Earth–Moon system by geometry. Newton gets corrections and tendencies, not an orbit. The problem is as old as the law it comes from. Source: Newton, Principia (1687), Gutenberg - 1749 — The Moon's wandering perigee is not a flaw in the law. The Moon's orbit turns twice as fast as Newton's first calculation allowed, and for decades that looked like evidence against inverse-square. Clairaut shows it comes out right if you keep the terms everybody had dropped. Clairaut, Euler and d'Alembert were all working the lunar three-body problem by successive approximation. Clairaut's result — carrying the expansion to higher order doubles the predicted precession — settled that gravity was not at fault, and established approximation as the working method for two hundred years. Source: Wikipedia, Alexis Clairaut - 1767 — Three in a row that keep their spacing. Euler finds the first exact three-body solutions: all three on a line, spinning about the balance point, spacing fixed. The spacing solves a fifth-degree equation with one positive root for any three weights. Euler also set the problem in a rotating frame, which is the move the whole restricted theory is built on. Source: Wikipedia, Euler's three-body problem - 1772 — The equilateral triangle, for any three weights. Lagrange's prize essay on the three-body problem gives the second exact family: three bodies at the corners of an equilateral triangle, holding the shape as they turn. It works for any masses with no equation to solve. Applied to a heavy pair plus a speck, the two triangle corners are L4 and L5, and together with Euler's three collinear points they are the five Lagrange points. Source: Wikipedia, Lagrange point - 1836 — The one quantity the small body cannot change. Jacobi finds a conserved quantity for the restricted problem — the only one it has — and with it the fence that says where a small body can and cannot go. In the rotating frame, twice the effective potential minus the speed squared is constant. Setting the speed to zero draws the zero-velocity curves; the gates in that fence at L1 and L2 are the routes every low-energy spacecraft transfer uses. Source: Wikipedia, Jacobi integral - 1878 — How far a planet's grip reaches. Hill's lunar theory maps the regions of the restricted problem and gives the radius inside which a planet keeps a moon rather than the Sun taking it. The Hill sphere is the everyday consequence: for the Earth about 1.5 million km, with the Moon at a quarter of that. Hill's approach to the lunar problem was still the basis of the American ephemeris well into the twentieth century. Source: Wikipedia, Hill sphere - 1887 — No more conserved quantities of that kind. Bruns proves that beyond the ten classical conserved quantities, the three-body problem has no further ones that are algebraic in the positions, velocities and time. This closed the most popular route to a formula. The ten are the total momentum, the balance point's drift, the energy and the angular momentum — and nothing algebraic joins them. Source: Wikipedia, n-body problem - 1890 — He won the prize, then found his own mistake. Poincaré's entry for King Oscar II's prize wins in 1889. While it is being printed, questions from the editor Lars Phragmén lead him to an error, and the correction is the discovery of chaos. Two curves he had taken to close on each other in fact cross infinitely often, folded into a tangle he declined to draw. He paid for the printed copies to be replaced. The corrected memoir and the three volumes of Méthodes nouvelles de la mécanique céleste that followed are the start of dynamical systems theory — thirty years before anyone could compute a picture of it. Source: Barrow-Green, Poincaré and the Three Body Problem (AMS, 1997) - 1895 — The only way out is a crash. Painlevé proves that for three bodies, the only way a solution can stop existing in finite time is a collision. He also conjectured that with more bodies there would be a finite-time breakdown with no collision in it. That took until 1992. Source: Wikipedia, Painlevé conjecture - 1903 — Smoothing out a collision. Levi-Civita changes variables so that a two-body collision, where the equations divide by zero, becomes something a calculation can pass through. Regularisation is what separates a code that survives a close pass from one that throws a body off the screen. The later Kustaanheimo–Stiefel transformation generalises it and is still in use. Source: Wikipedia, KS transformation - 1906 — The triangle points turn out to be occupied. Wolf finds 588 Achilles, an asteroid sitting near Jupiter's L4 — Lagrange's 1772 triangle, with a rock in it. Over ten thousand Jupiter Trojans are now catalogued at L4 and L5. Lagrange's exact solution stopped being a curiosity and became a census. Source: IAU Minor Planet Center, Jupiter Trojans - 1907 — A three-way crash needs the spin to be exactly zero. Sundman proves that all three bodies can arrive at the same point only if the system's total angular momentum is zero. Give the arrangement the faintest overall spin and a triple collision becomes impossible, not merely unlikely. A single point cannot hold angular momentum, and angular momentum never changes. Source: Wikipedia, n-body problem - 1912 — The formula that exists and cannot be used. Sundman writes a power series in the cube root of time that converges to the three-body answer for all time, whenever the total spin is not zero. So a closed expression does exist. It converges far too slowly to compute with: an estimate by Beloriszky in 1930 puts the terms needed for astronomical accuracy at about 10 to the eight-millionth power. Wang extended the result to any number of bodies in 1991. Source: Diacu, The solution of the n-body problem (1996) - 1913 — Three weights, dropped, and nobody could say what happens. Burrau sets a problem anyone can state: weights of 3, 4 and 5 at rest at the corners of a 3-4-5 triangle. He works it by hand as far as hand-work goes and it gets away from him. It became the standard test case for the whole subject, because it is easy to state, has no arrangement to it, and runs straight into the near-collisions that break a calculation. This site's sandbox opens on it. Source: Wikipedia, Pythagorean three-body problem - 1954 — Some orbits survive being disturbed. The KAM theorem: in a system near an exactly solvable one, most orbits keep their shape under a small disturbance, while the rest go chaotic. Kolmogorov announced it in 1954, Moser proved a version in 1962, Arnold another in 1963. It is why the solar system can be chaotic and stable-looking at once, and why the boundary between the two is a fractal rather than a line. Source: Wikipedia, KAM theorem - 1960 — A body that comes back forever without settling. Sitnikov builds an explicit three-body arrangement whose third body oscillates through the plane of the other two forever, with no pattern and no escape. Two equal masses in an eccentric orbit, the third on the axis through their centre. It became the standard worked example of chaotic motion in celestial mechanics, and the first case where the chaos was proved rather than observed. Source: Wikipedia, Sitnikov problem - 1962 — A tilted outer orbit stretches the inner one. Lidov in 1961 and Kozai in 1962 independently find that a distant third body tilted more than about 39 degrees trades that tilt for eccentricity, cycling the inner pair between round and elongated. Lidov was working on artificial satellites, Kozai on asteroids. The mechanism is now standard in accounts of hot Jupiters, of black-hole pairs driven to merge, and of triple stars that tear themselves apart. Source: Wikipedia, Kozai mechanism - 1967 — Burrau's problem, finished by machine. With a computer and a change of variables that smooths out the close passes, Szebehely and Peters run Burrau's problem to its end: the lightest body is thrown out and the other two are left as a tight pair. Regularisation is what made it possible — without it the near-collisions swallow the accuracy and the answer that comes out is the stepper's. Run here at a fixed step, the same problem ejects the wrong body and gets the energy wrong by a factor of a thousand. Source: Szebehely & Peters, Astronomical Journal 72, 876 (1967) - 1975 — Computers turn the hunt for closed orbits into a survey. With machines to do the stepping, periodic three-body orbits stop being individual discoveries and become catalogued families. The Broucke–Hénon–Hadjidemetriou family is the one that bears their names. The method — scan starting conditions, look for near returns, refine — is the method every later search including this site's uses. Source: Wikipedia, Three-body problem - 1978 — Somebody parks a spacecraft at a point that is not there. ISEE-3 flies the first halo orbit around the Sun–Earth L1 point, a place where nothing sits and where a spacecraft can be made to loop anyway. The orbit was designed by Robert Farquhar. L1 is a saddle, so the loop is not stable and the craft must correct itself — the price of a spot with a permanent view of the Sun. Source: Wikipedia, ISEE-3 / ICE - 1983 — Counting outcomes instead of predicting them. Hut and Bahcall run thousands of binary-plus-intruder encounters and publish the statistics: how often a flyby, an exchange, an ejection. The move from 'what will happen' to 'how often does each ending happen' is what made the chaotic three-body problem useful to astronomy. Star cluster models rest on these cross-sections. Source: Hut & Bahcall, ApJ 268, 319 (1983) - 1992 — Trouble with no crash in it. Xia constructs a five-body solution that ceases to exist in finite time without any two bodies ever touching, settling Painlevé's conjecture. Distances and speeds run away in finite time through a sequence of near passes. Gerver later did it with four bodies. For three, Painlevé's 1895 theorem still holds: a collision is the only way out. Source: Xia, Annals of Mathematics 135 (1992) - 1993 — Three bodies on one figure eight. Searching by computer for closed orbits, Moore finds three equal masses chasing each other around a single figure-eight track. Zero total angular momentum, all three on the same curve, evenly spaced in time. Nobody had suspected it existed. Source: Moore, Physical Review Letters 70, 3675 (1993) - 2000 — The figure eight, proved. Chenciner and Montgomery prove the figure-eight orbit exists — not by solving the equations, but by showing it is the loop of least action with its symmetry. The proof runs on the shape sphere, where a triangle's shape is a point and its size and direction are thrown away. Turning a search for a formula into a search for a minimum is what opened the door to the family hunts that followed. Source: Chenciner & Montgomery, Annals of Mathematics 152 (2000) - 2013 — Thirteen new families in one scan. Scanning a sheet of starting speeds by computer, Šuvakov and Dmitrašinović report thirteen previously unknown families of closed three-body orbits and name them off their shapes: butterfly, moth, yin-yang, goggles. Their starting line — two bodies at ±1 with the same velocity, the third at the origin with twice it the other way, zero spin — is the line this site scans on its Orbits page. Source: Šuvakov & Dmitrašinović, PRL 110, 114301 (2013) - 2015 — A large share of these calculations cannot be reproduced. Running chaotic triples in arbitrary precision and comparing against ordinary double precision, they find that a substantial fraction of the standard calculations are not reproducible. Their code, Brutus, carries as many digits as the problem needs. The finding does not say the simulations are worthless; it says a trajectory is a claim about a calculation, and the claim needs the method attached. Source: Boekholt & Portegies Zwart (2015) - 2017 — Six hundred more, then thousands. With more computing power and higher precision, Li and Liao report over six hundred new families of closed three-body orbits, and more in the years after. Same method as 1993 and 2013, more machine. The catalogue of exact periodic three-body orbits is now large and still growing, which is a strange thing to be able to say about a problem with no formula. Source: Li & Liao (2017) - 2019 — The odds, in closed form. Stone and Leigh derive the probability distribution of outcomes for the chaotic three-body problem — which body leaves, and what the surviving pair looks like. A statistical solution, not a trajectory. The individual path stays out of reach; the bookmaker's answer is now written down. Source: Stone & Leigh, Nature 576 (2019) - 2022 — Living on a saddle. Webb reaches its halo orbit around Sun–Earth L2 in January 2022, a month after launch, and holds station there with small burns. L2 is a saddle point: left alone, the telescope would drift off. The thrusters point only one way by design, so the orbit is trimmed from the sunward side — the three-body problem as an engineering constraint with a launch window attached. Source: NASA, Webb orbit ## Words - action: A total added up along a path: the motion in it minus the pull, summed over the whole trip. Nature's paths make it as small as possible, which is how the figure-eight orbit was proved to exist without solving anything. - angular momentum: How much spin a system has, counted around a chosen point. It never changes, which is why three bodies with any spin at all can never all meet at one place. - barycentre: The balance point of a group of bodies. For two bodies alone it either sits still or coasts in a straight line forever, whatever the two get up to. - central configuration: An arrangement of bodies that can spin without changing shape. For three bodies there are five: three straight lines and two triangles. - chaos: Nearby starts drifting apart at an exponential rate. Not randomness — the same start always gives the same path — but it puts an expiry date on any prediction. - conic section: Circle, ellipse, parabola, hyperbola: the shapes you get by slicing a cone, and exactly the shapes a two-body orbit can take. - conserved quantity: Something about a system that never changes as it moves — energy, momentum, spin. Each one found is one unknown removed. Three bodies have ten and, by Bruns' theorem, no more of the usable kind. - double precision: The sixteen-or-so digits a computer normally carries. Enough for most work, and in a chaotic triple the error in the last digit grows to swamp the first one. - eccentricity: How stretched an orbit is. Zero is a circle, near one is a long cigar, one or more and the body leaves and does not return. - ejection: The usual ending for three bodies thrown together: one leaves for good and the other two are left in a tighter pair. - energy: Motion plus pull, added up. Negative means bound together, positive means the system will come apart. It cannot change, which makes it the audit on any computed orbit. - ephemeris: A table of where the bodies will be, at stated times. What astronomers actually want, and what stepping the equations produces. - figure-eight orbit: Three equal weights chasing one another around a single figure-eight track, with no overall spin. Found by computer in 1993, proved to exist in 2000. - gravitational constant: G, the number that sets how strong gravity is: 6.674 30 × 10⁻¹¹ in metres, kilograms and seconds. The least precisely known of the fundamental constants. - hierarchical triple: A close pair with a distant third body. The stable way to arrange three bodies, and the arrangement of the Sun, the Earth and the Moon. - Hill sphere: How far a planet's grip reaches before the Sun wins. About 1.5 million km for the Earth; the Moon orbits at a quarter of that. - homoclinic tangle: The infinitely folded crossing pattern Poincaré found in 1890 and declined to draw. The first sight of chaos in mathematics. - inverse square: A quantity that falls off as the square of the distance. Twice as far, a quarter as strong. Gravity and light both do it, for the same geometric reason. - Jacobi constant: The one quantity a light third body cannot change in the rotating frame. It fixes which regions the body is shut out of. - KAM theorem: Kolmogorov, Arnold and Moser: in a system close to a solvable one, most orbits keep their shape under small disturbances and the rest go chaotic. Named for all three, proved over nine years. - Kozai–Lidov mechanism: A distant third body tilted more than about 39 degrees trades its tilt for stretch in the inner orbit, cycling it between round and elongated. - Lagrange point: One of five places where a light body can keep station with two heavy ones. L1, L2 and L3 sit on the line through the pair and need correcting; L4 and L5 sit at the triangle corners and hold. - leapfrog: The stepping method that kicks by half a step, drifts a whole step, then kicks again. Cheap, symplectic, and it does not leak energy. Every animation on this site runs it. - Lyapunov time: How long it takes a small error to grow by a factor of about three. The shelf life of a prediction: about five million years for the inner solar system. - n-body problem: The same question for any number of bodies. Two is solved, three is this site, and a hundred billion is a galaxy — which is oddly easier to describe than three. - periodic orbit: A motion that returns to its exact starting positions and speeds and then repeats. Two bodies always do it; three bodies do it only for special starts, of which thousands are now known. - perturbation: Treating a hard problem as an easy one plus a small correction. How the Moon's motion was worked out for two centuries, and how a spacecraft's path is planned. - Poincaré section: Instead of watching the whole path, mark the spot every time it crosses a chosen plane. Order shows up as curves and loops; chaos shows up as a scatter of dots. - reduced mass: The single weight that makes a two-body problem behave like one body: the product of the two divided by their sum. - regularisation: Changing variables so that a collision, where the equations divide by zero, turns into something a calculation can pass through. Levi-Civita, 1903. - restricted three-body problem: The case where the third body is too light to pull back. Two heavy bodies on a known orbit, one speck along for the ride, and enough structure left to draw. - shape sphere: Throw away a triangle's size and which way it points, and what is left — its shape — is a point on a sphere. Collisions sit on the equator; the equilateral triangles are the poles. - singularity: A moment past which a solution stops existing. For three bodies it is always a collision; with five bodies, Xia built one with no collision in it. - softening: Adding a small constant under the distance in the equations so a close pass cannot blow up the arithmetic. A deliberate lie, used where the close passes are not the point. - symplectic: A property of a stepping method: it preserves the geometry of the equations, so energy wobbles instead of drifting. The reason leapfrog beats the obvious method. - Trojan: A body sitting near a planet's L4 or L5 point. Jupiter has over ten thousand catalogued; the Earth has a couple. - two-body problem: Two bodies under gravity. Solved in closed form: an ellipse or its relatives, repeating forever. The only gravitational case with a napkin answer. - zero-velocity curve: The fence drawn by Jacobi's constant: the boundary of where a light body could go if it stopped. It cannot cross, and the gates open in a fixed order as the constant falls.