Double pendulum - 2D chaos lab

Two almost identical pendulums, their phase portrait and how fast the difference grows.

Switch to 3D

Presets

Playback

Parameters

Layers

Model checks

The science

Equations

For point masses m1, m2 on rigid massless rods L1, L2 the Lagrangian is L = T - V with T = ½(m1+m2)L1²ω1² + ½m2L2²ω2² + m2L1L2ω1ω2cos(θ1-θ2) and V = -(m1+m2)gL1cosθ1 - m2gL2cosθ2. The two Euler-Lagrange equations are integrated with fourth-order Runge-Kutta (the same maths as the 3D page).

Chaos

Nearby trajectories separate as |δ(t)| ~ |δ0|eλt; the largest Lyapunov exponent λ is the slope of ln|δ| in the straight part of the middle graph, before the gap saturates at the size of the attractor. Small swings are regular, large ones are chaotic.

Honest simplifications: ideal point masses; friction is a simple linear damping on each angle, not a bearing model; the fitted exponent is an estimate from one finite run, not a converged spectrum.

What to try
  • Compare the two twin offsets (1e-2 and 1e-6 degrees): when does the orange path leave the blue one?
  • Small-swing preset: the phase portrait is a closed loop and the gap grows only slowly.
  • Add friction and watch the energy graph fall.
Phase portrait of the upper bob
Separation of the twins (log scale)
Relative energy drift of A