7.4 Canonical equations from Hamilton’s principle

Recall that we obtained the equations of motion by requiring that the action, \(S\), is stationary under variations of the \(q_i\):

\begin{align} S=\int_{t_1}^{t_2}L(q_i,\dot q_i, t) dt \tag{7.22}\end{align}

The Euler-Lagrange equations of motion were obtained by requiring that the variations of the \(q_i\) were zero at the end points. We can write the variation of \(S\) in terms of the Hamiltonian:

\begin{align} \delta S = \delta \int_{t_1}^{t_2}L(q_i,\dot q_i, t) dt = \delta\int_{t_1}^{t_2}\left[\sum_ip_i\dot q_i-H(q_i,p_i,t)\right]dt \tag{7.23}\end{align}

In the Lagrangian formalism, we found that variations of the action with respect to the \(q_i\) led to the equations of motion. The \(\dot q_i\) did not vary independently from the \(q_i\), since:

\begin{align} \delta \dot q_i=\delta \frac{dq_i}{dt}=\frac{d}{dt}\delta q_i \tag{7.24}\end{align}

In the Hamiltonian formalism, we must treat the \(q_i\) and \(p_i\) on equal footing, that is, we must allow them to be varied independently. We know from the properties of the Legendre transformation that variations of the \(p_i\) do not affect the Lagrangian, and hence the variation of the action will not be affected by independently varying the \(p_i\):

\begin{align} p_i &\to p_i+\delta p_i \\ q_i &\to q_i+\delta q_i\\ \delta S &= \int_{t_1}^{t_2}\left[\sum_i\left(p_i\delta\dot q_i+\dot q_i \delta p_i-\die{H}{q_i}\delta q_i -\die{H}{p_i}\delta p_i\right)\right]dt \tag{7.25}\end{align}

We can write:

\begin{align} p_i\delta\dot q_i &=p_i\frac{d}{dt}\delta q_i=\frac{d}{dt}(p_i\delta q_i)-\dot p_i \delta q_i \tag{7.26}\end{align}

The first term, being a total time derivative, will not contribute to the variation of the action (since it just adds a constant), so it can be dropped:

\begin{align} \delta S &= \int_{t_1}^{t_2}\left[\sum_i\left(-\dot p_i \delta q_i+\dot q_i \delta p_i-\die{H}{q_i}\delta q_i -\die{H}{p_i}\delta p_i\right)\right]dt\\ &=\int_{t_1}^{t_2}\left[\sum_i\left( -\dot p_i -\die{H}{q_i}\right)\delta q_i+\left(\dot q_i-\die{H}{p_i} \right)\delta p_i \right]dt \tag{7.27}\end{align}

For the variation of \(S\) to be zero when \(q_i\) and \(p_i\) are varied independently, then the terms in front of the \(\delta q_i\) and \(\delta p_i\) must always be zero, which is precisely the canonical equations.