Definitions

# Hamiltonian mechanics

Hamiltonian mechanics is a re-formulation of classical mechanics that was introduced in 1833 by Irish mathematician William Rowan Hamilton. It arose from Lagrangian mechanics, a previous re-formulation of classical mechanics introduced by Joseph Louis Lagrange in 1788, but can be formulated without recourse to Lagrangian mechanics using "symplectic spaces" (See Mathematical formalism, below). The Hamiltonian method differs from the Lagrangian method in that instead of expressing second-order differential constraints on an n-dimensional coordinate space, it expresses first-order constraints on a 2n-dimensional phase space.

As with Lagrangian mechanics, Hamilton's equations provide a new and equivalent way of looking at classical mechanics. Generally, these equations do not provide a more convenient way of solving a particular problem. Rather, they provide deeper insights into both the general structure of classical mechanics and its connection to quantum mechanics as understood through Hamiltonian mechanics, as well as its connection to other areas of science.

## Simplified overview of uses

For a closed system the sum of the kinetic and potential energy in the system is represented by a set of differential equations known as the Hamilton equations for that system. Hamiltonians can be used to describe such simple systems as a bouncing ball, a pendulum or an oscillating spring in which energy changes from kinetic to potential and back again over time. Hamiltonians can also be employed to model the energy of other more complex dynamic systems such as planetary orbits and in quantum mechanics.

The Hamilton equations are generally written as follows:

$dot p = -frac\left\{partial mathcal\left\{H\right\}\right\}\left\{partial q\right\}$
$dot q =~~frac\left\{partial mathcal\left\{H\right\}\right\}\left\{partial p\right\}$

In the above equations, the dot denotes the ordinary derivative with respect to time of the functions p = p(t) (called generalized momenta) and q = q(t) (called generalized coordinates), taking values in some vector space, and $mathcal\left\{H\right\}$ = $mathcal\left\{H\right\}\left(p,q,t\right)$ is the so-called Hamiltonian, or (scalar valued) Hamiltonian function. Thus, a little more explicitly, one can equivalently write

$frac\left\{mathrm d\right\}\left\{mathrm dt\right\}p\left(t\right) = -frac\left\{partial\right\}\left\{partial q\right\}mathcal\left\{H\right\}\left(p\left(t\right),q\left(t\right),t\right)$
$frac\left\{mathrm d\right\}\left\{mathrm dt\right\}q\left(t\right) =~~frac\left\{partial\right\}\left\{partial p\right\}mathcal\left\{H\right\}\left(p\left(t\right),q\left(t\right),t\right)$

and specify the domain of values in which the parameter t ("time") varies.

For a detailed derivation of these equations from Lagrangian mechanics, see below.

### Basic physical interpretation

The simplest interpretation of the Hamilton Equations is as follows, applying them to a one-dimensional system consisting of one particle of mass m and exhibiting conservation of energy: The Hamiltonian $mathcal\left\{H\right\}$ represents the energy of the system, which is the sum of kinetic and potential energy, traditionally denoted T & V, respectively. Here q is the x-coordinate and p is the momentum, mv. Then

$mathcal\left\{H\right\} = T + V , quad T = frac\left\{p^2\right\}\left\{2m\right\} , quad V = V\left(q\right) = V\left(x\right).$
Note that T is a function of p alone, while V is a function of x (or q) alone.

Now the time-derivative of the momentum p equals the Newtonian force, and so here the first Hamilton Equation means that the force on the particle equals the rate at which it loses potential energy with respect to changes in x, its location. (Force equals the negative gradient of potential energy.)

The time-derivative of q here means the velocity: the second Hamilton Equation here means that the particle’s velocity equals the derivative of its kinetic energy with respect to its momentum. (For the derivative with respect to p of p2/2m equals p/m = mv/m = v.)

### Using Hamilton's equations

1. First write out the Lagrangian L = TV. Express T and V as though you were going to use Lagrange's equation.
2. Calculate the momenta by differentiating the Lagrangian with respect to velocity.
3. Express the velocities in terms of the momenta by inverting the expressions in step (2).
4. Calculate the Hamiltonian using the usual definition, $mathcal\left\{H\right\} = sum_i p_i \left\{dot q_i\right\} - mathcal\left\{L\right\}$. Substitute for the velocities using the results in step (3).
5. Apply Hamilton's equations.

### Notes

