This is a fact about the hamiltonian compared to the lagrangian which I find not trivial (and worth to keep in mind). Suppose that the lagrangian $L$ and hamiltonian $H$ are cyclic with respect to some coordinate $q_1$. Then we have a theorem (cfr. [1]): > The evolution of the other coordinates $q_2,...,q_n$ is the one of a system with $n-1$ independent coordinate $q_2,...,q_n$ with Hamiltonian $$H(p_2,...,p_n,q_2,...,q_n,t,c),$$ dependent from the parameter $c=p_1$. Note that *this is false if instead of $H$ we state the theorem for the lagrangian $L$*. To see exactly what I mean, consider the simplified Lagrangian of the two body problem: $$L=\frac{\mu}{2} (\dot r ^2+r^2\dot \varphi ^2 )-U(r).$$ We have $$p_\varphi=\mu r^2 \dot \varphi=\ell \quad(\text {constant}).$$ Now try to plug $$\dot \varphi=\frac{\ell}{\mu r^2}$$ inside the lagrangian and compare the equations of motion so obtained with the ones that you get plugging it directly into the equations of motion $\frac{\partial L}{\partial r}=\frac{d}{dt}\frac{\partial L}{\partial \dot r}$. [1] “Mathematical methods of classical mechanics“ V.I. Arnold, §15 Cor.2.