← SciSim / Physics

Kepler's Laws & Orbital Mechanics

Astrophysics #66
1Interactive Simulation
Ready
a
--AU
e
--
T
--yr
v
--km/s
r
--AU
E
--MJ/kg
Orbital Parameters
Semi-major axis a1.5 AU
Eccentricity e0.4
Star mass M1.0 M☉
Speed multiplier1.0 ×
Display
2The Idea, Step by Step

Tie a ball to a string and whirl it around your head — it traces a circle, held in by the string. A planet does almost the same thing around the Sun, except the "string" is invisible gravity and the path isn't a perfect circle but a gently squashed one called an ellipse. Four hundred years ago Johannes Kepler stared at years of Mars measurements and pulled out three startlingly simple rules that every orbit obeys.

Law I — the shape. Orbits are ellipses, and the Sun sits at one focus, not at the centre. How squashed the ellipse is depends on one number, the eccentricity $e$: $e=0$ is a perfect circle, and values closer to $1$ are more stretched out. The overall size is set by the semi-major axis $a$ — half the longest way across.

Law II — the pace. Draw a line from the Sun to the planet. In any fixed slice of time that line sweeps out the same area, no matter where the planet is. To cover the same area while close to the Sun, the planet must race; far away, it can dawdle. So planets move fastest at perihelion (closest) and slowest at aphelion (farthest).

Law III — the timing. The farther a planet, the longer its year — and the relationship is wonderfully exact. With the period $T$ measured in years and $a$ in astronomical units (AU, the Earth–Sun distance), $T^2 = a^3$. Try Mars: it orbits at $a\approx 1.52$ AU, so $T=\sqrt{1.52^3}=\sqrt{3.51}\approx 1.88$ years — and a real Martian year is about 687 days. The rule nails it.

The Three Laws, Precisely
$$r(\theta)=\frac{a(1-e^2)}{1+e\cos\theta},\qquad \frac{dA}{dt}=\frac{L}{2m}=\text{const},\qquad T^2=\frac{4\pi^2}{GM}\,a^3$$

The deeper statements above all flow from one source: gravity is an inverse-square central force, so a body's angular momentum $L$ and total energy $E$ stay constant. Constant $L$ is Law II. Constant $E=-GMm/(2a)$ means the energy — and therefore the period — depends only on $a$, not on how stretched the orbit is. The full third law carries a constant $4\pi^2/GM$ that depends only on the central mass $M$, which is exactly why timing an orbit lets astronomers weigh a star. In the sim, the sliders map straight onto these: $a$ sets the orbit's size, $e$ its shape, and $M$ the Sun's mass (heavier star → stronger pull → shorter period).

Try this in the sim above: set $e=0$ and watch the orbit snap into a perfect circle, then push $e$ to $0.8$ and see how lopsided it gets and how the planet sprints through perihelion. Switch to Law II — Equal Areas and notice the shaded wedge keeps the same area even as the planet's speed changes. Open Solar System and check that the farther planets really do take dramatically longer years, with $T^2$ tracking $a^3$.

3Equation Derivation
Kepler's First Law
$$r(\theta) = \frac{a(1-e^2)}{1+e\cos\theta}$$
Kepler's Second Law
$$\frac{dA}{dt} = \frac{L}{2m} = \text{constant}$$
Kepler's Third Law
$$T^2 = \frac{4\pi^2}{GM}\,a^3$$

Symbol Definitions

