- #1

- 158

- 23

I've been experimenting with Lagrangian mechanics (and numerical simulation of physical systems), and I've come across a problem.

By finding the Lagrangian, then using the Euler-Lagrange formula, I can find equations of motion (in generalized angular coordinates with respect to the vertical) for n-pendulums. Here are a few I've found:

n = 1.

$$

\boxed{

{\ddot{\theta}} = -\frac{g \sin (\theta)}{L}

}

$$

n = 2.

$$

\boxed{

{\ddot{\theta}_1} = \frac{-{L_1} {m_2} {\dot{\theta}_1}^2 \sin (2 {\theta}-2 {\theta_2})-2 {L_2} {m_2} {\dot{\theta}_2}^2 \sin ({\theta}-{\theta_2})-g {m_2} \sin ({\theta}-2 {\theta_2})-2 g {m_1} \sin ({\theta})-g {m_2} \sin ({\theta})}{{L_1} (-{m_2} \cos (2 {\theta}-2 {\theta_2})+2 {m_1}+{m_2})}\\

{\ddot{\theta}_2} =-\frac{{L_1} {\ddot{\theta}_1} \cos ({\theta}-{\theta_2})-{L_1} {\dot{\theta}_1}^2 \sin ({\theta}-{\theta_2})+G \sin ({\theta_2})}{{L_2}}

}

$$

n = 3.

$$

\small{

{\ddot{\theta}_1} = -\frac{2 {m_2} \sin ({\theta}-{\theta_2}) \left(({m_2}+{m_3}) \left({L_1} {\dot{\theta}_1}^2 \cos ({\theta}-{\theta_2})+{L_2} {\dot{\theta}_2}^2\right)+{L_3} {m_3} {\dot{\theta}_3}^2 \cos ({\theta_2}-{\theta_3})\right)+g \sin ({\theta}) (-{m_1} {m_3} \cos (2 ({\theta_2}-{\theta_3}))+{m_1} (2 {m_2}+{m_3})+{m_2} ({m_2}+{m_3}))+g {m_2} ({m_2}+{m_3}) \sin ({\theta}-2 {\theta_2})}{{L_1} (-{m_2} ({m_2}+{m_3}) \cos (2 ({\theta}-{\theta_2}))-{m_1} {m_3} \cos (2 ({\theta_2}-{\theta_3}))+{m_3} ({m_1}+{m_2})+{m_2} (2 {m_1}+{m_2}))}

}

$$

$$

\small{

{\ddot{\theta}_2} =\frac{-2 {m_3} \sin ({\theta_2}-{\theta_3}) \left({L_1} {\ddot{\theta}_1} \sin ({\theta}-{\theta_3})+{L_2} {\dot{\theta}_2}^2 \cos ({\theta_2}-{\theta_3})+{L_3} {\dot{\theta}_3}^2\right)-2 {L_1} {m_2} {\ddot{\theta}_1} \cos ({\theta}-{\theta_2})+{L_1} {\dot{\theta}_1}^2 ((2 {m_2}+{m_3}) \sin ({\theta}-{\theta_2})-{m_3} \sin ({\theta}+{\theta_2}-2 {\theta_3}))-G ({m_3} \sin ({\theta_2}-2 {\theta_3})+(2 {m_2}+{m_3}) \sin ({\theta_2}))}{{L_2} (-{m_3} \cos (2 ({\theta_2}-{\theta_3}))+2 {m_2}+{m_3})}

}

$$

$$

\small{

{\ddot{\theta}_3} =-\frac{{L_1} {\ddot{\theta}_1} \cos ({\theta}-{\theta_3})-{L_1} {\dot{\theta}_1}^2 \sin ({\theta}-{\theta_3})+{L_2} {\ddot{\theta}_2} \cos ({\theta_2}-{\theta_3})-{L_2} {\dot{\theta}_1}^2 \sin ({\theta_2}-{\theta_3})+G \sin ({\theta_3})}{{L_3}}

}

$$

These pendulums have rigid, massless rods. There is no joint or air friction. As you can see, these coordinates result in... large expressions.

I've automated this process using Mathematica, but the resulting equations are too large to simplify for pendulums n=4 and above (Quadruple and above).

Is there any coordinate change or other simplification I can do to keep this solvable? If I do this in Cartesian coordinates instead, might that help?

When N gets larger, solving the system of Euler-Lagrange equations (to find the actual equations of motion) becomes difficult (4 equations, 4 unknowns, and above).

I've tried formulating a n=1 pendulum in Cartesian coordinates, but I get spring pendulum systems instead. How do I enforce the condition x^2+y^2=L^2 in a natural manner, when calculating the Lagrangian?

Thanks for any insight given,

ellipsis