Free~25 min · AP Physics 1

My Solar System

Build and simulate your own multi-body solar system

Key equation\vec{F}_{12} = -G\frac{m_1 m_2}{r_{12}^2}\hat{r}_{12}

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.

ProPremium experiment

Unlock My Solar System

Plus 148+ other Pro labs covering AP Physics, Biology, Chemistry, Earth Science, and Math — with unlimited simulation time, advanced parameters, and detailed analytics.

Start 7-day free trial$4.99 / month · cancel anytime
No credit card for trial Cancel in one click Student discount available

What is My Solar System?

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.

Parameters explained

Number of Bodies
How many gravitating objects share the simulation. Two bodies always give a clean ellipse; three or more give the chaotic N-body problem with no analytical solution and exponential sensitivity to initial conditions.
Central Mass(M☉)
Mass of the central body in solar masses. Larger central mass tightens orbits (v_orbit ∝ √M) and stabilizes the system against perturbations from smaller bodies.
Planet Initial Speed(km/s)
Initial speed of the orbiting planet in km/s, applied perpendicular to its radius. Around a 1 M☉ star at 1 AU, ~30 km/s makes a circle; slower launches make eccentric ellipses that dip closer to the star; above about 42 km/s the planet escapes.
Time Scale(×)
Simulation speed multiplier. Real orbital periods are years, so a ×10 to ×100 speedup lets you watch full orbits and long-term perturbations without waiting in real time.

Common misconceptions

  • 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.

How teachers use this lab

  1. Two-body baseline: have students set up a clean Sun-Earth ellipse and verify it repeats exactly each period. Use this as the reference state before introducing chaos.
  2. Misconception probe — 'is N-body just hard, or actually unsolvable?': run two nearly identical 3-body setups with starting positions differing by 0.01 AU. Watch them diverge after a few orbits to make exponential sensitivity tangible.
  3. Build a binary star: place two equal masses with equal-and-opposite velocities and observe them orbit a fictitious midpoint. Then drop a small planet far away and ask whether it orbits one star, the other, or both.
  4. Replicate the figure-8 three-body orbit: three equal masses with carefully chosen tangential velocities trace a single figure-8. This is one of the few known stable 3-body solutions and it stuns students.
  5. Jupiter-effect data: with Sun + Earth set up steadily, add Jupiter and have students record Earth's perihelion and aphelion every simulated year for 50 years to see the slow drift driven by gravitational perturbations.

Frequently asked questions

Why is the three-body problem fundamentally harder than the two-body problem?

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.

What makes our Solar System stable enough to last 4.6 billion years if N-body chaos is real?

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.

Why does adding a body sometimes eject one of the others?

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.

How does this connect to AP Physics 1 standards 2.B.1 and 3.G.1 and NGSS HS-ESS1-4?

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.

Can I build a stable three-planet system around one star?

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.