# Double pendulum

In physics and mathematics, in the area of dynamical systems, a double pendulum, also known as a chaotic pendulum, is a pendulum with another pendulum attached to its end, forming a simple physical system that exhibits rich dynamic behavior with a strong sensitivity to initial conditions. The motion of a double pendulum is governed by a pair of coupled ordinary differential equations and is chaotic.

## Analysis and interpretation

Several variants of the double pendulum may be considered; the two limbs may be of equal or unequal lengths and masses, they may be simple pendulums or compound pendulums (also called complex pendulums) and the motion may be in three dimensions or restricted to the vertical plane. In the following analysis, the limbs are taken to be identical compound pendulums of length ℓ and mass m, and the motion is restricted to two dimensions.
In a compound pendulum, the mass is distributed along its length. If the double pendulum mass is evenly distributed, then the center of mass of each limb is at its midpoint, and the limb has a moment of inertia of I = ⁠1/12⁠mℓ$^2$ about that point.
It is convenient to use the angles between each limb and the vertical as the generalized coordinates defining the configuration of the system. These angles are denoted θ$_1$ and θ$_2$. The position of the center of mass of each rod may be written in terms of these two coordinates. If the origin of the Cartesian coordinate system is taken to be at the point of suspension of the first pendulum, then the center of mass of this pendulum is at:${\begin{aligned}x_{1}&={\tfrac {1}{2}}\ell \sin \theta _{1}\\y_{1}&=-{\tfrac {1}{2}}\ell \cos \theta _{1}\end{aligned}}$
and the center of mass of the second pendulum is at ${\begin{aligned}x_{2}&=\ell \left(\sin \theta _{1}+{\tfrac {1}{2}}\sin \theta _{2}\right)\\y_{2}&=-\ell \left(\cos \theta _{1}+{\tfrac {1}{2}}\cos \theta _{2}\right)\end{aligned}}$ This is enough information to write out the Lagrangian.

### Lagrangian

