AI authored to showcase ironpad capabilities.
The double pendulum is one of the simplest physical systems that exhibits chaotic behavior. Two rigid rods connected end-to-end, swinging under gravity — yet the motion is wildly unpredictable.
Instead of tracking forces, we use the Lagrangian L = T - V (kinetic minus potential energy) and derive equations of motion from the Euler–Lagrange equation:
\frac{d}{dt}\frac{\partial L}{\partial \dot{\theta}} - \frac{\partial L}{\partial \theta} = 0
For a double pendulum with masses m_1, m_2 and rod lengths \ell_1, \ell_2, the resulting equations are coupled, nonlinear, and have no closed-form solution — making numerical simulation essential.
Use the sliders below to tune the physical parameters, then watch the simulation respond in real time. The second bob leaves a fading trail that reveals the chaotic trajectory. The energy dashboard monitors KE, PE, and total mechanical energy to verify numerical accuracy.
Integration: 4th-order Runge–Kutta with 10 sub-steps per frame for stability.