Hamilton's equations are appealing in view of their beautiful simplicity and (slightly broken) symmetry. They have been analyzed under almost every imaginable angle of view, from basic physics up to symplectic geometry. A lot is known about solutions of these equations, yet the exact general case solution of the equations of motion cannot be given explicitly for a system of more than two massive point particles. The finding of conserved quantities plays an important role in the search for solutions or information about their nature. In models with an infinite number of degrees of freedom, this is of course even more complicated. An interesting and promising area of research is the study of integrable systems, where an infinite number of independent conserved quantities can be constructed.

## Deriving Hamilton's equations

We can derive Hamilton's equations by looking at how the Lagrangian changes as you change the time and the positions and velocities of particles.

$mathrm\left\{d\right\} mathcal\left\{L\right\} = sum_i left \left(frac\left\{partial mathcal\left\{L\right\}\right\}\left\{partial q_i\right\} mathrm\left\{d\right\} q_i + frac\left\{partial mathcal\left\{L\right\}\right\}\left\{partial \left\{dot q_i\right\}\right\} mathrm\left\{d\right\} \left\{dot q_i\right\} right \right) + frac\left\{partial mathcal\left\{L\right\}\right\}\left\{partial t\right\} mathrm\left\{d\right\}t$

Now the generalized momenta were defined as $p_i = frac\left\{partial mathcal\left\{L\right\}\right\}\left\{partial \left\{dot q_i\right\}\right\}$ and Lagrange's equations tell us that $frac\left\{mathrm\left\{d\right\}\right\}\left\{mathrm\left\{d\right\}t\right\} frac\left\{partial mathcal\left\{L\right\}\right\}\left\{partial \left\{dot q_i\right\}\right\} - frac\left\{partial mathcal\left\{L\right\}\right\}\left\{partial q_i\right\} = F_i$ where $F_i$ is the generalized force. We can rearrange this to get $frac\left\{partial mathcal\left\{L\right\}\right\}\left\{partial q_i\right\} = \left\{dot p\right\}_i - F_i$ and substitute the result into the variation of the Lagrangian

$mathrm\left\{d\right\}mathcal\left\{L\right\} = sum_i left\left[left\left(\left\{dot p\right\}_i - F_i right\right) mathrm\left\{d\right\} q_i + p_i mathrm\left\{d\right\} \left\{dot q_i\right\} right\right] + frac\left\{partial mathcal\left\{L\right\}\right\}\left\{partial t\right\}mathrm\left\{d\right\}t$

We can rewrite this as

$mathrm\left\{d\right\} mathcal\left\{L\right\} = sum_i left \left[left \left(\left\{dot p\right\}_i - F_i right \right) mathrm\left\{d\right\}q_i + mathrm\left\{d\right\}left \left(p_i \left\{dot q_i\right\} right \right) - \left\{dot q_i\right\} mathrm\left\{d\right\} p_i right \right] + frac\left\{partial mathcal\left\{L\right\}\right\}\left\{partial t\right\}mathrm\left\{d\right\}t$

and rearrange again to get

$mathrm\left\{d\right\} left \left(sum_i p_i \left\{dot q_i\right\} - mathcal\left\{L\right\} right \right) = sum_i left \left[left \left(F_i-\left\{dot p\right\}_i right \right) mathrm\left\{d\right\} q_i + \left\{dot q_i\right\} mathrm\left\{d\right\}p_i right\right] - frac\left\{partial mathcal\left\{L\right\}\right\}\left\{partial t\right\}mathrm\left\{d\right\}t$

The term on the left-hand side is just the Hamiltonian that we have defined before, so we find that;

$mathrm\left\{d\right\} mathcal\left\{H\right\} = sum_i left \left[left \left(F_i-\left\{dot p\right\}_i right \right) mathrm\left\{d\right\} q_i + \left\{dot q_i\right\} mathrm\left\{d\right\} p_i right\right] - frac\left\{partial mathcal\left\{L\right\}\right\}\left\{partial t\right\}mathrm\left\{d\right\}t = sum_i left \left[frac\left\{partial mathcal\left\{H\right\}\right\}\left\{partial q_i\right\} mathrm\left\{d\right\} q_i + frac\left\{partial mathcal\left\{H\right\}\right\}\left\{partial p_i\right\} mathrm\left\{d\right\} p_i right \right] + frac\left\{partial mathcal\left\{H\right\}\right\}\left\{partial t\right\}mathrm\left\{d\right\}t$

where the second equality holds because of the definition of the partial derivatives. Associating terms from both sides of the equation above yields Hamilton's equations:


