I have the langrangian $L = \frac 1 2m((1+4r^2)r’^2) + \frac 1 2 mr^2 θ’^2 -mgr^2 $
I worked out theHamiltonian and 4 Hamiltonian equations and got
$\frac {dpθ}{dt} = 0 $ for one of them $pθ$ is the momentum of the angle
Is that enough to show that the Hamiltonian is conserved.
$\endgroup$ 51 Answer
$\begingroup$In the Euler-Lagrange equations with momentum variables, you get$\newcommand{\pd}[2]{\frac{\partial#1}{\partial#2}}$\begin{align} p_r&=\pd{L}{\dot r}=m(1+r^2)\dot r\\ p_θ&=\pd{L}{\dot θ}=mr^2\dot θ \end{align}and then\begin{align} \dot p_r&=\pd{L}{r}=4mr\dot r^2+mr\dot θ^2-2mgr\\ \dot p_θ&=\pd{L}{θ}=0 \end{align}For the Hamiltonian you should get$$ H=p_r\dot r+p_θ\dot θ-L=\frac{p_r^2}{2m(1+4r^2)}+\frac{p_θ^2}{2mr^2}+mgr^2. $$It is now easy to check that $\dot q=H_p$ and $\dot p=-H_q$ gives the same equations as the Euler-Lagrange formalism, so that indeed $\dot H=H_p\dot p+H_q\dot q=0$.
$\endgroup$