# Extending the Lagrangian of a double pendulum to systems with more complex shapes

The total kinetic energy of a double pendulum can be calculated as follows: $$L = \frac{1}{2} (m_1 + m_2) {l_1}^2 \dot{\theta_1}^2 + \frac{1}{2} m_2 {l_2}^2 \dot{\theta_2}^2 + m_2 l_1 l_2 \dot{\theta_1} \dot{\theta_2}\cos(\theta_1 - \theta_2) + (m_1 + m_2) g l_1 \cos(\theta_1) + m_2 g l_2 \cos(\theta_2).$$

This works if the double pendulum in question is formed by two masses connected to each other and — one of them — to the point of origin by a "massless" rod. However, I'm interested in expanding this formula to cover systems where two bodies of more complex shapes are the swinging parts of the "double pendulum", if it possible that is.

Say I have a Cartesian plane, and at the origin point there's a cylinder of height $$H$$ and radius $$R$$ with the $$y$$-axis passing through the center of mass. On top of it is a cone placed upside down, with the center of mass also passing through the $$y$$-axis. Said cone has radius $$r$$ and height $$h$$.

The cylinder is then tipped to the right, forming now an angle $$\theta_1$$ with the $$x$$-axis. As a consequence, the cone swings as well, producing an angle $$\theta_2$$ respect to the horizontal. It all happens within time $$t$$. How can I work out the Lagrangian from the data given?

• Do you want these shapes to be able to swing in 3D or keep in 2D like the standard double pendulum? Commented Jun 5 at 13:21
• 3D would be optimal, but I can settle with a 2D case — I’m not expecting to use it for a tridimensional system in the foreseeable future. Commented Jun 5 at 13:32
– Eli
Commented Jun 5 at 15:45
• [img]i.ibb.co/mcC1Jch/IMG-5666.jpg[/img] Here it is. Don’t mind the funky scale. Commented Jun 5 at 16:00

The form you're looking for is

$$L = \tfrac{1}{2}\dot{\theta}^2_1\left(m_1\ell_1^2+m_2L^2 +I_1\right)$$ $$+\tfrac{1}{2}\dot{\theta}^2_2\left(m_2\ell_2^2+I_2\right)$$ $$+\tfrac{1}{2}2\dot{\theta}_1\dot{\theta}_2\; m_2 L \ell_2 \cos(\theta_2-\theta_1)$$ $$+m_1g\ell_1\cos(\theta_1+\alpha)+m_2g\left(L \cos\theta_1 +\ell_2 \cos\theta_2\right)$$

I've changed the meaning of the variables slightly and introduced some others. Check the picture below for reference. Here $$\ell_1$$ is the distance from the top attachment point to the center of mass of the top object, and $$\ell_2$$ is the distance from the lower attachment point to the center of mass of the lower object. The new length $$L$$ is the distance from the top attachment point to the lower one.

The additional angle $$\alpha$$ is the fixed angle between the vector $$\vec{L}$$ and $$\vec{\ell}_1$$. This is only necessary for unsymmetric objects: on objects that are symmetric across the attachment point $$\alpha = 0$$.

Finally, $$I_1$$ and $$I_2$$ are the moments of inertia of the two objects calculated around their centers of mass.

To check that this reduces to your simpler Lagrangian replace $$\alpha = 0$$ then $$L = \ell_1$$ and $$I_1 = I_2 = 0$$.

For your specific situation you would need to compute the location of the centers of mass of each object relative to their rotation point, then calculate the moment of inertia of each as measured around its center of mass.

One interesting note is that if $$\alpha \ne 0$$ then the equilibrium state isn't $$\theta_1 = \theta_2 = 0$$. In that case it might be helpful to solve for the new equilibrium and use shifted angles instead of $$\theta_1$$ and $$\theta_2$$

• Thanks sir, I much appreciate the input. Commented Jun 6 at 18:45

$$\def \b {\mathbf}$$

starting with the position vectors $$~\b R_z~,\b R_c~$$ to the center of masses : cylinder , subscript z and cone subscript c

\begin{align*} &\b R_z=\frac{1}{2}\,H\,\begin{bmatrix} \sin(\phi_1) \\ \cos(\phi_1) \\ \end{bmatrix}\\ &\b R_c=H\,\begin{bmatrix} \sin(\phi_1) \\ \cos(\phi_1) \\ \end{bmatrix}+\frac{3}{4}\,h\,\begin{bmatrix} \sin(\phi_2) \\ \cos(\phi_2) \\ \end{bmatrix} \end{align*} from here the Kinetic energy \begin{align*} &T=\frac{m_z}{2}\b v_z\cdot\b v_z+\frac{I_z}{2}\omega_z^2+ \frac{m_c}{2}\b v_c\cdot\b v_c+\frac{I_c}{2}\omega_c^2\\ &\text{with:}\\ &\b v_z=\b{\dot{R}}_z\quad,\b v_c=\b{\dot{R}}_c\\ &\omega_z=\dot{\phi}_1\quad,\omega_c=\dot{\phi}_2\\ &I_z=\frac{H}{12}\left(m_z\,H^2+3\,r_z^2\right)+m_z\,\left(\frac H2\right)^2\quad, I_c=\frac{m_c}{20}\left(2\,h^2+3\,r_c^2\right)+ m_c\left(\frac{3\,h}{4}\right)^2 \end{align*} Potential energy \begin{align*} U=-m_z\,g\,\left(\b R_z\right)_z-m_c\,g\,\left(\b R_c\right)_z \end{align*}

with EL you can obtain the equations of motion $$\ddot\phi_1=\ldots~,\ddot\phi_2=\ldots~$$

• Thank you very much for the good answer :-) Commented Jun 6 at 15:43