The Lagrangian is given by ${\begin{aligned}L&={\text{kinetic energy}}-{\text{potential energy}}\\&={\tfrac {1}{2}}m\left(v_{1}^{2}+v_{2}^{2}\right)+{\tfrac {1}{2}}I\left({\dot {\theta }}_{1}^{2}+{\dot {\theta }}_{2}^{2}\right)-mg\left(y_{1}+y_{2}\right)\\&={\tfrac {1}{2}}m\left({\dot {x}}_{1}^{2}+{\dot {y}}_{1}^{2}+{\dot {x}}_{2}^{2}+{\dot {y}}_{2}^{2}\right)+{\tfrac {1}{2}}I\left({\dot {\theta }}_{1}^{2}+{\dot {\theta }}_{2}^{2}\right)-mg\left(y_{1}+y_{2}\right)\end{aligned}}$ The first term is the linear kinetic energy of the center of mass of the bodies and the second term is the rotational kinetic energy around the center of mass of each rod. The last term is the potential energy of the bodies in a uniform gravitational field. The dot-notation indicates the time derivative of the variable in question.
Using the values of $x_{1}$ and $y_{1}$ defined above, we have ${\begin{aligned}{\dot {x}}_{1}&={\dot {\theta }}_{1}\left({\tfrac {1}{2}}\ell \cos \theta _{1}\right)\\[1ex]{\dot {y}}_{1}&={\dot {\theta }}_{1}\left({\tfrac {1}{2}}\ell \sin \theta _{1}\right)\end{aligned}}$ which leads to $v_{1}^{2}={\dot {x}}_{1}^{2}+{\dot {y}}_{1}^{2}={\tfrac {1}{4}}{\dot {\theta }}_{1}^{2}\ell ^{2}\left(\cos ^{2}\theta _{1}+\sin ^{2}\theta _{1}\right)={\tfrac {1}{4}}\ell ^{2}{\dot {\theta }}_{1}^{2}.$
Similarly, for $x_{2}$ and $y_{2}$ we have ${\begin{aligned}{\dot {x}}_{2}&=\ell \left({\dot {\theta }}_{1}\cos \theta _{1}+{\tfrac {1}{2}}{\dot {\theta }}_{2}\cos \theta _{2}\right)\\{\dot {y}}_{2}&=\ell \left({\dot {\theta }}_{1}\sin \theta _{1}+{\tfrac {1}{2}}{\dot {\theta }}_{2}\sin \theta _{2}\right)\end{aligned}}$
and therefore
${\begin{aligned}v_{2}^{2}&={\dot {x}}_{2}^{2}+{\dot {y}}_{2}^{2}\\[1ex]&=\ell ^{2}\left({\dot {\theta }}_{1}^{2}\cos ^{2}\theta _{1}+{\dot {\theta }}_{1}^{2}\sin ^{2}\theta _{1}+{\tfrac {1}{4}}{\dot {\theta }}_{2}^{2}\cos ^{2}\theta _{2}+{\tfrac {1}{4}}{\dot {\theta }}_{2}^{2}\sin ^{2}\theta _{2}+{\dot {\theta }}_{1}{\dot {\theta }}_{2}\cos \theta _{1}\cos \theta _{2}+{\dot {\theta }}_{1}{\dot {\theta }}_{2}\sin \theta _{1}\sin \theta _{2}\right)\\[1ex]&=\ell ^{2}\left({\dot {\theta }}_{1}^{2}+{\tfrac {1}{4}}{\dot {\theta }}_{2}^{2}+{\dot {\theta }}_{1}{\dot {\theta }}_{2}\cos \left(\theta _{1}-\theta _{2}\right)\right).\end{aligned}}$
Substituting the coordinates above into the definition of the Lagrangian, and rearranging the equation, gives ${\begin{aligned}L&={\tfrac {1}{2}}m\ell ^{2}\left({\dot {\theta }}_{1}^{2}+{\tfrac {1}{4}}{\dot {\theta }}_{1}^{2}+{\tfrac {1}{4}}{\dot {\theta }}_{2}^{2}+{\dot {\theta }}_{1}{\dot {\theta }}_{2}\cos \left(\theta _{1}-\theta _{2}\right)\right)+{\tfrac {1}{24}}m\ell ^{2}\left({\dot {\theta }}_{1}^{2}+{\dot {\theta }}_{2}^{2}\right)-mg\left(y_{1}+y_{2}\right)\\[1ex]&={\tfrac {1}{6}}m\ell ^{2}\left({\dot {\theta }}_{2}^{2}+4{\dot {\theta }}_{1}^{2}+3{{\dot {\theta }}_{1}}{{\dot {\theta }}_{2}}\cos(\theta _{1}-\theta _{2})\right)+{\tfrac {1}{2}}mg\ell \left(3\cos \theta _{1}+\cos \theta _{2}\right).\end{aligned}}$
The equations of motion can now be derived using the Euler–Lagrange equations, which are given by ${\frac {d}{dt}}{\frac {\partial L}{\partial {\dot {\theta }}_{i}}}-{\frac {\partial L}{\partial \theta _{i}}}=0,\quad i=1,2.$ We begin with the equation of motion for $\theta _{1}$. The derivatives of the Lagrangian are given by ${\frac {\partial L}{\partial \theta _{1}}}=-{\tfrac {1}{2}}m\ell ^{2}{\dot {\theta }}_{1}{\dot {\theta }}_{2}\sin(\theta _{1}-\theta _{2})-{\tfrac {3}{2}}mg\ell \sin \theta _{1}$ and ${\frac {\partial L}{\partial {\dot {\theta }}_{1}}}={\tfrac {4}{3}}m\ell ^{2}{\dot {\theta }}_{1}+{\tfrac {1}{2}}m\ell ^{2}{\dot {\theta }}_{2}\cos(\theta _{1}-\theta _{2}).$ Thus ${\frac {d}{dt}}{\frac {\partial L}{\partial {\dot {\theta }}_{1}}}={\tfrac {4}{3}}m\ell ^{2}{\ddot {\theta }}_{1}+{\tfrac {1}{2}}m\ell ^{2}{\ddot {\theta }}_{2}\cos(\theta _{1}-\theta _{2})-{\tfrac {1}{2}}m\ell ^{2}{\dot {\theta }}_{2}({\dot {\theta }}_{1}-{\dot {\theta }}_{2})\sin(\theta _{1}-\theta _{2}).$ Combining these results and simplifying yields the first equation of motion, ${\tfrac {4}{3}}\ell {\ddot {\theta }}_{1}+{\tfrac {1}{2}}\ell {\ddot {\theta }}_{2}\cos(\theta _{1}-\theta _{2})+{\tfrac {1}{2}}\ell {\dot {\theta }}_{2}^{2}\sin(\theta _{1}-\theta _{2})+{\tfrac {3}{2}}g\sin \theta _{1}=0.$
Similarly, the derivatives of the Lagrangian with respect to $\theta _{2}$ and ${\dot {\theta }}_{2}$ are given by ${\frac {\partial L}{\partial \theta _{2}}}={\tfrac {1}{2}}m\ell ^{2}{\dot {\theta }}_{1}{\dot {\theta }}_{2}\sin(\theta _{1}-\theta _{2})-{\tfrac {1}{2}}mg\ell \sin \theta _{2}$ and ${\frac {\partial L}{\partial {\dot {\theta }}_{2}}}={\tfrac {1}{3}}m\ell ^{2}{\dot {\theta }}_{2}+{\tfrac {1}{2}}m\ell ^{2}{\dot {\theta }}_{1}\cos(\theta _{1}-\theta _{2}).$ Thus ${\frac {d}{dt}}{\frac {\partial L}{\partial {\dot {\theta }}_{2}}}={\tfrac {1}{3}}m\ell ^{2}{\ddot {\theta }}_{2}+{\tfrac {1}{2}}m\ell ^{2}{\ddot {\theta }}_{1}\cos(\theta _{1}-\theta _{2})-{\tfrac {1}{2}}m\ell ^{2}{\dot {\theta }}_{1}({\dot {\theta }}_{1}-{\dot {\theta }}_{2})\sin(\theta _{1}-\theta _{2}).$ Plugging these results into the Euler-Lagrange equation and simplifying yields the second equation of motion, ${\tfrac {1}{3}}\ell {\ddot {\theta }}_{2}+{\tfrac {1}{2}}\ell {\ddot {\theta }}_{1}\cos(\theta _{1}-\theta _{2})-{\tfrac {1}{2}}\ell {\dot {\theta }}_{1}^{2}\sin(\theta _{1}-\theta _{2})+{\tfrac {1}{2}}g\sin \theta _{2}=0.$
No closed form solutions for $\theta _{1}$ and $\theta _{2}$ as functions of time are known, therefore the system can only be solved numerically, using the Runge Kutta method or similar techniques.

