Skip to main content
Physics LibreTexts

10.1: Hamilton Equations

  • Page ID
    34810
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    Throughout this course, we have seen how analytical mechanics, in its Lagrangian form, is invaluable for solving various particular problems of classical mechanics. Now let us discuss several alternative formulations \({ }^{1}\) that may not be much more useful for this purpose, but shed additional light on possible extensions of classical mechanics, most importantly to quantum mechanics.

    As was already discussed in Sec. 2.3, the partial derivative \(p_{j} \equiv \partial L / \partial \dot{q}_{j}\) participating in the Lagrange equation (2.19), \[\frac{d}{d t} \frac{\partial L}{\partial \dot{q}_{j}}-\frac{\partial L}{\partial q_{j}}=0\] may be considered as the generalized momentum corresponding to the generalized coordinate \(q_{i}\), and the full set of these momenta may be used to define the Hamiltonian function (2.32): \[H \equiv \sum_{j} p_{j} \dot{q}_{j}-L .\] Now let us rewrite the full differential of this function \(^{2}\) in the following form: \[\begin{aligned} d H &=d\left(\sum_{j} p_{j} \dot{q}_{j}-L\right)=\sum_{j}\left[d\left(p_{j}\right) \dot{q}_{j}+p_{j} d\left(\dot{q}_{j}\right)\right]-d L \\ &=\sum_{j}\left[d\left(p_{j}\right) \dot{q}_{j}+p_{j} d\left(\dot{q}_{j}\right)\right]-\left[\frac{\partial L}{\partial t} d t+\sum_{j}\left(\frac{\partial L}{\partial q_{j}} d\left(q_{j}\right)+\frac{\partial L}{\partial \dot{q}_{j}} d\left(\dot{q}_{j}\right)\right)\right] . \end{aligned}\] According to the definition of the generalized momentum, the second terms of each sum over \(j\) in the last expression cancel each other, while according to the Lagrange equation (1), the derivative \(\partial L / \partial q_{j}\) is equal to \(\dot{p}_{j}\), so that \[d H=-\frac{\partial L}{\partial t} d t+\sum_{j}\left(\dot{q}_{j} d p_{j}-\dot{p}_{j} d q_{j}\right)\] So far, this is just a universal identity. Now comes the main trick of Hamilton’s approach: let us consider \(H\) as a function of the following independent arguments: time \(t\), the generalized coordinates \(q_{j}\), and the generalized momenta \(p_{j}\) - rather than generalized velocities \(\dot{q}_{j}\). With this commitment, the general "chain rule" of differentiation of a function of several arguments gives \[d H=\frac{\partial H}{\partial t} d t+\sum_{j}\left(\frac{\partial H}{\partial q_{j}} d q_{j}+\frac{\partial H}{\partial p_{j}} d p_{j}\right)\] where \(d t, d q_{j}\), and \(d p_{j}\) are independent differentials. Since Eq. (5) should be valid for any choice of these argument differentials, it should hold in particular if they correspond to the real law of motion, for which Eq. (4) is valid as well. The comparison of Eqs. (4) and (5) gives us three relations: \[\begin{gathered} \frac{\partial H}{\partial t}=-\frac{\partial L}{\partial t} . \\ \dot{q}_{j}=\frac{\partial H}{\partial p_{j}}, \quad p_{j}=-\frac{\partial H}{\partial q_{j}} . \end{gathered}\] Comparing the first of them with Eq. (2.35), we see that \[\frac{d H}{d t}=\frac{\partial H}{\partial t},\] meaning that the function \(H\left(t, q_{j}, p_{j}\right)\) can change in time only via its explicit dependence on \(t\). Two Eqs. (7) are even more substantial: provided that such function \(H\left(t, q_{j}, p_{j}\right)\) has been calculated, they give us two first-order differential equations (called the Hamilton equations) for the time evolution of the generalized coordinate and generalized momentum of each degree of freedom of the system. \({ }^{3}\)

    Let us have a look at these equations for the simplest case of a system with one degree of freedom, with the Lagrangian function (3.3): \[L=\frac{m_{\mathrm{ef}}}{2} \dot{q}^{2}-U_{\mathrm{ef}}(q, t)\] In this case, \(p \equiv \partial L / \partial \dot{q}=m_{\text {ef }} \dot{q}\), and \(H \equiv p \dot{q}-L=m_{\text {ef }} \dot{q}^{2} / 2+U_{\text {ef }}(q, t) .\) To honor our new commitment, we need to express the Hamiltonian function explicitly via \(t, q\), and \(p\) (rather than \(\dot{q}\) ). From the above expression for \(p\), we immediately have \(\dot{q}=p / m_{\text {ef }}\); plugging this expression back to Eq. (9), we get \[H=\frac{p^{2}}{2 m_{\mathrm{ef}}}+U_{\mathrm{ef}}(q, t) .\] Now we can spell out Eqs. (7) for this particular case: \[\begin{gathered} \dot{q} \equiv \frac{\partial H}{\partial p}=\frac{p}{m_{\mathrm{ef}}}, \\ \dot{p} \equiv-\frac{\partial H}{\partial q}=-\frac{\partial U_{\mathrm{ef}}}{\partial q} . \end{gathered}\] While the first of these equations just repeats the definition of the generalized momentum corresponding to the coordinate \(q\), the second one gives the equation of momentum’s change. Differentiating Eq. (11) over time, and plugging Eq. (12) into the result, we get: \[\ddot{q}=\frac{\dot{p}}{m_{\mathrm{ef}}}=-\frac{1}{m_{\mathrm{ef}}} \frac{\partial U_{\mathrm{ef}}}{\partial q} .\] So, we have returned to the same equation (3.4) that had been derived from the Lagrangian approach. \({ }^{4}\)

    Thus, the Hamiltonian formalism does not give much new for the solution of this problem - and indeed most problems of classical mechanics. (This is why its discussion had been postponed until the very end of this course.) Moreover, since the Hamiltonian function \(H\left(t, q_{j}, p_{j}\right)\) does not include generalized velocities explicitly, the phenomenological introduction of dissipation in this approach is less straightforward than that in the Lagrangian equations, whose precursor form (2.17) is valid for dissipative forces as well. However, the Hamilton equations (7), which treat the generalized coordinates and momenta in a manifestly symmetric way, are heuristically fruitful - besides being very appealing aesthetically. This is especially true in the cases where these arguments participate in \(H\) in a similar way. For example, in the very important case of a dissipation-free linear ("harmonic") oscillator, for which \(U_{\text {ef }}=\kappa_{\text {ef }} q^{2} / 2\), Eq. (10) gives the famous symmetric form \[H=\frac{p^{2}}{2 m_{\mathrm{ef}}}+\frac{\kappa_{\mathrm{ef}} x^{2}}{2} \equiv \frac{p^{2}}{2 m_{\mathrm{ef}}}+\frac{m_{\mathrm{ef}} \omega_{0}^{2} x^{2}}{2}, \quad \text { where } \omega_{0}^{2} \equiv \frac{\kappa_{\mathrm{ef}}}{m_{\mathrm{ef}}} .\] The Hamilton equations (7) for this system preserve that symmetry, especially evident if we introduce the normalized momentum \(p \equiv p / m_{\text {ef }} \omega_{0}\) (already used in Secs. \(5.6\) and 9.2): \[\frac{d q}{d t}=\omega_{0} p, \quad \frac{d p}{d t}=-\omega_{0} q .\] More practically, the Hamilton approach gives additional tools for the search for the integrals of motion. To see that, let us consider the full time derivative of an arbitrary function \(f\left(t, q_{j}, p_{j}\right)\) : \[\frac{d f}{d t}=\frac{\partial f}{\partial t}+\sum_{j}\left(\frac{\partial f}{\partial q_{j}} \dot{q}_{j}+\frac{\partial f}{\partial p_{j}} \dot{p}_{j}\right) .\] Plugging in \(\dot{q}_{j}\) and \(\dot{p}_{j}\) from the Hamilton equations (7), we get \[\frac{d f}{d t}=\frac{\partial f}{\partial t}+\sum_{j}\left(\frac{\partial H}{\partial p_{j}} \frac{\partial f}{\partial q_{j}}-\frac{\partial H}{\partial q_{j}} \frac{\partial f}{\partial p_{j}}\right) \equiv \frac{\partial f}{\partial t}+\{H, f\} .\] The last term on the right-hand side of this expression is the so-called Poisson bracket, \({ }^{5}\) and is defined, for two arbitrary functions \(f\left(t, q_{j}, p_{j}\right)\) and \(g\left(t, q_{j}, p_{j}\right)\), as \[\{g, f\} \equiv \sum_{j}\left(\frac{\partial g}{\partial p_{j}} \frac{\partial f}{\partial q_{j}}-\frac{\partial f}{\partial p_{j}} \frac{\partial g}{\partial q_{j}}\right)\] From this definition, one can readily verify that besides evident relations \(\{f, f\}=0\) and \(\{f, g\}=-\{g, f\}\), the Poisson brackets obey the following important Jacobi identity: \[\{f,\{g, h\}\}+\{g,\{h, f\}\}+\{h,\{f, g\}\}=0 .\] Now let us use these relations for a search for integrals of motion. First, Eq. (17) shows that if a function \(f\) does not depend on time explicitly, and \[\{H, f\}=0,\] then \(d f f d t=0\), i.e. that function is an integral of motion. Moreover, it turns out that if we already know two integrals of motion, say \(f\) and \(g\), then the following function, \[F \equiv\{f, g\}\] is also an integral of motion - the so-called Poisson theorem. In order to prove it, we may use the Jacobi identity (19) with \(h=H\). Next, using Eq. (17) to express the Poisson brackets \(\{g, H\},\{H, g\}\), and \(\{H,\{f\), \(g\}\}=\{H, F\}\) via the full and partial time derivatives of the functions \(f, g\), and \(F\), we get \[\left\{f, \frac{\partial g}{\partial t}-\frac{d g}{d t}\right\}+\left\{g, \frac{d f}{d t}-\frac{\partial f}{\partial t}\right\}+\frac{d F}{d t}-\frac{\partial F}{\partial t}=0\] so that if \(f\) and \(g\) are indeed integrals of motion, i.e., \(d f / d t=d g / d t=0\), then \[\frac{d F}{d t}=\frac{\partial F}{\partial t}+\left\{g, \frac{\partial f}{\partial t}\right\}-\left\{f, \frac{\partial g}{\partial t}\right\}=\frac{\partial F}{\partial t}-\left[\left\{\frac{\partial f}{\partial t}, g\right\}+\left\{f, \frac{\partial g}{\partial t}\right\}\right] \text {. }\] Plugging Eq. (21) into the first term of the right-hand side of this equation, and differentiating it by parts, we get \(d F / d t=0\), i.e. \(F\) is indeed an integral of motion as well.

    Finally, one more important role of the Hamilton formalism is that it allows one to trace the close formal connection between classical and quantum mechanics. Indeed, using Eq. (18) to calculate the Poisson brackets of the generalized coordinates and momenta, we readily get \[\left\{q_{j}, q_{j^{\prime}}\right\}=0, \quad\left\{p_{j}, p_{j^{\prime}}\right\}=0, \quad\left\{q_{j}, p_{j^{\prime}}\right\}=-\delta_{j j^{\prime}} .\] In quantum mechanics, the operators of these variables ("observables") obey commutation relations \(^{6}\) \[\left[\hat{q}_{j}, \hat{q}_{j^{\prime}}\right]=0, \quad\left[\hat{p}_{j}, \hat{p}_{j^{\prime}}\right]=0, \quad\left[\hat{q}_{j}, \hat{p}_{j^{\prime}}\right]=i \hbar \delta_{j j^{\prime}},\] where the definition of the commutator, \([\hat{g}, \hat{f}] \equiv \hat{g} \hat{f}-\hat{f} \hat{g}\), is to a certain extent \(^{7}\) similar to that (18) of the Poisson bracket. We see that the classical relations (24) are similar to the quantum-mechanical relations \((25)\) if the following parallel has been made:

    \[\{g, f\} \leftrightarrow \frac{i}{\hbar}[\hat{g}, \hat{f}] .\] This analogy extends well beyond Eqs. (24)-(25). For example, making the replacement (26) in Eq. (17), we get \[\frac{d \hat{f}}{d t}=\frac{\partial \hat{f}}{\partial t}+\frac{i}{\hbar}[\hat{H}, \hat{f}], \quad \text { i.e. } i \hbar \frac{d \hat{f}}{d t}=i \hbar \frac{\partial \hat{f}}{\partial t}+[\hat{f}, \hat{H}]\] which is the correct equation of operator evolution in the Heisenberg picture of quantum mechanics. \({ }^{8}\) The parallel (26) may give important clues in the search for the proper quantum-mechanical operator of a given observable - which is not always elementary.


    \({ }^{1}\) Due to not only William Rowan Hamilton (1805-1865), but also Carl Gustav Jacob Jacobi (1804-1851).

    \({ }^{2}\) Actually, this differential was already spelled out (but partly and implicitly) in Sec. \(2.3\) - see Eqs. (2.33)-(2.35).

    \({ }^{3}\) Of course, the right-hand side of each equation (7) may include coordinates and momenta of other degrees of freedom as well, so that the equations of motion for different \(j\) are generally coupled.

    \({ }^{4}\) The reader is highly encouraged to perform a similar check for a few more problems, for example those listed at the end of the chapter, to get a better feeling of how the Hamiltonian formalism works.

    \({ }^{5}\) Named after Siméon Denis Poisson (1781-1840), of the Poisson equation and the Poisson statistical distribution fame.

    \({ }^{6}\) See, e.g., QM Sec. \(2.1\)

    \({ }^{7}\) There is, of course, a conceptual difference between the "usual" products of the function derivatives participating in the Poisson brackets, and the operator "products" (meaning their sequential action on a state vector) forming the commutator.

    \({ }^{8}\) See, e.g., QM Sec. \(4.6 .\)


    This page titled 10.1: Hamilton Equations is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or curated by Konstantin K. Likharev via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is available upon request.