Lessons · gravitation
Elliptical orbits: Kepler's laws fall out of the inverse-square law
Regime 2 — calculus does what algebra cannot. The acceleration isn't constant, so the algebra formulas don't apply; calculus is the only road in, and SymPy proves the closed form solves the equation of motion.
A real orbit is not a circle but an ellipse with the planet at one focus ( m³/s², semi-major axis m). The satellite races through its closest point (perihelion) and crawls at its farthest (aphelion). There is no algebra formula for where it is at time — so the path is integrated numerically from , and SymPy checks it conserves energy and angular momentum. Slide the eccentricity from a circle to a long ellipse: the shape changes completely, but because every orbit shares the same semi-major axis, they all take the same time to go around — Kepler's third law.
The same inverse-square law, but now the radius varies, so there is no elementary time-parameterisation (Kepler's equation is transcendental). Step the position and velocity forward with RK4 from perihelion. The producer checks the result conserves energy and angular momentum and that the orbit closes — verification, for a numerical solution.
integrate by RK4; check energy and angular momentum are conserved; check the orbit closes; same same
- ✓ The specific energy is conserved along the orbit (max relative drift ). [numeric]
- ✓ The angular momentum is conserved (max relative drift ) — Kepler's second law: the line to the body sweeps equal areas in equal times. [numeric]
- ✓ After one period the path returns to its start (gap ) — a closed ellipse (Kepler's first law). [numeric]
- ✓ Every orbit shares the semi-major axis , so all have the same period — Kepler's third law depends on , not the shape. [numeric]
Dimensional homogeneity: checked by SymPy (holds).
Neither is true. By Kepler's second law (angular momentum is conserved), the planet sweeps equal areas in equal times — so it moves fastest at perihelion and slowest at aphelion; at it is three times faster at its closest point than its farthest. And by Kepler's third law the period depends only on the semi-major axis , not the eccentricity: a circle and a long thin ellipse with the same take exactly the same time to go around. Slide the eccentricity and watch the shape stretch while the period stays put.
Modeling assumptions — author-asserted, disclosed not discharged
- Two-body problem: a point (or spherical) planet far more massive than the satellite, whose mass cancels; no other bodies, no drag.
- All orbits share the semi-major axis (so the same period), and stay above the planet's surface (perihelion m even at ).
The trajectory, fully annotated
A static rendering (Matplotlib) at the default launch — the path y vs x, with the apex and range marked. The interactive version with launch-angle and speed sliders is in the Graph tab above.
Formulas used
Hover a formula to preview its reference entry; click to open it in the reference (or the concept graph):
- Kepler's third law (circular orbit)
Valid when: circular orbit; the orbiting mass cancels; T² = 4π²R³/GM — the period squared scales as the radius cubed
Open in reference →
- Circular orbital speed
Valid when: circular orbit; central body of mass M; the orbiting mass cancels; gravity supplies the centripetal force, GM/R² = v²/R
Open in reference →
- Newton's law of universal gravitation
Valid when: point masses (or spherical bodies); magnitude of the attractive force
Open in reference →
- Angular momentum (rigid body)
Valid when: rotation about a fixed axis
Open in reference →