Overview
The double pendulum is one of the simplest systems that produces chaos. I derived its equations of motion from the Euler–Lagrange equation and solved the resulting non-linear ODEs numerically in Python to explore how chaotic it really is.
Time-to-flip fractal
This plot maps every starting position of both pendulums against how long it takes the second pendulum to flip over. The result is a fractal, a signature of chaos. The black region marks starting positions without enough energy for the second pendulum to ever flip.
Sensitivity to initial conditions
I ran 200 simulations with initial angles varying by one billionth of a radian. The trajectories stay synchronized for roughly 40–45 seconds, then diverge completely. By 60 seconds the system is fully chaotic.
To put into perspective how small 1e-9 rad is, if you shined two lasers at the moon seperated by 1e-9 rad, the distance between them would be just over a foot.
Method
- Derived the equations of motion with Lagrangian mechanics (full derivation typeset in LaTeX)
- Solved the coupled non-linear ODEs numerically in Python
- Swept initial conditions to map flip times and divergence behavior