Pendulum Phase Portrait
Drag the initial angle to see how the nonlinear pendulum differs from the linear approximation. The phase portrait reveals the system's topology.
Separatrix 🖖
The separatrix is the one trajectory that never quite closes: it's the path a pendulum traces if released from exactly θ = 180° with zero velocity, teetering on the inverted equilibrium forever before finally swinging down. Because the restoring force vanishes exactly at the top, the pendulum needs infinite time to leave it — which is why the exact period computed here (via the elliptic integral K(m)) diverges as θ0 approaches 180°, even though the linear small-angle formula T = 2π√(L/g) stays perfectly finite. Every trajectory inside the separatrix oscillates back and forth; every trajectory outside it — given enough energy — just keeps rotating over the top instead of swinging.
A map of every possible swing 🖖
Instead of watching a pendulum sway over time, a phase portrait plots its angle against its angular velocity. Each point captures the pendulum's complete state at one instant, and following that point traces a single closed loop — one swing repeating forever. The whole diagram shows every possible motion at once, so a gentle wobble and a wide sweep sit as nested loops on the same picture. The bigger the loop, the more energy the pendulum carries.
The period hides Gauss's fastest average 🖖
The exact period equals 2π√(L/g) / M(1, cos(θ₀/2)), where M is the arithmetic-geometric mean — a number Gauss found by repeatedly replacing two values with their ordinary average and their square-root (geometric) average. The two averages rush together with the digit count doubling each step, so three rounds already nail the period. At θ₀ = 90° this yields T = 1.18 × T_linear, the same 18% stretch the elliptic integral gives.
Example problems
- Small Angle (10°) - Small angle: linear approx valid, circular phase orbit
- Large (90°) - 90°: period 18% longer than linear prediction
- Near Top (170°) - 170°: orbit near separatrix, period diverges
- Damped - Damped: spiral inward to equilibrium