We consider a double pendulum with two masses m_{1} and m_{2} connected by rigid (massless) wires of l_{1} and l_{2}. As illustrated below, the angles formed by the wires are denoted by θ_{1} and θ_{2}:
Letting the position of the two masses be denoted by (x_{1}, y_{1}) and (x_{2}, y_{2}) it is easy to see that:
Now, letting g denote gravity, it follows that the potential energy is given by:
Further, letting v_{1} and v_{2} denote the velocities of m_{1} and m_{2} respectively, the kinetic energy is given by:
The difference between the total kinetic energy and the total potential energy, called the Lagrangian, is defined as L = T  V. Therefore:
This leads to the following (EulerLagrange) differential equations:
Downloads: Video (640x480, WMV, 10Mb) Video (640x480, AVI, 21Mb) Video (320x240, MPG, 8Mb) 
