= Solution
The <canonical momentum> is $p=L_{\dot q}$, and a regular <Legendre transform in mechanics> defines $H(q,p,t)=p\dot q-L(q,\dot q,t)$ after solving for $\dot q$. Its differential is
$$
dH=\dot q\,dp-L_q\,dq-L_t\,dt,
$$
because the $d\dot q$ terms cancel. With the <Euler-Lagrange equation> $\dot p=L_q$, this gives <Hamilton's equations>
$$
\boxed{\dot q=H_p,\qquad\dot p=-H_q.}
$$
In particular $H_q=-L_q$ at corresponding velocities, so a <cyclic coordinate> for the <Lagrangian> is also cyclic for the <Hamiltonian>.
Back to article page