SymbolMeaningSI Unit
$a$Semi-major axism (or AU)
$e$Eccentricity (0 = circle, →1 = parabola)dimensionless
$\theta$True anomaly (angle from perihelion)rad
$r$Distance from focus (star)m
$T$Orbital periods (or yr)
$M$Mass of central bodykg
$L$Angular momentum of orbiting bodykg m² s⁻¹
$G$Gravitational constant 6.674×10⁻¹¹N m² kg⁻²
1
From central force to conic. Newton's law of gravitation $\vec{F}=-GMm\hat{r}/r^2$ is a central, inverse-square force. Conservation of angular momentum $\vec{L}=\vec{r}\times m\vec{v}$ confines motion to a plane.
2
Orbit equation. Using the substitution $u=1/r$ in the radial equation of motion and integrating, one obtains the conic-section solution $r=p/(1+e\cos\theta)$ where $p=L^2/(GMm^2)=a(1-e^2)$. This proves Law I: planets trace ellipses with the Sun at one focus.
3
Areal velocity. In time $dt$ the radius vector sweeps area $dA=\tfrac{1}{2}r^2\,d\theta$. Since $L=mr^2\dot\theta$ is conserved, $dA/dt=L/(2m)=$ const. This is Law II: equal areas in equal times — planets move faster at perihelion, slower at aphelion.
4
Period from area. Total area of an ellipse is $\pi ab$ where $b=a\sqrt{1-e^2}$. Since $dA/dt=$ const, $T=\pi ab/(L/2m)=2\pi m a^2\sqrt{1-e^2}/L$. Substituting $L^2=GMm^2 a(1-e^2)$ gives $T^2=(4\pi^2/GM)a^3$, which is Law III.
5
Mapping to the simulation. Slider a (AU) sets the semi-major axis; e sets eccentricity. The simulation integrates Newton's equations using a symplectic leapfrog method, so the orbit closes and energy is conserved over many revolutions. Speed and radius readouts are computed from the live state, while $T$ uses Kepler III directly for verification.
Primary references: Halliday, Resnick & Walker 10th Ed., Ch. 13; Kleppner & Kolenkow 2nd Ed., Ch. 10; HyperPhysics — Kepler's Laws.
4Frequently Asked Questions
💡 Concept Why are orbits ellipses rather than circles?

An ellipse is the most general bound trajectory under an inverse-square attractive force. A circle is just the special case $e=0$ where the radial velocity happens to be zero everywhere. Any small perturbation gives the orbit a non-zero eccentricity. Mathematically, the conic section $r=p/(1+e\cos\theta)$ with $0\le e<1$ describes ellipses; only one specific energy gives $e=0$.

Key: Circular orbits are a measure-zero subset; ellipses cover the generic bound case.
🎯 Simulation What exactly is the simulation showing?

It integrates the two-body problem in real time. The colored ellipse is the actual computed trajectory. The translucent triangle (Law II mode) sweeps out an area as the planet moves — equal areas in equal times even though the planet moves faster near the star. In Law III mode, multiple planets at different $a$ values demonstrate $T^2\propto a^3$. Live readouts show $r$, $v$, total energy, and $T$ from the analytical Kepler III formula.

Key: Live two-body integration with conserved energy and angular momentum.
🌍 Real Life Where do Kepler's laws appear in real life?

Every artificial satellite (GPS, ISS, geostationary) and natural body (planets, moons, asteroids) obeys Kepler's laws. Engineers use Law III to design transfer orbits — Hohmann transfers between Earth and Mars rely directly on $T^2\propto a^3$. Binary star systems are used to weigh stars by measuring $T$ and $a$. Exoplanet detection via transit timing and radial velocity uses Kepler's laws in reverse.

Key: GPS, satellite design, exoplanet detection, and stellar mass measurements all use Kepler's laws.
🔬 Non-Obvious If gravity is always attractive, why doesn't the planet just fall into the star?

Because the planet has angular momentum. The radial equation of motion contains an effective potential $V_\text{eff}(r)=-GMm/r+L^2/(2mr^2)$. The second term is a centrifugal barrier that prevents $r\to0$ for any non-zero $L$. The planet oscillates between $r_\text{min}=a(1-e)$ (perihelion) and $r_\text{max}=a(1+e)$ (aphelion).

Key: Angular momentum creates a centrifugal barrier preventing collapse; orbits are bounded oscillations in $r$.
📐 Mathematical What is the speed at perihelion and aphelion?

