PDF (letter size)

## Double pendulum with springs

January 22, 2020   Compiled on May 25, 2022 at 9:29pm

Assuming both springs have the same relaxed length of $$L$$. Starting by ﬁnding the Lagrangian $$\mathcal {L}=T-V$$. For $$m_{1}$$\begin {align*} T_{1} & =\frac {1}{2}m_{1}\left ( \dot {x}_{1}^{2}+\left ( \left ( L+x_{1}\right ) \dot {\theta }_{1}\right ) ^{2}\right ) \\ V_{1} & =-m_{1}g\left ( L+x_{1}\right ) \cos \theta _{1}+\frac {1}{2}k_{1}x_{1}^{2} \end {align*}

And for $$m_{2}$$\begin {align*} T_{2} & =\frac {1}{2}m_{2}\left ( \left ( \dot {x}_{2}+\dot {x}_{1}\cos \left ( \theta _{1}-\theta _{2}\right ) \right ) ^{2}+\left ( \dot {x}_{1}\sin \left ( \theta _{1}-\theta _{2}\right ) \right ) ^{2}\right ) \\ & +\frac {1}{2}m_{2}\left ( \left ( \left ( L+x_{2}\right ) \dot {\theta }_{2}+\left ( L+x_{1}\right ) \dot {\theta }_{1}\cos \left ( \theta _{1}-\theta _{2}\right ) \right ) ^{2}+\left ( \left ( L+x_{1}\right ) \dot {\theta }_{1}\sin \left ( \theta _{1}-\theta _{2}\right ) \right ) ^{2}\right ) \\ V_{2} & =-m_{2}g\left ( \left ( L+x_{1}\right ) \cos \theta _{1}+\left ( L+x_{2}\right ) \cos \theta _{2}\right ) +\frac {1}{2}k_{2}x_{2}^{2} \end {align*}

Hence$\mathcal {L}=\left ( T_{1}+T_{2}\right ) -\left ( V_{1}+V_{2}\right )$ There are 4 generalized coordinates, $$x_{1},x_{2},\theta _{1},\theta _{2}$$. Now Mathematica is used to obtain the four equations of motion to help with the algebra. Once $$x_{1},x_{2},\theta _{1},\theta _{2}$$ are solved for, the position of each mass $$m_{1},m_{2}$$ is fully known at each time instance, and each mass motion can be animated. The four equations of motion are

\begin {align*} \frac {d}{dt}\left ( \frac {\partial \mathcal {L}}{\partial \dot {x}_{1}}\right ) -\frac {\partial \mathcal {L}}{\partial x_{1}} & =0\\ \frac {d}{dt}\left ( \frac {\partial \mathcal {L}}{\partial \dot {x}_{2}}\right ) -\frac {\partial \mathcal {L}}{\partial x_{2}} & =0\\ \frac {d}{dt}\left ( \frac {\partial \mathcal {L}}{\partial \dot {\theta }_{1}}\right ) -\frac {\partial \mathcal {L}}{\partial \theta _{1}} & =0\\ \frac {d}{dt}\left ( \frac {\partial \mathcal {L}}{\partial \dot {\theta }_{2}}\right ) -\frac {\partial \mathcal {L}}{\partial \theta _{2}} & =0 \end {align*}

The rest is done using Mathematica to help with the algebra