In physics, Hamiltonian mechanics is a reformulation of Lagrangian mechanics that emerged in 1833. Introduced by Sir William Rowan Hamilton, Hamiltonian mechanics replaces (generalized) velocities q ˙ i {\displaystyle {\dot {q}}^{i}} used in Lagrangian mechanics with (generalized) momenta. Both theories provide interpretations of classical mechanics and describe the same physical phenomena. Hamiltonian mechanics has a close relationship with geometry (notably, symplectic geometry and Poisson structures) and serves as a link between classical and quantum mechanics.
Overview
Phase space coordinates (p, q) and Hamiltonian H Let ( M , L ) {\displaystyle (M,{\mathcal {L}})} be a mechanical system with configuration space M {\displaystyle M} and smooth Lagrangian L . {\displaystyle {\mathcal {L}}.} Select a standard coordinate system ( q , q ˙ ) {\displaystyle ({\boldsymbol {q}},{\boldsymbol {\dot {q}}})} on the tangent bundle T M . {\displaystyle TM.} The quantities p i ( q , q ˙ , t ) = def ∂ L / ∂ q ˙ i {\displaystyle \textstyle p_{i}({\boldsymbol {q}},{\boldsymbol {\dot {q}}},t)~{\stackrel {\text{def}}{=}}~{\partial {\mathcal {L}}}/{\partial {\dot {q}}^{i}}} are called momenta. (Also generalized momenta, conjugate momenta, and canonical momenta). For a time instant t , {\displaystyle t,} the Legendre transformation of L {\displaystyle {\mathcal {L}}} is defined as the map ( q , q ˙ ) → ( p , q ) {\displaystyle ({\boldsymbol {q}},{\boldsymbol {\dot {q}}})\to \left({\boldsymbol {p}},{\boldsymbol {q}}\right)} which is assumed to have a smooth inverse ( p , q ) → ( q , q ˙ ) . {\displaystyle ({\boldsymbol {p}},{\boldsymbol {q}})\to ({\boldsymbol {q}},{\boldsymbol {\dot {q}}}).} For a system with n {\displaystyle n} degrees of freedom, the Lagrangian mechanics defines the energy function
E L ( q , q ˙ , t ) = def ∑ i = 1 n q ˙ i ∂ L ∂ q ˙ i − L . {\displaystyle E_{\mathcal {L}}({\boldsymbol {q}},{\boldsymbol {\dot {q}}},t)\,{\stackrel {\text{def}}{=}}\,\sum _{i=1}^{n}{\dot {q}}^{i}{\frac {\partial {\mathcal {L}}}{\partial {\dot {q}}^{i}}}-{\mathcal {L}}.}
The Legendre transform of L {\displaystyle {\mathcal {L}}} turns E L {\displaystyle E_{\mathcal {L}}} into a function H ( p , q , t ) {\displaystyle {\mathcal {H}}({\boldsymbol {p}},{\boldsymbol {q}},t)} known as the Hamiltonian. The Hamiltonian satisfies
H ( ∂ L ∂ q ˙ , q , t ) = E L ( q , q ˙ , t ) {\displaystyle {\mathcal {H}}{\left({\frac {\partial {\mathcal {L}}}{\partial {\boldsymbol {\dot {q}}}}},{\boldsymbol {q}},t\right)}=E_{\mathcal {L}}({\boldsymbol {q}},{\boldsymbol {\dot {q}}},t)}
which implies that
H ( p , q , t ) = ∑ i = 1 n p i q ˙ i − L ( q , q ˙ , t ) , {\displaystyle {\mathcal {H}}({\boldsymbol {p}},{\boldsymbol {q}},t)=\sum _{i=1}^{n}p_{i}{\dot {q}}^{i}-{\mathcal {L}}({\boldsymbol {q}},{\boldsymbol {\dot {q}}},t),}
where the velocities q ˙ = ( q ˙ 1 , … , q ˙ n ) {\displaystyle {\boldsymbol {\dot {q}}}=({\dot {q}}^{1},\ldots ,{\dot {q}}^{n})} are found from the ( n {\displaystyle n} -dimensional) equation p = ∂ L / ∂ q ˙ {\displaystyle \textstyle {\boldsymbol {p}}={\partial {\mathcal {L}}}/{\partial {\boldsymbol {\dot {q}}}}} which, by assumption, is uniquely solvable for q ˙ {\displaystyle {\boldsymbol {\dot {q}}}} . The ( 2 n {\displaystyle 2n} -dimensional) pair ( p , q ) {\displaystyle ({\boldsymbol {p}},{\boldsymbol {q}})} is called phase space coordinates. (Also canonical coordinates).
From Euler–Lagrange equation to Hamilton's equations In phase space coordinates ( p , q ) {\displaystyle ({\boldsymbol {p}},{\boldsymbol {q}})} , the ( n {\displaystyle n} -dimensional) Euler–Lagrange equation
∂ L ∂ q − d d t ∂ L ∂ q ˙ = 0 {\displaystyle {\frac {\partial {\mathcal {L}}}{\partial {\boldsymbol {q}}}}-{\frac {d}{dt}}{\frac {\partial {\mathcal {L}}}{\partial {\dot {\boldsymbol {q}}}}}=0}
becomes Hamilton's equations in 2 n {\displaystyle 2n} dimensions
From stationary action principle to Hamilton's equations Let P ( a , b , x a , x b ) {\displaystyle {\mathcal {P}}(a,b,{\boldsymbol {x}}_{a},{\boldsymbol {x}}_{b})} be the set of smooth paths q : [ a , b ] → M {\displaystyle {\boldsymbol {q}}:[a,b]\to M} for which q ( a ) = x a {\displaystyle {\boldsymbol {q}}(a)={\boldsymbol {x}}_{a}} and q ( b ) = x b . {\displaystyle {\boldsymbol {q}}(b)={\boldsymbol {x}}_{b}.} The action functional S : P ( a , b , x a , x b ) → R {\displaystyle {\mathcal {S}}:{\mathcal {P}}(a,b,{\boldsymbol {x}}_{a},{\boldsymbol {x}}_{b})\to \mathbb {R} } is defined via
S [ q ] = ∫ a b L ( t , q ( t ) , q ˙ ( t ) ) d t = ∫ a b ( ∑ i = 1 n p i q ˙ i − H ( p , q , t ) ) d t , {\displaystyle {\mathcal {S}}[{\boldsymbol {q}}]=\int _{a}^{b}{\mathcal {L}}(t,{\boldsymbol {q}}(t),{\dot {\boldsymbol {q}}}(t))\,dt=\int _{a}^{b}\left(\sum _{i=1}^{n}p_{i}{\dot {q}}^{i}-{\mathcal {H}}({\boldsymbol {p}},{\boldsymbol {q}},t)\right)\,dt,}
where q = q ( t ) {\displaystyle {\boldsymbol {q}}={\boldsymbol {q}}(t)} , and p = ∂ L / ∂ q ˙ {\displaystyle {\boldsymbol {p}}=\partial {\mathcal {L}}/\partial {\boldsymbol {\dot {q}}}} (see above). A path q ∈ P ( a , b , x a , x b ) {\displaystyle {\boldsymbol {q}}\in {\mathcal {P}}(a,b,{\boldsymbol {x}}_{a},{\boldsymbol {x}}_{b})} is a stationary point of S {\displaystyle {\mathcal {S}}} (and hence is an equation of motion) if and only if the path ( p ( t ) , q ( t ) ) {\displaystyle ({\boldsymbol {p}}(t),{\boldsymbol {q}}(t))} in phase space coordinates obeys the Hamilton equations.
Basic physical interpretation A simple interpretation of Hamiltonian mechanics comes from its application on a one-dimensional system consisting of one nonrelativistic particle of mass m. The value H ( p , q ) {\displaystyle H(p,q)} of the Hamiltonian is the total energy of the system, in this case the sum of kinetic and potential energy, traditionally denoted T and V, respectively. Here p is the momentum mv and q is the space coordinate. Then
H = T + V , T = p 2 2 m , V = V ( q ) {\displaystyle {\mathcal {H}}=T+V,\qquad T={\frac {p^{2}}{2m}},\qquad V=V(q)}
T is a function of p alone, while V is a function of q alone (i.e., T and V are scleronomic). In this example, the time derivative of q is the velocity, and so the first Hamilton equation means that the particle's velocity equals the derivative of its kinetic energy with respect to its momentum. The time derivative of the momentum p equals the Newtonian force, and so the second Hamilton equation means that the force equals the negative gradient of potential energy.
Example
A spherical pendulum consists of a mass m moving without friction on the surface of a sphere. The only forces acting on the mass are the reaction from the sphere and gravity. Spherical coordinates are used to describe the position of the mass in terms of (r, θ, φ), where r is fixed, r = ℓ. The Lagrangian for this system is
L = 1 2 m ℓ 2 ( θ ˙ 2 + sin 2 θ φ ˙ 2 ) + m g ℓ cos θ . {\displaystyle L={\frac {1}{2}}m\ell ^{2}\left({\dot {\theta }}^{2}+\sin ^{2}\theta \ {\dot {\varphi }}^{2}\right)+mg\ell \cos \theta .}
Thus the Hamiltonian is
H = P θ θ ˙ + P φ φ ˙ − L {\displaystyle H=P_{\theta }{\dot {\theta }}+P_{\varphi }{\dot {\varphi }}-L}
where
P θ = ∂ L ∂ θ ˙ = m ℓ 2 θ ˙ {\displaystyle P_{\theta }={\frac {\partial L}{\partial {\dot {\theta }}}}=m\ell ^{2}{\dot {\theta }}}
and
P φ = ∂ L ∂ φ ˙ = m ℓ 2 sin 2 θ φ ˙ . {\displaystyle P_{\varphi }={\frac {\partial L}{\partial {\dot {\varphi }}}}=m\ell ^{2}\sin ^{2}\!\theta \,{\dot {\varphi }}.}
In terms of coordinates and momenta, the Hamiltonian reads
H = [ 1 2 m ℓ 2 θ ˙ 2 + 1 2 m ℓ 2 sin 2 θ φ ˙ 2 ] ⏟ T + [ − m g ℓ cos θ ] ⏟ V = P θ 2 2 m ℓ 2 + P φ 2 2 m ℓ 2 sin 2 θ − m g ℓ cos θ . {\displaystyle {\begin{aligned}H&=\underbrace {{\Bigl [}{\tfrac {1}{2}}m\ell ^{2}{\dot {\theta }}^{2}+{\tfrac {1}{2}}m\ell ^{2}\sin ^{2}\!\theta \,{\dot {\varphi }}^{2}{\Bigr ]}} _{T}+\underbrace {{\Bigl [}-mg\ell \cos \theta {\Bigr ]}} _{V}\\[2ex]&={\frac {P_{\theta }^{2}}{2m\ell ^{2}}}+{\frac {P_{\varphi }^{2}}{2m\ell ^{2}\sin ^{2}\theta }}-mg\ell \cos \theta .\end{aligned}}}
Hamilton's equations give the time evolution of coordinates and conjugate momenta in four first-order differential equations,
θ ˙ = P θ m ℓ 2 φ ˙ = P φ m ℓ 2 sin 2 θ P θ ˙ = P φ 2 m ℓ 2 sin 3 θ cos θ − m g ℓ sin θ P φ ˙ = 0. {\displaystyle {\begin{aligned}{\dot {\theta }}&={P_{\theta } \over m\ell ^{2}}\\[6pt]{\dot {\varphi }}&={P_{\varphi } \over m\ell ^{2}\sin ^{2}\theta }\\[6pt]{\dot {P_{\theta }}}&={P_{\varphi }^{2} \over m\ell ^{2}\sin ^{3}\theta }\cos \theta -mg\ell \sin \theta \\[6pt]{\dot {P_{\varphi }}}&=0.\end{aligned}}}
Momentum P φ {\displaystyle P_{\varphi }} , which corresponds to the vertical component of angular momentum L z = ℓ sin θ × m ℓ sin θ φ ˙ {\displaystyle L_{z}=\ell \sin \theta \times m\ell \sin \theta \,{\dot {\varphi }}} , is a constant of motion. That is a consequence of the rotational symmetry of the system around the vertical axis. Being absent from the Hamiltonian, azimuth φ {\displaystyle \varphi } is a cyclic coordinate, which implies conservation of its conjugate momentum.
Deriving Hamilton's equations Hamilton's equations can be derived by a calculation with the Lagrangian L {\displaystyle {\mathcal {L}}} , generalized positions qi, and generalized velocities ⋅qi, where i = 1 , … , n {\displaystyle i=1,\ldots ,n} . Here we work off-shell, meaning q i {\displaystyle q^{i}} , q ˙ i {\displaystyle {\dot {q}}^{i}} , t {\displaystyle t} are independent coordinates in phase space, not constrained to follow any equations of motion (in particular, q ˙ i {\displaystyle {\dot {q}}^{i}} is not a derivative of q i {\displaystyle q^{i}} ). The total differential of the Lagrangian is:
d L = ∑ i ( ∂ L ∂ q i d q i + ∂ L ∂ q ˙ i d q ˙ i ) + ∂ L ∂ t d t . {\displaystyle \mathrm {d} {\mathcal {L}}=\sum _{i}\left({\frac {\partial {\mathcal {L}}}{\partial q^{i}}}\mathrm {d} q^{i}+{\frac {\partial {\mathcal {L}}}{\partial {\dot {q}}^{i}}}\,\mathrm {d} {\dot {q}}^{i}\right)+{\frac {\partial {\mathcal {L}}}{\partial t}}\,\mathrm {d} t\ .}
The generalized momentum coordinates were defined as p i = ∂ L / ∂ q ˙ i {\displaystyle p_{i}=\partial {\mathcal {L}}/\partial {\dot {q}}^{i}} , so we may rewrite the equation as:
d L = ∑ i ( ∂ L ∂ q i d q i + p i d q ˙ i ) + ∂ L ∂ t d t = ∑ i ( ∂ L ∂ q i d q i + d ( p i
