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 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 be a mechanical system with configuration space and smooth Lagrangian Select a standard coordinate system on the tangent bundle The quantities are called momenta. (Also generalized momenta, conjugate momenta, and canonical momenta). For a time instant the Legendre transformation of is defined as the map which is assumed to have a smooth inverse For a system with degrees of freedom, the Lagrangian mechanics defines the energy function
The Legendre transform of turns into a function known as the . The Hamiltonian satisfies
which implies that
where the velocities are found from the (-dimensional) equation which, by assumption, is uniquely solvable for . The (-dimensional) pair is called phase space coordinates. (Also canonical coordinates).
From Euler–Lagrange equation to Hamilton's equations In phase space coordinates , the (-dimensional) Euler–Lagrange equation
becomes Hamilton's equations in dimensions
From stationary action principle to Hamilton's equations Let be the set of smooth paths for which and The action functional is defined via
where , and (see above). A path is a stationary point of (and hence is an equation of motion) if and only if the path 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 . The value of the Hamiltonian is the total energy of the system, in this case the sum of kinetic and potential energy, traditionally denoted and , respectively. Here is the momentum and is the space coordinate. Then
is a function of alone, while is a function of alone (i.e., and are scleronomic).
In this example, the time derivative of 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 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 , where is fixed, . The Lagrangian for this system is
Thus the Hamiltonian is
where
and
In terms of coordinates and momenta, the Hamiltonian reads
Hamilton's equations give the time evolution of coordinates and conjugate momenta in four first-order differential equations,
Momentum , which corresponds to the vertical component of angular momentum , 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 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 , generalized positions , and generalized velocities , where .This derivation is along the lines as given in Here we work off-shell, meaning , , are independent coordinates in phase space, not constrained to follow any equations of motion (in particular, is not a derivative of ). The total differential of the Lagrangian is:
The generalized momentum coordinates were defined as , so we may rewrite the equation as:
After rearranging, one obtains:
The term in parentheses on the left-hand side is just the Hamiltonian defined previously, therefore:
One may also calculate the total differential of the Hamiltonian with respect to coordinates , , instead of , , , yielding:
One may now equate these two expressions for , one in terms of , the other in terms of :
Since these calculations are off-shell, one can equate the respective coefficients of , , on the two sides:
On-shell, one substitutes parametric functions which define a trajectory in phase space with velocities , obeying Lagrange's equations:
Rearranging and writing in terms of the on-shell gives:
Thus Lagrange's equations are equivalent to Hamilton's equations:
In the case of time-independent and , i.e. , Hamilton's equations consist of first-order differential equations, while Lagrange's equations consist of second-order equations. Hamilton's equations usually do not reduce the difficulty of finding explicit solutions, but important theoretical results can be derived from them, because coordinates and momenta are independent variables with nearly symmetric roles.
Hamilton's equations have another advantage over Lagrange's equations: if a system has a symmetry, so that some coordinate does not occur in the Hamiltonian (i.e. a cyclic coordinate), the corresponding momentum coordinate is conserved along each trajectory, and that coordinate can be reduced to a constant in the other equations of the set. This effectively reduces the problem from coordinates to coordinates: this is the basis of symplectic reduction in geometry. In the Lagrangian framework, the conservation of momentum also follows immediately, however all the generalized velocities still occur in the Lagrangian, and a system of equations in coordinates still has to be solved.
The Lagrangian and Hamiltonian approaches provide the groundwork for deeper results in classical mechanics, and suggest analogous formulations in quantum mechanics: the path integral formulation and the Schrödinger equation.
Properties of the Hamiltonian The value of the Hamiltonian is the total energy of the system if and only if the energy function has the same property. (See definition of ). when , form a solution of Hamilton's equations. Indeed, and everything but the final term cancels out. does not change under point transformations, i.e. smooth changes of space coordinates. (Follows from the invariance of the energy function under point transformations. The invariance of can be established directly). (See ). . (Compare Hamilton's and Euler–Lagrange equations or see ). if and only if .A coordinate for which the last equation holds is called cyclic (or ignorable). Every cyclic coordinate reduces the number of degrees of freedom by , causes the corresponding momentum to be conserved, and makes Hamilton's equations easier to solve.
Hamiltonian as the total system energy In its application to a given system, the Hamiltonian is often taken to be
where is the kinetic energy and is the potential energy. Using this relation can be simpler than first calculating the Lagrangian, and then deriving the Hamiltonian from the Lagrangian. However, the relation is not true for all systems.
The relation holds true for nonrelativistic systems when all of the following conditions are satisfied
where is time, is the number of degrees of freedom of the system, and each is an arbitrary scalar function of .
In words, this means that the relation holds true if does not contain time as an explicit variable (it is scleronomic), does not contain generalised velocity as an explicit variable, and each term of is quadratic in generalised velocity.
Proof Preliminary to this proof, it is important to address an ambiguity in the related mathematical notation. While a change of variables can be used to equate , it is important to note that . In this case, the right hand side always evaluates to 0. To perform a change of variables inside of a partial derivative, the multivariable chain rule should be used. Hence, to avoid ambiguity, the function arguments of any term inside of a partial derivative should be stated.
Additionally, this proof uses the notation to imply that .
Application to systems of point masses For a system of point masses, the requirement for to be quadratic in generalised velocity is always satisfied for the case where , which is a requirement for anyway.
Conservation of energy If the conditions for are satisfied, then conservation of the Hamiltonian implies conservation of energy. This requires the additional condition that does not contain time as an explicit variable.
In summary, the requirements for to be satisfied for a nonrelativistic system are
is a homogeneous quadratic function in
Regarding extensions to the Euler-Lagrange formulation which use dissipation functions (See ), e.g. the Rayleigh dissipation function, energy is not conserved when a dissipation function has effect. It is possible to explain the link between this and the former requirements by relating the extended and conventional Euler-Lagrange equations: grouping the extended terms into the potential function produces a velocity dependent potential. Hence, the requirements are not satisfied when a dissipation function has effect.
Hamiltonian of a charged particle in an electromagnetic field
A sufficient illustration of Hamiltonian mechanics is given by the Hamiltonian of a charged particle in an electromagnetic field. In Cartesian coordinates the Lagrangian of a non-relativistic classical particle in an electromagnetic field is (in SI Units):
where is the electric charge of the particle, is the electric scalar potential, and the are the components of the magnetic vector potential that may all explicitly depend on and .
This Lagrangian, combined with Euler–Lagrange equation, produces the Lorentz force law
and is called minimal coupling.
The canonical momenta are given by:
The Hamiltonian, as the Legendre transformation of the Lagrangian, is therefore:
This equation is used frequently in quantum mechanics.
Under gauge transformation:
where is any scalar function of space and time. The aforementioned Lagrangian, the canonical momenta, and the Hamiltonian transform like:
which still produces the same Hamilton's equation:
In quantum mechanics, the wave function will also undergo a local U(1) group transformation during the Gauge Transformation, which implies that all physical results must be invariant under local U(1) transformations.
From symplectic geometry to Hamilton's equations
Geometry of Hamiltonian systems
The Hamiltonian can induce a symplectic structure on a smooth even-dimensional manifold in several equivalent ways, the best known being the following:
As a closed nondegenerate symplectic 2-form ω. According to Darboux's theorem, in a small neighbourhood around any point on there exist suitable local coordinates (canonical or symplectic coordinates) in which the symplectic form becomes:
The form induces a natural isomorphism of the tangent space with the cotangent space: . This is done by mapping a vector to the 1-form , where for all . Due to the bilinearity and non-degeneracy of , and the fact that , the mapping is indeed a linear isomorphism. This isomorphism is natural in that it does not change with change of coordinates on Repeating over all , we end up with an isomorphism between the infinite-dimensional space of smooth vector fields and that of smooth 1-forms. For every and ,
(In algebraic terms, one would say that the -modules and are isomorphic). If , then, for every fixed , , and . is known as a Hamiltonian vector field. The respective differential equation on
is called . Here and is the (time-dependent) value of the vector field at .