= Solution
The <massless inextensible string> has hanging length $y=l-r$, measured downward from the table. Thus $\dot y=-\dot r$. In <polar coordinates>, the tabletop <mass> has squared <speed> $\dot r^2+r^2\dot\theta^2$. Adding the two <kinetic energies> and setting the hanging <gravitational potential energy> to $-Mgy$ gives
$$
T=\frac12(M+m)\dot r^2+\frac12mr^2\dot\theta^2,\qquad
V=-Mg(l-r),
$$
and the <Lagrangian> is
$$
\boxed{L=T-V=\frac12(M+m)\dot r^2+\frac12mr^2\dot\theta^2+Mg(l-r).}
$$
The <canonical momenta> are $p_r=(M+m)\dot r$ and $p_\theta=mr^2\dot\theta$. Performing the <Legendre transform> gives the <Hamiltonian>
$$
\boxed{\mathcal H=p_r\dot r+p_\theta\dot\theta-L
=\frac{p_r^2}{2(M+m)}+\frac{p_\theta^2}{2mr^2}-Mg(l-r).}
$$
It equals the total mechanical <energy> and is conserved because $L$ has no explicit <time> dependence. Also $\theta$ is a <cyclic coordinate>, so $J=p_\theta=mr^2\dot\theta$ is conserved <angular momentum> about the vertical through the hole. The table and the string guide supply external <forces>; conservation of the system's total linear <momentum> does not follow. These are the two independent generic integrals needed for the reduced <tabletop mass coupled to a hanging mass>.
Back to article page