## Chaotic motion

The double pendulum undergoes chaotic motion, and clearly shows a sensitive dependence on initial conditions. The image to the right shows the amount of elapsed time before the pendulum flips over, as a function of initial position when released at rest. Here, the initial value of θ$_1$ ranges along the x-direction from −3.14 to 3.14. The initial value θ$_2$ ranges along the y-direction, from −3.14 to 3.14. The color of each pixel indicates whether either pendulum flips within:
* ${\sqrt {\frac {\ell }{g}}}$ (black)
* $10{\sqrt {\frac {\ell }{g}}}$ (red)
* $100{\sqrt {\frac {\ell }{g}}}$ (green)
* $1000{\sqrt {\frac {\ell }{g}}}$ (blue) or
* $10000{\sqrt {\frac {\ell }{g}}}$ (purple).
Initial conditions that do not lead to a flip within $10000{\sqrt {\frac {\ell }{g}}}$ are plotted white.
The boundary of the central white region is defined in part by energy conservation with the following curve: $3\cos \theta _{1}+\cos \theta _{2}=2.$
Within the region defined by this curve, that is if$3\cos \theta _{1}+\cos \theta _{2}>2,$then it is energetically impossible for either pendulum to flip. Outside this region, the pendulum can flip, but it is a complex question to determine when it will flip. Similar behavior is observed for a double pendulum composed of two point masses rather than two rods with distributed mass.
The lack of a natural excitation frequency has led to the use of double pendulum systems in seismic resistance designs in buildings, where the building itself is the primary inverted pendulum, and a secondary mass is connected to complete the double pendulum.