Equations of motion, from the Lagrangian L = T − V:
θ1 = −g(2m1+m2) sin θ1 − m2 g sin(θ1−2θ2) − 2 sin Δ · m2(θ22ℓ2 + θ12ℓ1 cos Δ)ℓ1(2m1 + m2 − m2 cos 2Δ)
θ2 = 2 sin Δ · (θ12ℓ1(m1+m2) + g(m1+m2) cos θ1 + θ22ℓ2m2 cos Δ)ℓ2(2m1 + m2 − m2 cos 2Δ)
where Δ = θ1 − θ2, damping −γθi
Integrated with fourth-order Runge–Kutta:
yn+1 = yn + h6(k1 + 2k2 + 2k3 + k4)
Two systems separated by 0.001 rad in θ₁ diverge exponentially — the signature of deterministic chaos. Watch Δbob grow from millimetres to metres in seconds.