8.3: Hamilton’s Equations of Motion

$$\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}}$$

$$\newcommand{\vectorA}[1]{\vec{#1}} % arrow$$

$$\newcommand{\vectorAt}[1]{\vec{\text{#1}}} % arrow$$

$$\newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} }$$

$$\newcommand{\vectorC}[1]{\textbf{#1}}$$

$$\newcommand{\vectorD}[1]{\overrightarrow{#1}}$$

$$\newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}}$$

$$\newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}}$$

$$\newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} }$$

$$\newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}}$$

$$\newcommand{\avec}{\mathbf a}$$ $$\newcommand{\bvec}{\mathbf b}$$ $$\newcommand{\cvec}{\mathbf c}$$ $$\newcommand{\dvec}{\mathbf d}$$ $$\newcommand{\dtil}{\widetilde{\mathbf d}}$$ $$\newcommand{\evec}{\mathbf e}$$ $$\newcommand{\fvec}{\mathbf f}$$ $$\newcommand{\nvec}{\mathbf n}$$ $$\newcommand{\pvec}{\mathbf p}$$ $$\newcommand{\qvec}{\mathbf q}$$ $$\newcommand{\svec}{\mathbf s}$$ $$\newcommand{\tvec}{\mathbf t}$$ $$\newcommand{\uvec}{\mathbf u}$$ $$\newcommand{\vvec}{\mathbf v}$$ $$\newcommand{\wvec}{\mathbf w}$$ $$\newcommand{\xvec}{\mathbf x}$$ $$\newcommand{\yvec}{\mathbf y}$$ $$\newcommand{\zvec}{\mathbf z}$$ $$\newcommand{\rvec}{\mathbf r}$$ $$\newcommand{\mvec}{\mathbf m}$$ $$\newcommand{\zerovec}{\mathbf 0}$$ $$\newcommand{\onevec}{\mathbf 1}$$ $$\newcommand{\real}{\mathbb R}$$ $$\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}$$ $$\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}$$ $$\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}$$ $$\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}$$ $$\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}$$ $$\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}$$ $$\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}$$ $$\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}$$ $$\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}$$ $$\newcommand{\laspan}[1]{\text{Span}\{#1\}}$$ $$\newcommand{\bcal}{\cal B}$$ $$\newcommand{\ccal}{\cal C}$$ $$\newcommand{\scal}{\cal S}$$ $$\newcommand{\wcal}{\cal W}$$ $$\newcommand{\ecal}{\cal E}$$ $$\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}$$ $$\newcommand{\gray}[1]{\color{gray}{#1}}$$ $$\newcommand{\lgray}[1]{\color{lightgray}{#1}}$$ $$\newcommand{\rank}{\operatorname{rank}}$$ $$\newcommand{\row}{\text{Row}}$$ $$\newcommand{\col}{\text{Col}}$$ $$\renewcommand{\row}{\text{Row}}$$ $$\newcommand{\nul}{\text{Nul}}$$ $$\newcommand{\var}{\text{Var}}$$ $$\newcommand{\corr}{\text{corr}}$$ $$\newcommand{\len}[1]{\left|#1\right|}$$ $$\newcommand{\bbar}{\overline{\bvec}}$$ $$\newcommand{\bhat}{\widehat{\bvec}}$$ $$\newcommand{\bperp}{\bvec^\perp}$$ $$\newcommand{\xhat}{\widehat{\xvec}}$$ $$\newcommand{\vhat}{\widehat{\vvec}}$$ $$\newcommand{\uhat}{\widehat{\uvec}}$$ $$\newcommand{\what}{\widehat{\wvec}}$$ $$\newcommand{\Sighat}{\widehat{\Sigma}}$$ $$\newcommand{\lt}{<}$$ $$\newcommand{\gt}{>}$$ $$\newcommand{\amp}{&}$$ $$\definecolor{fillinmathshade}{gray}{0.9}$$

The explicit form of the Legendre transform $$(8.2.6)$$ gives that the time derivative of the generalized coordinate $$q_{j}$$ is

$\dot{q}_{j}\mathbf{=}\frac{\partial H(\mathbf{q,p,}t)}{\partial p_{j}}\label{8.15}$

The Euler-Lagrange equation $$(6.6.1)$$ is

$\frac{d}{dt}\frac{\partial L}{\partial \dot{q}_{j}}-\frac{\partial L}{ \partial q_{j}}=\sum_{k=1}^{m}\lambda _{k}\frac{\partial g_{k}}{\partial q_{j}}+Q_{j}^{EXC}\label{8.16}$

This gives the corresponding Hamilton equation for the time derivative of $$p_{i}$$ to be

$\frac{d}{dt}\frac{\partial L}{\partial \dot{q}_{j}}=\dot{p}_{j}=\frac{ \partial L}{\partial q_{j}}+\sum_{k=1}^{m}\lambda _{k}\frac{\partial g_{k}}{ \partial q_{j}}+Q_{j}^{EXC}\label{8.17}$

Substitute equation $$(8.2.9)$$ into Equation \ref{8.17} leads to the second Hamilton equation of motion $\dot{p}_{j}=-\frac{\partial H(\mathbf{q,p,}t)}{\partial q_{j}} +\sum_{k=1}^{m}\lambda _{k}\frac{\partial g_{k}}{\partial q_{j}}+Q_{j}^{EXC}\label{8.18}$

One can explore further the implications of Hamiltonian mechanics by taking the time differential of $$(8.1.3)$$ giving.

$\frac{dH(\mathbf{q,p,}t)}{dt}=\sum_{j}\left( \dot{q}_{j}\frac{dp_{j} }{dt}+p_{j}\frac{d\dot{q}_{j}}{dt}-\frac{\partial L}{\partial q_{j}}\frac{ dq_{j}}{dt}-\frac{\partial L}{\partial \dot{q}_{j}}\frac{d\dot{q}_{j}}{dt} \right) -\frac{\partial L}{\partial t}\label{8.19}$

Inserting the conjugate momenta $$p_{i}\equiv \frac{\partial L}{\partial \dot{ q}_{i}}$$ and Equation \ref{8.17} into Equation \ref{8.19} results in

$\frac{dH(\mathbf{q,p,}t)}{dt}=\sum_{j}\left( \dot{q}_{j}\dot{p} _{j}+p_{j}\frac{d\dot{q}_{j}}{dt}-\left[ \dot{p}_{j}-\sum_{k=1}^{m}\lambda _{k}\frac{\partial g_{k}}{\partial q_{j}}-Q_{j}^{EXC}\right] \dot{q} _{j}-p_{j}\frac{d\dot{q}_{j}}{dt}\right) -\frac{\partial L}{\partial t}\label{8.20}$ The second and fourth terms cancel as well as the $$\dot{q}_{j}\dot{p}_{j}$$ terms, leaving

$\frac{dH(\mathbf{q,p,}t)}{dt}=\sum_{j}\left( \left[ \sum_{k=1}^{m}\lambda _{k}\frac{\partial g_{k}}{\partial q_{j}}+Q_{j}^{EXC} \right] \dot{q}_{j}\right) -\frac{\partial L}{\partial t}\label{8.21}$

This is the generalized energy theorem given by equation $$(7.8.1)$$.

The total differential of the Hamiltonian also can be written as

$\frac{dH(\mathbf{q,p,}t)}{dt}=\sum_{j}\left( \frac{\partial H}{ \partial p_{j}}\dot{p}_{j}+\frac{\partial H}{\partial q_{j}}\dot{q} _{j}\right) +\frac{\partial H}{\partial t}\label{8.22}$

Use equations \ref{8.15} and \ref{8.18} to substitute for $$\frac{\partial H}{ \partial p_{j}}$$ and $$\frac{\partial H}{\partial q_{j}}$$ in Equation \ref{8.22} gives

$\frac{dH(\mathbf{q,p,}t)}{dt}=\sum_{j}\left( \left[ \sum_{k=1}^{m}\lambda _{k}\frac{\partial g_{k}}{\partial q_{j}}+Q_{j}^{EXC} \right] \dot{q}_{j}\right) +\frac{\partial H(\mathbf{q,p,}t)}{ \partial t}\label{8.23}$

Note that Equation \ref{8.23} must equal the generalized energy theorem, i.e. Equation \ref{8.21}. Therefore,

$\frac{\partial H}{\partial t}=-\frac{\partial L}{\partial t}\label{8.24}$

In summary, Hamilton’s equations of motion are given by

\begin{align} \dot{q}_{j} &= \frac{\partial H(\mathbf{q,p,}t)}{\partial p_{j}} \label{8.25}\\[4pt] \dot{p}_{j} &=-\frac{\partial H(\mathbf{q,p,}t)}{\partial q_{j}}+ \left[ \sum_{k=1}^{m}\lambda _{k}\frac{\partial g_{k}}{\partial q_{j}} +Q_{j}^{EXC}\right] \label{8.26}\\[4pt] \frac{dH(\mathbf{q,p,}t)}{dt} &= \sum_{j}\left( \left[ \sum_{k=1}^{m}\lambda _{k}\frac{\partial g_{k}}{\partial q_{j}}+Q_{j}^{EXC} \right] \dot{q}_{j}\right) -\frac{\partial L(\mathbf{q,\dot{q},}t)}{ \partial t}\label{8.27}\end{align}

The symmetry of Hamilton’s equations of motion is illustrated when the Lagrange multiplier and generalized forces are zero. Then

\begin{align} \dot{q}_{j} &= \frac{\partial H(\mathbf{q,p,}t)}{\partial p_{j}} \label{8.28}\\[4pt] \dot{p}_{j} &= -\frac{\partial H(\mathbf{p,q},t)}{\partial q_{j}} \label{8.29}\\[4pt] \frac{dH(\mathbf{p,q},t)}{dt} &= \frac{\partial H(\mathbf{p,q},t )}{\partial t}=-\frac{\partial L(\mathbf{\dot{q},q,}t)}{ \partial t}\end{align}\label{8.30}

This simplified form illustrates the symmetry of Hamilton’s equations of motion. Many books present the Hamiltonian only for this special simplified case where it is holonomic, conservative, and generalized coordinates are used.

Canonical Equations of Motion

Hamilton’s equations of motion, summarized in equations \ref{8.25}-\ref{8.27} use either a minimal set of generalized coordinates, or the Lagrange multiplier terms, to account for holonomic constraints, or generalized forces $$Q_{j}^{EXC}$$ to account for non-holonomic or other forces. Hamilton’s equations of motion usually are called the canonical equations of motion. Note that the term "canonical" has nothing to do with religion or canon law; the reason for this name has bewildered many generations of students of classical mechanics. The term was introduced by Jacobi in $$1837$$ to designate a simple and fundamental set of conjugate variables and equations. Note the symmetry of Hamilton’s two canonical equations, plus the fact that the canonical variables $$p_{k},q_{k}$$ are treated as independent canonical variables. The Lagrange mechanics coordinates $$(\mathbf{q, \dot{q},}t)$$ are replaced by the Hamiltonian mechanics coordinates $$(\mathbf{ q,p,}t),$$ where the conjugate momenta $$\mathbf{p}$$ are taken to be independent of the coordinate $$\mathbf{q}$$.

Lagrange was the first to derive the canonical equations but he did not recognize them as a basic set of equations of motion. Hamilton derived the canonical equations of motion from his fundamental variational principle, chapter $$9.2$$, and made them the basis for a far-reaching theory of dynamics. Hamilton’s equations give $$2s$$ first-order differential equations for $$p_{k},q_{k}$$ for each of the $$s=n-m$$ degrees of freedom. Lagrange’s equations give $$s$$ second-order differential equations for the $$s$$ independent generalized coordinates $$q_{k},\dot{q}_{k}.$$

It has been shown that $$H(\mathbf{p,q},t)$$ and $$L(\mathbf{\dot{q},q, }t)$$ are the Legendre transforms of each other. Although the Lagrangian formulation is ideal for solving numerical problems in classical mechanics, the Hamiltonian formulation provides a better framework for conceptual extensions to other fields of physics since it is written in terms of the fundamental conjugate coordinates, $$\mathbf{q,p}$$. The Hamiltonian is used extensively in modern physics, including quantum physics, as discussed in chapters $$15$$ and $$18$$. For example, in quantum mechanics there is a straightforward relation between the classical and quantal representations of momenta; this does not exist for the velocities.

The concept of state space, introduced in chapter $$3.3.2$$, applies naturally to Lagrangian mechanics since $$(\dot{q},q)$$ are the generalized coordinates used in Lagrangian mechanics. The concept of Phase Space, introduced in chapter $$3.3.3$$, naturally applies to Hamiltonian phase space since $$(p,q)$$ are the generalized coordinates used in Hamiltonian mechanics.

This page titled 8.3: Hamilton’s Equations of Motion is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or curated by Douglas Cline via source content that was edited to the style and standards of the LibreTexts platform.