frac{partial mathcal{H}}{partial q_j} = F_j - dot{p}_j, qquad frac{partial mathcal{H}}{partial p_j} = dot{q}_j, qquad frac{partial mathcal{H}}{partial t } = - {partial mathcal{L} over partial t}.

## As a reformulation of Lagrangian mechanics

Starting with Lagrangian mechanics, the equations of motion are based on generalized coordinates

$left\left\{, q_j | j=1, ldots,N ,right\right\}$

and matching generalized velocities

$left\left\{, dot\left\{q\right\}_j | j=1, ldots ,N ,right\right\}$

We write the Lagrangian as

$mathcal\left\{L\right\}\left(q_j, dot\left\{q\right\}_j, t\right)$

with the subscripted variables understood to represent all N variables of that type. Hamiltonian mechanics aims to replace the generalized velocity variables with generalized momentum variables, also known as conjugate momenta. By doing so, it is possible to handle certain systems, such as aspects of quantum mechanics, that would otherwise be even more complicated.

For each generalized velocity, there is one corresponding conjugate momentum, defined as:

$p_j = \left\{partial mathcal\left\{L\right\} over partial dot\left\{q\right\}_j\right\}$

In Cartesian coordinates, the generalized momenta are precisely the physical linear momenta. In circular polar coordinates, the generalized momentum corresponding to the angular velocity is the physical angular momentum. For an arbitrary choice of generalized coordinates, it may not be possible to obtain an intuitive interpretation of the conjugate momenta.

One thing which is not too obvious in this coordinate dependent formulation is that different generalized coordinates are really nothing more than different coordinatizations of the same symplectic manifold.

The Hamiltonian is the Legendre transform of the Lagrangian:

$mathcal\left\{H\right\}left\left(q_j,p_j,tright\right) = sum_i dot\left\{q\right\}_i p_i - mathcal\left\{L\right\}\left(q_j,dot\left\{q\right\}_j,t\right)$

If the transformation equations defining the generalized coordinates are independent of t, and the Lagrangian is a sum of products of functions (in the generalised coordinates) which are homogeneous of order 0, 1 or 2, then it can be shown that H is equal to the total energy E = T + V.

Each side in the definition of $mathcal\left\{H\right\}$ produces a differential:

begin\left\{align\right\}
mathrm{d}mathcal{H} &= sum_i left[left({partial mathcal{H} over partial q_i}right) mathrm{d}q_i + left({partial mathcal{H} over partial p_i}right) mathrm{d}p_i right] + left({partial mathcal{H} over partial t}right) mathrm{d}tqquadqquadquadquad &= sum_i left[dot{q}_i, mathrm{d}p_i + p_i, mathrm{d}dot{q}_i - left({partial mathcal{L} over partial q_i}right) mathrm{d}q_i - left({partial mathcal{L} over partial dot{q}_i}right) mathrm{d}dot{q}_i right] - left({partial mathcal{L} over partial t}right) mathrm{d}t end{align}

Substituting the previous definition of the conjugate momenta into this equation and matching coefficients, we obtain the equations of motion of Hamiltonian mechanics, known as the canonical equations of Hamilton:


frac{partial mathcal{H}}{partial q_j} = - dot{p}_j, qquad frac{partial mathcal{H}}{partial p_j} = dot{q}_j, qquad frac{partial mathcal{H}}{partial t } = - {partial mathcal{L} over partial t}

Hamilton's equations are first-order differential equations, and thus easier to solve than Lagrange's equations, which are second-order. However, the steps leading to the equations of motion are more onerous than in Lagrangian mechanics - beginning with the generalized coordinates and the Lagrangian, we must calculate the Hamiltonian, express each generalized velocity in terms of the conjugate momenta, and replace the generalized velocities in the Hamiltonian with the conjugate momenta. All in all, there is little labor saved from solving a problem with Hamiltonian mechanics rather than Lagrangian mechanics. Ultimately, it will produce the same solution as Lagrangian mechanics and Newton's laws of motion.

The principal appeal of the Hamiltonian approach is that it provides the groundwork for deeper results in the theory of classical mechanics.

## Geometry of Hamiltonian systems

A Hamiltonian system may be understood as a fiber bundle E over time R, with the fibers Et, tR being the position space. The Lagrangian is thus a function on the jet bundle J over E; taking the fiberwise Legendre transform of the Lagrangian produces a function on the dual bundle over time whose fiber at t is the cotangent space T*Et, which comes equipped with a natural symplectic form, and this latter function is the Hamiltonian.

## Generalization to quantum mechanics through Poisson bracket

