Jump to content

Hamilton's principle/Mathematics/The Hamiltonian and Hamilton's equations: Difference between revisions

From The Invariance Itself
hamiltons-principle>HPVBuild
Initial import of M3-02
 
m 1 revision imported
(No difference)

Revision as of 05:05, 9 September 2026

Plain-language version: The Hamiltonian

Applying the Legendre transform to a Lagrangian replaces n second-order equations by 2n first-order ones. The new equations are symmetric in form, treat position and momentum on the same footing, and describe motion as a flow in a 2n-dimensional space. This page derives them and states what the change of description buys.

Setup

Phase portrait of a pendulum.

Take L(t,qi,q˙i) with i=1,…,n, writing t for the independent variable and qi for the coordinates, as the mechanical literature does. Define the momenta

pi=∂L∂q˙i(1)

and assume the Hessian ∂2L/∂q˙i∂q˙k is invertible, so (1) inverts to give q˙i in terms of (t,q,p). The Hamiltonian is the Legendre transform of Hamilton's principle/Mathematics/The Legendre transform:

H(t,q,p)=∑i=1npiq˙i−L(2)

with every q˙i eliminated in favour of p. That elimination is not optional. H is a function of (t,q,p), and leaving a q˙ in it makes the derivatives below meaningless.

Derivation

Lagrangian and Hamiltonian descriptions compared.

Take the differential of (2), treating all variables as free:

dH=∑i(q˙idpi+pidq˙i)−∑i(∂L∂qidqi+∂L∂q˙idq˙i)−∂L∂tdt(3)

The dq˙i terms cancel by (1). This is the cancellation of Hamilton's principle/Mathematics/The Legendre transform and it is the whole derivation:

dH=∑iq˙idpi−∑i∂L∂qidqi−∂L∂tdt(4)

Since H is a function of (t,q,p), its differential is also

dH=∑i∂H∂qidqi+∑i∂H∂pidpi+∂H∂tdt(5)

Matching coefficients of the independent differentials in (4) and (5):

∂H∂pi=q˙i,∂H∂qi=−∂L∂qi,∂H∂t=−∂L∂t(6)

Nothing dynamical has been used yet; (6) is pure Legendre transform. Now impose the Euler-Lagrange equation of Hamilton's principle/Mathematics/The Euler-Lagrange equation, ∂L/∂qi=p˙i. Substituting into the middle relation of (6) gives Hamilton's canonical equations:

q˙i=∂H∂pi,p˙i=−∂H∂qi(7)

◼

The asymmetry of the minus sign is inherited from the passive-variable rule (8) of Hamilton's principle/Mathematics/The Legendre transform. It is a fact about the transform, not about physics.

What changed

Lagrangian Hamiltonian
unknowns n 2n
order second first
arguments (t,q,q˙) (t,q,p)
space configuration space phase space
a state is a point and a velocity a point

The count of constants is unchanged: n second-order equations and 2n first-order equations both carry 2n constants. No information is gained or lost. What changes is that in phase space a single point determines the entire future, so trajectories never cross, and the motion is a flow.

That geometric fact is what the reformulation buys, and it is the basis of every later development — canonical transformations, Liouville's theorem, and the Hamilton-Jacobi method of Hamilton's principle/Mathematics/The Hamilton-Jacobi equation.

Conservation

Along a solution,

dHdt=∑i(∂H∂qiq˙i+∂H∂pip˙i)+∂H∂t=∂H∂t(8)

the sum cancelling pairwise by (7). So H is conserved exactly when it carries no explicit time. This is the Beltrami identity of Hamilton's principle/Mathematics/The Beltrami identity in canonical form, and the cancellation in (8) is the sign structure earning its keep.

If in addition H does not contain qk, then (7) gives p˙k=0 immediately, and the coordinate is cyclic. In the Hamiltonian description a conservation law is read off by inspection.

When is H the energy?

Not always, and the conditions are worth stating because the identification is usually made silently.

If the kinetic energy is a homogeneous quadratic in the velocities and the potential depends on position only, then L=T−V and Euler's theorem on homogeneous functions gives ∑ipiq˙i=2T, so

H=2T−(T−V)=T+V(9)

and H is the energy. If the coordinates are time-dependent — a rotating frame, a moving constraint — then T is not homogeneous quadratic and H≠T+V, though H may still be conserved. Conserved and equal to the energy are two different claims.

Hamilton's own route

Hamilton did not arrive at (7) through the Legendre transform. He introduced the characteristic function first and obtained the canonical form as a consequence, remarking that his transformed equations coincide in all respects, a slight difference of notation excepted, with the elegant canonical forms in the Mécanique Analytique of Lagrange.[1]

The modern presentation inverts his order for good pedagogical reasons, and the cost is that the characteristic function looks like an afterthought when it was the point. Hamilton's principle/Mathematics/Action as a function of its endpoints restores his ordering.

Worked example: the harmonic oscillator

L=12mq˙2−12mω2q2(10)

Then p=mq˙, so q˙=p/m, and

H=p⋅pm−(p22m−12mω2q2)=p22m+12mω2q2(11)

Hamilton's equations are

q˙=pm,p˙=−mω2q(12)

Eliminating p recovers q¨+ω2q=0. But (11) read directly gives the phase portrait without solving anything: level sets of H are ellipses, so every trajectory is a closed curve traversed at constant energy. Reading the motion off the level sets, rather than integrating, is the characteristic Hamiltonian move.

Next

Hamilton's principle/Mathematics/The Hamilton-Jacobi equation seeks a canonical transformation that makes H vanish, converting the flow into a single partial differential equation.

References

  1. ↑ Hamilton, On a General Method in Dynamics (1834), §8, following equation (Z.). Verbatim phrase. ESTABLISHED source.