\(x_1=l_1\sin\left(\theta_1\right),\quad y_1=-l_1\cos\left(\theta_1\right)\)
\(x_2=l_2\sin\left(\theta_2\right)+l_1\sin\left(\theta_1\right),\quad y_2=-l_2\cos\left(\theta_2\right)-l_1\cos\left(\theta_1\right)\)
$$L\left(\theta_1,\dot{\theta}_1,\theta_2,\dot{\theta}_2\right)=\frac{m_1(\dot{x}_1^2+\dot{y}_1^2)}{2}+\frac{m_2(\dot{x}_2^2+\dot{y}_2^2)}{2}-m_1gy_1-m_2gy_2=$$
$$=\frac{m_1l_1^2\dot{\theta}_1^2}{2}+\frac{m_2\left(l_1^2\dot{\theta}_1^2+l_2^2\dot{\theta}_2^2+2l_1l_2\cos\left(\theta_2-\theta_1\right)\dot{\theta}_1\dot{\theta}_2\right)}{2}+$$
$$+\left(m_1+m_2\right)gl_1\cos\left(\theta_1\right)+m_2l_2\cos\left(\theta_2\right)$$
Lagrange's …
#physics
#mechanics