Double pendulum Lagrangian (source code)

= Double pendulum Lagrangian

The kinetic energy contains the coupling $ml_1l_2\cos(\theta_1-\theta_2)\dot\theta_1\dot\theta_2$, while gravity supplies one cosine potential for each mass height.