From conservation of energy $E=\tfrac{1}{2}mv^2-GMm/r=-GMm/(2a)$ and angular momentum $L=mvr$ at the apsides (where $\vec{v}\perp\vec{r}$): $v_\text{peri}=\sqrt{GM(1+e)/[a(1-e)]}$ and $v_\text{aph}=\sqrt{GM(1-e)/[a(1+e)]}$. Their ratio is $v_\text{peri}/v_\text{aph}=(1+e)/(1-e)$ — Earth's eccentricity $e\approx0.0167$ gives a 3.4% speed variation over a year.

Key: $v_\text{peri}/v_\text{aph}=(1+e)/(1-e)$; speed varies inversely with distance.
🧠 Deep Does Kepler's Third Law work everywhere — or only in our solar system?

$T^2\propto a^3$ holds for any inverse-square central force, regardless of system. The proportionality constant $4\pi^2/(GM)$ depends on the central mass, so different stars have different constants. In binary systems, both bodies orbit the common centre of mass and the law uses $M_1+M_2$. General relativity introduces small corrections (Mercury's perihelion precession of 43 arcsec/century).

Key: Universal for inverse-square forces; constant depends on central mass; small GR corrections at high gravity.
Explanatory resources: Halliday, Resnick & Walker 10th Ed., Ch. 13; Kleppner & Kolenkow 2nd Ed., Ch. 10; HyperPhysics — Kepler's Laws.
5Common Misconceptions
❌ Misconception: Planets move faster when they are closer to the Sun because the Sun's gravity is stronger there.
✅ Correction: The increased gravitational force at perihelion does increase the radial component of acceleration, but the speed-up is fundamentally a consequence of energy conservation: $\tfrac{1}{2}v^2-GM/r=$ const, so smaller $r$ means larger $v$. Equivalently, angular momentum conservation $L=mvr\sin\phi$ requires $v$ to grow as $r$ shrinks. Causation runs through the conservation laws, not directly through the force.
📖 Reference: HRW 10th Ed., §13-7; Kleppner & Kolenkow, 2nd Ed., §10.4.
❌ Misconception: Kepler's Third Law $T^2\propto a^3$ uses the orbital radius.
✅ Correction: It uses the semi-major axis $a$, not the radius — there is no single radius for an ellipse. For a circular orbit they coincide, which is why the distinction is often glossed over in introductory texts. For high-eccentricity orbits (comets, transfer orbits) using the wrong quantity gives wildly wrong periods.
📖 Reference: Halliday, Resnick & Walker, 10th Ed., §13-7; Marion & Thornton, §8.7.
❌ Misconception: The Sun is at the centre of each planet's orbit.
✅ Correction: The Sun is at one focus of the ellipse, not the centre. The geometric centre of the ellipse is offset from the focus by $ae$. For Earth $e\approx0.017$, so the offset is small; for Mercury $e\approx0.21$, it is substantial. More precisely, both Sun and planet orbit their common centre of mass.
📖 Reference: Kepler — Astronomia Nova (1609); HRW 10th Ed., §13-7.
❌ Misconception: In an elliptical orbit, the planet's total energy varies — it has more energy at perihelion.
✅ Correction: Total mechanical energy $E=\tfrac{1}{2}mv^2-GMm/r=-GMm/(2a)$ is constant throughout the orbit. Kinetic energy is higher at perihelion and potential energy is more negative there, but they exactly compensate. Energy depends only on the semi-major axis $a$, not on $e$ or position.
📖 Reference: Kleppner & Kolenkow 2nd Ed., §10.5; Goldstein — Classical Mechanics, §3.7.
❌ Misconception: A geostationary satellite is stationary because it has no velocity.
✅ Correction: A geostationary satellite moves at about 3.07 km/s. It appears stationary only because its 24-hour orbital period matches Earth's rotation. The required orbital radius (≈42 164 km from Earth's centre) follows directly from Kepler III with $T=86\,164$ s.
📖 Reference: HRW 10th Ed., §13-7, Sample Problem 13.10.
Misconception research: Arons — A Guide to Introductory Physics Teaching, Wiley 1990; Bar et al. (1994), Sci. Educ. 78, 149.