A particle of mass m on a smooth horizontal table is attached to a string of length l passing through a small hole in the table and carries a particle of equal mass hanging vertically.
The position of the particle on the table is given in terms of its distance r from the hole and of the angle θ the string makes with some fixed line in the table.
The position of the other particle is given in terms of its vertical distance from the table.
Question: Derive Lagrange's equation for the system in terms of the generalized coordinates r and and $\theta$.
I was able to deduce that the potential energy is $U=mgr$. But how do I construct the kinetic energy in terms of $r$ and $\theta$?
Hint.
We know
$$ p = \rho(\cos\theta,\sin\theta)\Rightarrow \dot p = \dot\rho(\cos\theta,\sin\theta)+\rho(-\sin\theta,\cos\theta)\dot\theta\Rightarrow \|\dot p\|^2=\dot \rho^2+\rho^2\dot\theta^2 $$
now falling vertically
$$ \cases{ T_1 = \frac 12 m_1 \dot\rho_1^2\\ U_1 = -\rho_1 m _1 g } $$
and on the table
$$ \cases{ T_2 = \frac 12m_2(\dot \rho_2^2+\rho_2^2\dot\theta^2)\\ U_2 = 0 } $$
Note that
$$ \rho_1 + \rho_2 = \rho_0 $$