Build and simulate your own multi-body solar system
The N-body gravitational problem involves calculating the motion of multiple masses under mutual gravitational attraction. For 2 bodies, exact analytical solutions exist (elliptical orbits). For 3+ bodies, the problem is generally chaotic — tiny changes in initial conditions lead to wildly different outcomes over time. Real solar systems are stabilized by large mass ratios (Sun >> planets) and widely spaced orbits.
Plus 148+ other Pro labs covering AP Physics, Biology, Chemistry, Earth Science, and Math — with unlimited simulation time, advanced parameters, and detailed analytics.
Already have an account?
Sign in →Real solar systems are messy. The Sun pulls Earth, Earth pulls the Moon, Jupiter pulls Earth a little, and the whole apparatus has been wobbling for 4.6 billion years. This lab lets you build that mess from scratch. Drop in a central star, add a planet, give it a velocity, and watch a clean two-body ellipse form. Now add a third body and everything changes — orbits start to wobble, drift, or in extreme cases fling one body away entirely. The two-body problem has a closed-form solution; the three-body problem doesn't, and never will — a deep mathematical fact proved by Poincaré. By tuning masses, separations, and initial velocities you'll see chaos appear, watch binary stars trade angular momentum, and discover why our own Solar System looks so orderly: huge mass ratios and wide orbital spacing keep perturbations small.
MisconceptionIf two-body orbits have an exact solution, three-body orbits do too — we just have not solved them yet.
CorrectThe general three-body problem has no closed-form analytical solution and never will. Poincaré proved it in 1887. Specific symmetric configurations (like the figure-8 orbit) have solutions, but the generic case is provably chaotic and only solvable numerically.
MisconceptionIf I add Jupiter to a Sun-Earth system, Earth's orbit stays exactly the same because Jupiter is so far away.
CorrectJupiter actually does perturb Earth's orbit — measurable shifts in eccentricity over thousands of years drive ice ages (Milankovitch cycles). The simulation can show this directly: add a Jupiter-mass body and watch Earth's orbit slowly precess.
MisconceptionBinary star systems are unstable because two stars pull each other in random directions.
CorrectTwo-body binary stars are perfectly stable — they orbit their common center of mass on stable ellipses forever (in pure Newtonian gravity). Instability shows up only when a third body enters the system.
MisconceptionIn a chaotic three-body system, the bodies move randomly with no pattern.
CorrectChaos is not randomness. The bodies follow Newton's laws deterministically at every step — but tiny changes in starting conditions grow exponentially, so long-term prediction is practically impossible. Short-term behavior is still smooth and lawful.
Two bodies have only one separation vector, and the equations of motion reduce to a single conserved-energy, conserved-angular-momentum problem with a closed-form solution (Kepler ellipses). Three bodies have three separation vectors and not enough conservation laws to pin down the motion. Poincaré showed in the 1880s that the resulting equations are non-integrable and exhibit chaotic behavior, so generic 3-body orbits cannot be written as a finite formula. Modern N-body simulations get around this by stepping forward numerically with tiny time intervals.
Three things: a huge mass ratio (the Sun has 99.86% of all Solar System mass), wide orbital spacing (so planets perturb each other only weakly), and resonance avoidance (planet periods are not in low-integer ratios that would amplify perturbations). The Solar System is technically chaotic, with a Lyapunov time around 5 million years, but that chaos manifests as small drifts in orbital elements rather than catastrophic ejections. We are essentially riding a marginally stable arrangement.
In an unstable three-body interaction, gravitational slingshots can transfer enough kinetic energy to one body to exceed local escape velocity, sending it flying away while the remaining two settle into a tighter binary. This 'three-body break-up' is the most common end state for compact triples. You can reproduce it in the simulator with three equal masses placed close together — the system almost always ejects one and leaves a binary behind.
Standard 2.B.1 covers gravitational fields from one or more source masses; the N-body view extends that to fields produced by all bodies acting on each other. Standard 3.G.1 covers gravitational interactions between two objects, which the lab generalizes to systems where every pair of objects interacts simultaneously. NGSS HS-ESS1-4 asks for mathematical or computational models of orbital motion — exactly what an N-body integrator is. Use this lab when students are ready to push past textbook two-body idealizations.
Yes, if the planet masses are small compared to the star and the orbits are widely spaced. Try a 1 M☉ star with planets at 1, 2.5, and 6 AU — the system will run cleanly for many orbits. Pack the planets too close (say 1, 1.2, 1.5 AU) and mutual perturbations will destabilize the system within a few orbits, which is itself a great lesson on why real exoplanet systems tend to space themselves out.