1The double pendulum
Two rods of 1 m and two bobs of 1 kg, with no friction. Lagrange's method turns the energy of the swing into two equations for the angular accelerations. They are completely deterministic: give the same θ₁, θ₂, ω₁ and ω₂ and you get the same future every time.
The catch is the coupling. The second rod is flung around by the first and tugs back on it, and the sin(θ₁ − θ₂) terms make every small difference feed on itself. At small angles the pendulum is nearly two linked simple pendulums and stays calm; start it above about 90° and it tumbles.
Energy has to stay fixed, so it doubles as a check on the integrator below.
θ₁″ = [−3g sin θ₁ − g sin(θ₁ − 2θ₂) − 2 sin Δ (ω₂² + ω₁² cos Δ)] / (3 − cos 2Δ)Δ = θ₁ − θ₂, g = 9.81 m/s², equal masses and lengthsθ₁ = …, ω₁ = … → θ₁″ = …
θ₂″ = 2 sin Δ (2ω₁² + 2g cos θ₁ + ω₂² cos Δ) / (3 − cos 2Δ)the second bobθ₂ = …, ω₂ = … → θ₂″ = …
E = ω₁² + ½ω₂² + ω₁ω₂ cos Δ − 2g cos θ₁ − g cos θ₂kinetic plus potential energy, in joulesE = …, drift since release …