Jump to content

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

From The Invariance Itself
Add DISPLAYTITLE: title the page by its section rather than its path
Remove phrase duplicated by the piped link
 
(One intermediate revision by the same user not shown)
Line 22: Line 22:
<math>\partial^2 L / \partial \dot q_i \partial \dot q_k</math> is invertible, so
<math>\partial^2 L / \partial \dot q_i \partial \dot q_k</math> is invertible, so
(1) inverts to give <math>\dot q_i</math> in terms of
(1) inverts to give <math>\dot q_i</math> in terms of
<math>(t, q, p)</math>. The '''Hamiltonian''' is the Legendre transform of
<math>(t, q, p)</math>. The '''Hamiltonian''' is [[Hamilton's principle/Mathematics/The Legendre transform|the Legendre transform]]:
[[Hamilton's principle/Mathematics/The Legendre transform]]:


:<math>H(t, q, p) = \sum_{i=1}^n p_i \dot q_i - L
:<math>H(t, q, p) = \sum_{i=1}^n p_i \dot q_i - L
Line 46: Line 45:


The <math>d\dot q_i</math> terms cancel by (1). This is the cancellation of
The <math>d\dot q_i</math> terms cancel by (1). This is the cancellation of
[[Hamilton's principle/Mathematics/The Legendre transform]] and it is the whole
[[Hamilton's principle/Mathematics/The Legendre transform|the Legendre transform]] and it is the whole
derivation:
derivation:


Line 73: Line 72:
Nothing dynamical has been used yet; (6) is pure Legendre transform. Now impose
Nothing dynamical has been used yet; (6) is pure Legendre transform. Now impose
the Euler-Lagrange equation of
the Euler-Lagrange equation of
[[Hamilton's principle/Mathematics/The Euler-Lagrange equation]],
[[Hamilton's principle/Mathematics/The Euler-Lagrange equation|the Euler-Lagrange equation]],
<math>\partial L/\partial q_i = \dot p_i</math>. Substituting into the middle
<math>\partial L/\partial q_i = \dot p_i</math>. Substituting into the middle
relation of (6) gives '''Hamilton's canonical equations''':
relation of (6) gives '''Hamilton's canonical equations''':
Line 85: Line 84:


The asymmetry of the minus sign is inherited from the passive-variable rule (8)
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
of [[Hamilton's principle/Mathematics/The Legendre transform|the Legendre transform]]. It is a fact
about the transform, not about physics.
about the transform, not about physics.


Line 113: Line 112:
later development — canonical transformations, Liouville's theorem, and the
later development — canonical transformations, Liouville's theorem, and the
Hamilton-Jacobi method of
Hamilton-Jacobi method of
[[Hamilton's principle/Mathematics/The Hamilton-Jacobi equation]].
[[Hamilton's principle/Mathematics/The Hamilton-Jacobi equation|the Hamilton-Jacobi equation]].


== Conservation ==
== Conservation ==
Line 127: Line 126:


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


Line 165: Line 163:
The modern presentation inverts his order for good pedagogical reasons, and the
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
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]]
the point. [[Hamilton's principle/Mathematics/Action as a function of its endpoints|Action as a function of its endpoints]]
restores his ordering.
restores his ordering.


Line 195: Line 193:
== Next ==
== Next ==


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

Latest revision as of 05:15, 16 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:

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 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 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 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 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 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. 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

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.