The Hamilton's equations above work well for classical mechanics, but not for quantum mechanics, since the differential equations discussed assume that one can specify the exact position and momentum of the particle simultaneously at any point in time. However, the equations can be further generalized to apply to quantum mechanics as well as to classical mechanics, through the deformation of the Poisson algebra over p and q to the algebra of Moyal brackets. In this case, the more general form of the Hamilton's equation reads

$frac\left\{mathrm\left\{d\right\}f\right\}\left\{mathrm\left\{d\right\}t\right\} = \left\{f, mathcal\left\{H\right\}\right\} + frac\left\{partial f\right\}\left\{partial t\right\}$

where f is some function of p and q, and H is the Hamiltonian. To find out the rules for evaluating a Poisson bracket without resorting to differential equations, see Lie algebra; a Poisson bracket is the name for the Lie bracket in a Poisson algebra.

In fact, this more algebraic approach not only allows us to ultimately extend probability distributions in phase space to Wigner quasi-probability distributions, but also provides more power in the classical setting, in particular by helping to analyze the relevant conserved quantities in a system.

## Mathematical formalism

Any smooth real-valued function H on a symplectic manifold can be used to define a Hamiltonian system. The function H is known as the Hamiltonian or the energy function. The symplectic manifold is then called the phase space. The Hamiltonian induces a special vector field on the symplectic manifold, known as the symplectic vector field.

The symplectic vector field, also called the Hamiltonian vector field, induces a Hamiltonian flow on the manifold. The integral curves of the vector field are a one-parameter family of transformations of the manifold; the parameter of the curves is commonly called the time. The time evolution is given by symplectomorphisms. By Liouville's theorem, each symplectomorphism preserves the volume form on the phase space. The collection of symplectomorphisms induced by the Hamiltonian flow is commonly called the Hamiltonian mechanics of the Hamiltonian system.

The Hamiltonian vector field also induces a special operation, the Poisson bracket. The Poisson bracket acts on functions on the symplectic manifold, thus giving the space of functions on the manifold the structure of a Lie algebra.

In particular, given a function f

$frac\left\{mathrm\left\{d\right\}\right\}\left\{mathrm\left\{d\right\}t\right\} f=frac\left\{partial \right\}\left\{partial t\right\} f + \left\{,f,mathcal\left\{H\right\},\right\}.$

If we have a probability distribution, ρ, then (since the phase space velocity ($\left\{dot p_i\right\} , \left\{dot q _i\right\}$) has zero divergence, and probability is conserved) its convective derivative can be shown to be zero and so

$frac\left\{partial\right\}\left\{partial t\right\} rho = - \left\{,rho ,mathcal\left\{H\right\},\right\}.$

This is called Liouville's theorem. Every smooth function G over the symplectic manifold generates a one-parameter family of symplectomorphisms and if { G, H } = 0, then G is conserved and the symplectomorphisms are symmetry transformations.

A Hamiltonian may have multiple conserved quantities Gi. If the symplectic manifold has dimension 2n and there are n functionally independent conserved quantities Gi which are in involution (i.e., { Gi, Gj } = 0), then the Hamiltonian is Liouville integrable. The Liouville–Arnol'd theorem says that locally, any Liouville integrable Hamiltonian can be transformed via a symplectomorphism in a new Hamiltonian with the conserved quantities Gi as coordinates; the new coordinates are called action-angle coordinates. The transformed Hamiltonian depends only on the Gi, and hence the equations of motion have the simple form

