Sketch · 2026-05-20
Double pendulum, with a perturbed twin.
Two double pendulums are released from the same angle. The amber one starts one-thousandth of a radian away from the ink one — a difference too small to draw at this size. The two systems share their equations of motion and almost all of their initial state. Within a few swings their bobs are nowhere near each other.
The system
Each pendulum is two equal rods of length one joined at the pivot, with equal unit masses at each joint. The angles θ₁ and θ₂ are measured from straight down. The Lagrangian L = T − U gives a pair of coupled second-order ODEs; the explicit form is on the Wikipedia article "Double pendulum". A fourth-order Runge-Kutta integrator advances the four-component state (θ₁, ω₁, θ₂, ω₂) by 0.005 seconds per substep, four substeps per drawn frame.
Why it diverges
The double pendulum is one of the cleanest examples of deterministic chaos in undergraduate physics. Above a few degrees of amplitude its largest Lyapunov exponent is positive, so two trajectories that start near each other in phase space move apart roughly exponentially in time. The 10⁻³ radian gap between the two pendulums shown here doubles in something like a second of simulated time, and keeps doubling until it saturates near π. After that the two systems are uncorrelated.
A note on energy
The total energy of an ideal double pendulum is conserved exactly. The RK4 integrator at this step size drifts by a fraction of a percent per minute of simulation, which is invisible at the scale of the picture. It does mean the chaos you see is not the pure mathematical thing: the integrator is itself a small perturbation on top of the deliberate one.