Hamilton's principle/Mathematics/The Hamiltonian and Hamilton's equations: Difference between revisions
hamiltons-principle>HPVBuild Initial import of M3-02 |
Remove phrase duplicated by the piped link |
||
| (3 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
{{DISPLAYTITLE:The Hamiltonian and Hamilton's equations}} | |||
{{Plebeian|Hamilton's principle/Explainers/The Hamiltonian}} | {{Plebeian|Hamilton's principle/Explainers/The Hamiltonian}} | ||
| Line 21: | 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 | <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 45: | 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 72: | 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 84: | 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 112: | 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 126: | 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 | 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 164: | 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 194: | 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. | ||
| Line 201: | Line 200: | ||
<references /> | <references /> | ||
Latest revision as of 05:15, 16 September 2026
Applying the Legendre transform to a Lagrangian replaces second-order equations by 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 -dimensional space. This page derives them and states what the change of description buys.
Setup

Take with , writing for the independent variable and for the coordinates, as the mechanical literature does. Define the momenta
and assume the Hessian is invertible, so (1) inverts to give in terms of . The Hamiltonian is the Legendre transform:
with every eliminated in favour of . That elimination is not optional. is a function of , and leaving a in it makes the derivatives below meaningless.
Derivation

Take the differential of (2), treating all variables as free:
The terms cancel by (1). This is the cancellation of the Legendre transform and it is the whole derivation:
Since is a function of , its differential is also
Matching coefficients of the independent differentials in (4) and (5):
Nothing dynamical has been used yet; (6) is pure Legendre transform. Now impose the Euler-Lagrange equation of the Euler-Lagrange equation, . Substituting into the middle relation of (6) gives Hamilton's canonical equations:
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 | ||
| order | second | first |
| arguments | ||
| space | configuration space | phase space |
| a state is | a point and a velocity | a point |
The count of constants is unchanged: second-order equations and first-order equations both carry 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,
the sum cancelling pairwise by (7). So 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 does not contain , then (7) gives immediately, and the coordinate is cyclic. In the Hamiltonian description a conservation law is read off by inspection.
When is 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 and Euler's theorem on homogeneous functions gives , so
and is the energy. If the coordinates are time-dependent — a rotating frame, a moving constraint — then is not homogeneous quadratic and , though 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
Then , so , and
Hamilton's equations are
Eliminating recovers . But (11) read directly gives the phase portrait without solving anything: level sets of 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 vanish, converting the flow into a single partial differential equation.
References
- ↑ Hamilton, On a General Method in Dynamics (1834), §8, following equation (Z.). Verbatim phrase. ESTABLISHED source.