$dot\left\{G\right\}_i = 0, qquad dot\left\{varphi\right\}_i = F\left(G\right),$
for some function F (Arnol'd et al., 1988). There is an entire field focusing on small deviations from integrable systems governed by the KAM theorem.

The integrability of Hamiltonian vector fields is an open question. In general, Hamiltonian systems are chaotic; concepts of measure, completeness, integrability and stability are poorly defined. At this time, the study of dynamical systems is primarily qualitative, and not a quantitative science.

## Riemannian manifolds

An important special case consists of those Hamiltonians that are quadratic forms, that is, Hamiltonians that can be written as

$mathcal\left\{H\right\}\left(q,p\right)= frac\left\{1\right\}\left\{2\right\} langle p,prangle_q$

where $langlecdot,cdotrangle_q$ is a cometric on the fiber $T_q^*Q$, the cotangent space to the point q in the configuration space. This Hamiltonian consists entirely of the kinetic term.

If one considers a Riemannian manifold or a pseudo-Riemannian manifold, so that one has an invertible, non-degenerate metric, then the cometric is given simply as the inverse of the metric. The solutions to the Hamilton–Jacobi equations for this Hamiltonian are then the same as the geodesics on the manifold. In particular, the Hamiltonian flow in this case is the same thing as the geodesic flow. The existence of such solutions, and the completeness of the set of solutions, are discussed in detail in the article on geodesics. See also Geodesics as Hamiltonian flows.

## Sub-Riemannian manifolds

When the cometric is degenerate, then it is not invertible. In this case, one does not have a Riemannian manifold, as one does not have a metric. However, the Hamiltonian still exists. In the case where the cometric is degenerate at every point q of the configuration space manifold Q, so that the rank of the cometric is less than the dimension of the manifold Q, one has a sub-Riemannian manifold.

The Hamiltonian in this case is known as a sub-Riemannian Hamiltonian. Every such Hamiltonian uniquely determines the cometric, and vice-versa. This implies that every sub-Riemannian manifold is uniquely determined by its sub-Riemannian Hamiltonian, and that the converse is true: every sub-Riemannian manifold has a unique sub-Riemannian Hamiltonian. The existence of sub-Riemannian geodesics is given by the Chow-Rashevskii theorem.

The continuous, real-valued Heisenberg group provides a simple example of a sub-Riemannian manifold. For the Heisenberg group, the Hamiltonian is given by

$mathcal\left\{H\right\}\left(x,y,z,p_x,p_y,p_z\right)=frac\left\{1\right\}\left\{2\right\}left\left( p_x^2 + p_y^2 right\right)$.

$p_z$ is not involved in the Hamiltonian.

## Poisson algebras

Hamiltonian systems can be generalized in various ways. Instead of simply looking at the algebra of smooth functions over a symplectic manifold, Hamiltonian mechanics can be formulated on general commutative unital real Poisson algebras. A state is a continuous linear functional on the Poisson algebra (equipped with some suitable topology) such that for any element A of the algebra, A² maps to a nonnegative real number.

A further generalization is given by Nambu dynamics.

## Charged particle in an electromagnetic field

A good illustration of Hamiltonian mechanics is given by the Hamiltonian of a charged particle in an electromagnetic field. In Cartesian coordinates (i.e. $q_i = x_i$), the Lagrangian of a non-relativistic classical particle in an electromagnetic field is (in SI Units):

$mathcal\left\{L\right\} = sum_i tfrac\left\{1\right\}\left\{2\right\} m dot\left\{x\right\}_i^2 + sum_i e dot\left\{x\right\}_i A_i - e phi,$

where e is the electric charge of the particle (not necessarily the electron charge), $phi$ is the electric scalar potential, and the $A_i$ are the components of the magnetic vector potential (these may be modified through a gauge tranformations).

The generalized momenta may be derived by:

$p_j = frac\left\{partial L\right\}\left\{ partial dot\left\{x\right\}_j\right\} = m dot\left\{x\right\}_j + e A_j.$

Rearranging, we may express the velocities in terms of the momenta, as:

$dot\left\{x\right\}_j = frac\left\{ p_j - e A_j \right\}\left\{m\right\}.$

If we substitute the definition of the momenta, and the definitions of the velocities in terms of the momenta, into the definition of the Hamiltonian given above, and then simplify and rearrange, we get:

$mathcal\left\{H\right\} = sum_i dot\left\{x\right\}_i p_i - mathcal\left\{L\right\} = sum_i frac\left\{ \left(p_i - e A_i\right)^2 \right\} \left\{2 m \right\} + e phi.$

This equation is used frequently in quantum mechanics.

## Hamilton's Principle Applied to Deformable Bodies

Hamilton's Principle is an important variational principle in elastodynamics. As opposed to a system composed of rigid bodies, deformable bodies have an infinite number of degrees of freedom and occupy continuous regions of space; consequently, the state of the system is described by using continuous functions of space and time. The extended Hamilton Principle for such bodies is given by

$int_\left\{t1\right\}^\left\{t2\right\} left\left[delta W_e + delta T - delta U right\right]dt = 0$

where $T$ is the kinetic energy, $U$ is the elastic energy, $W_e$ is the work done by external loads on the body, and $t_1, t_2$ the initial and final times. If the system is conservative, the work done by external forces may be derived from a scalar potential $V$. In this case,

$delta int_\left\{t1\right\}^\left\{t2\right\} left\left[T - \left(U + V\right) right\right]dt = 0$

This is called Hamilton's Principle and it is invariant under coordinate transformations.