= Solution
Vary $q_a$ and $p_a$ independently, fixing the endpoint positions. <Integration by parts> gives
$$
\delta S=[p_a\delta q_a]_{t_1}^{t_2}+\int_{t_1}^{t_2}\left[(\dot q_a-H_{p_a})\delta p_a+(-\dot p_a-H_{q_a})\delta q_a\right]dt.
$$
The boundary term vanishes, so arbitrary interior variations imply
$$
\boxed{\dot q_a=H_{p_a},\qquad\dot p_a=-H_{q_a}.}
$$
In the Lagrangian principle only $q$ is varied independently, and $\delta\dot q=d(\delta q)/dt$; here positions and momenta are independent paths in <phase space>. The extremality condition is stationarity of the action, not necessarily a minimum. Along <Hamiltonian> motion,
$$
\frac{dH}{dt}=H_{q_a}\dot q_a+H_{p_a}\dot p_a+H_t=H_t,
$$
so \b[an explicitly time-independent <Hamiltonian> is conserved].
Back to article page