Chapter 4 of Stewart's 8.09 notes turns from the Lagrangian to the Hamiltonian way of doing mechanics, with one question in mind: how much simpler can a problem become if we choose the right variables? The Lagrangian and Hamiltonian formalisms themselves were reviewed in Chapter 1 (Section 1.2 there covers Hamilton's equations). This page follows the notes' short introduction and Section 4.1 (notes pp. 60–65), in order, in its own words and with its own worked example.
The ideal: every coordinate cyclic#
Suppose we were lucky enough to find coordinates that are all cyclic: none of them appears in the Hamiltonian. Then , so every momentum is a constant, . If itself is conserved, it is a function of these constants alone (notes p. 60):
In words
H equals H( alpha one, and so on, alpha sub n )
and Hamilton's other equation gives each coordinate a constant rate of change:
In words
q sub i dot equals partial H over partial alpha sub i equals omega sub i ( alpha ) which gives q sub i equals omega sub i t plus delta sub i
with constants . Nothing could be simpler. The plan of the chapter is to hunt for changes of variables that make as many coordinates cyclic as possible. First we need to know which changes of variables are allowed.
Transformations in phase space#
In Lagrangian mechanics two kinds of change leave the Euler-Lagrange equations intact: a point transformation of the coordinates, with the Lagrangian rewritten in the new variables, and adding a total time derivative to the Lagrangian (notes pp. 60–61). The Hamiltonian formalism treats coordinates and momenta as independent, so it can afford more freedom: point transformations of the whole phase space,
In words
capital Q sub i equals capital Q sub i (q, p, t) and capital P sub i equals capital P sub i (q, p, t)
where the old variables obey Hamilton's equations,
In words
q sub i dot equals partial H over partial p sub i and p sub i dot equals minus partial H over partial q sub i
Most such transformations scramble the equations of motion. The transformation is called canonical if the new variables obey equations of the same form, with some new Hamiltonian (eqs. (4.5)–(4.6)):
In words
capital Q sub i dot equals partial capital K over partial capital P sub i and capital P sub i dot equals minus partial capital K over partial capital Q sub i
From here on a repeated index is summed over.
What a canonical transformation must satisfy#
Hamilton's equations follow from Hamilton's principle written in phase space: the integral of between fixed end times is stationary. For the new variables to obey the new equations, the same must hold for (eqs. (4.7)–(4.8)):
In words
delta the integral from t one to t two of the quantity p sub i q sub i dot minus H, d t equals 0, delta the integral from t one to t two of the quantity capital P sub i capital Q sub i dot minus capital K, d t equals 0
Both statements hold together if the two integrands agree up to a constant factor and the time derivative of some function :
In words
lambda the quantity p sub i q sub i dot minus H, equals capital P sub i capital Q sub i dot minus capital K plus capital F dot
The extra term does no harm: its integral is , and since the paths are varied with their end points held fixed, vanishes at both ends (eq. (4.10)). The factor sorts transformations into kinds (notes pp. 61–62):
- : a canonical transformation, the case studied from now on.
- : an extended canonical transformation. It adds nothing new, because rescaling and brings it back to .
- If in addition and do not depend on explicitly, the transformation is called restricted canonical.
All transformations here are assumed invertible, so that any two of the four sets can serve as independent variables.
Generating functions of the first type#
When is written as a function of a mixture of old and new variables, it is called a generating function: it encodes the whole transformation. There are four basic choices. The first takes the old and new coordinates as the independent variables (eq. (4.11)), . Its total time derivative, by the chain rule, goes into the condition with :
In words
p sub i q sub i dot minus H equals capital P sub i capital Q sub i dot minus capital K plus partial capital F one over partial t plus partial capital F one over partial q sub i, times q sub i dot plus partial capital F one over partial capital Q sub i, times capital Q sub i dot
Since and are independent, their velocities can be varied independently, and the coefficients of , of and the remaining terms must match one by one:
In words
p sub i equals partial capital F one over partial q sub i, capital P sub i equals minus partial capital F one over partial capital Q sub i, capital K equals H plus partial capital F one over partial t
The first two relations give and as functions of (eq. (4.14)); solving them gives the new variables in terms of the old. The third tells us the new Hamiltonian. (Eq. (4.13) in the notes prints the first relation with in the denominator, a typo; the table on p. 64 has .)
The notes give two quick examples (notes pp. 62–63). The function generates and , that is and (eqs. (4.15)–(4.17)). In the other direction, given a transformation one can test whether it is canonical by trying to build its . For and (eq. (4.18)), write , integrate over to get , and fix the unknown function by demanding . It works with :
In words
capital F one equals the quantity q squared over 2 plus 1, e to the power capital Q
so that transformation is canonical.
The other three types#
The remaining choices pair old and new variables differently. To use the old coordinates and new momenta, take (eq. (4.23)). The subtracted product is there so that, after the chain rule, the terms in cancel and only and remain to be matched (eq. (4.24)). The result:
In words
p sub i equals partial capital F two over partial q sub i, capital Q sub i equals partial capital F two over partial capital P sub i, capital K equals H plus partial capital F two over partial t
In the same way uses the old momenta and new coordinates (eq. (4.26)), and the old and new momenta (eq. (4.27)). The notes collect all four in a table (p. 64), each with its simplest example:
| Generating function | Transformation | Simplest case | Result |
|---|---|---|---|
| , | , | ||
| , | , | ||
| , | , | ||
| , | , |
Two lessons hide in the last column. is the identity, which makes type 2 the natural starting point for transformations close to the identity (Section 4.3 uses this). And swaps coordinates and momenta, up to a sign: in Hamiltonian mechanics the labels "coordinate" and "momentum" are a matter of convention.
For every type the new Hamiltonian is
In words
capital K equals H plus partial capital F i over partial t
so a generating function without explicit time dependence leaves the Hamiltonian's value unchanged, (eq. (4.29)), only rewritten in the new variables. With several degrees of freedom one may also mix types, using, say, type 1 for one pair of variables and type 2 for another.
Point transformations are canonical#
A type-2 function linear in the new momenta (notes p. 64),
In words
capital F two equals f sub i (q, t) capital P sub i
gives new coordinates that depend on the old coordinates only (eq. (4.31)): an ordinary change of coordinates, of the kind familiar from Lagrangian mechanics. Its other half fixes how the momenta must change along with it:
In words
p sub i equals partial f sub j over partial q sub i, times capital P sub j
which can be solved for the . So every coordinate change, completed by the right momenta, is canonical. (The notes write the derivative as with , which is the transpose of what gives; for a single coordinate the two agree.)
A free particle in squared coordinates
A particle of mass kg moves freely along a line at m/s, so and (taking at ). Use to define new variables. Find , and the new Hamiltonian , check that Hamilton's equations hold in the new variables, and evaluate everything at s.
The transformation
and , so . This is the point transformation , valid for .
The new Hamiltonian
has no explicit time dependence, so . With and : . The free particle now looks like a particle whose "kinetic energy" depends on its position: is no longer cyclic. A poor choice of variables can make a problem harder, not easier.
Check Hamilton's equations
Along the motion and . Then , and , which agrees. Also , and , which agrees too.
Numbers at s
m and kg m/s, so m² and kg/s. The energy is J, and J, the same value.
The harmonic oscillator, made cyclic#
Now a transformation that helps (notes pp. 64–65). Take the oscillator
In words
H equals p squared over the quantity 2 m, plus k q squared over 2, k equals m omega squared
Its energy is a sum of two squares, which suggests writing as a cosine and as a sine of a new variable , with an amplitude set by a new momentum . With a constant still to be chosen:
In words
p equals alpha the square root of 2 m capital P cos capital Q, q equals alpha over the quantity m omega, times the square root of 2 m capital P sine capital Q
Substituting, (eq. (4.35)). The new Hamiltonian does not contain at all, and the new momentum is the energy divided by (eq. (4.36)).
Is it canonical? Look for a type-1 generating function. Dividing the two relations gives (eq. (4.37)), so is known as a function of and , and
In words
capital F one equals the integral of p(q, capital Q ) d q plus g( capital Q ) equals one half m omega q squared cot capital Q plus g( capital Q ), capital P equals minus partial capital F one over partial capital Q equals m omega q squared over the quantity 2 sine squared capital Q, minus d g over d capital Q
Choosing gives (eq. (4.39)). This matches the trial transformation only if , that is . With that choice the transformation is canonical, and
In words
capital P equals capital E over omega
Hamilton's equation for the new coordinate is now trivial, because :
In words
capital Q dot equals partial capital K over partial capital P equals omega which gives capital Q equals omega t plus delta
and substituting back gives the familiar solution:
In words
q equals the square root of 2 capital E over the quantity m omega squared, end of root, sine of the quantity omega t plus delta, p equals the square root of 2 m capital E cos of the quantity omega t plus delta
The notes record the final transformation for later use:
In words
q equals the square root of 2 capital P over the quantity m omega, end of root, sine capital Q, p equals the square root of 2 m omega capital P cos capital Q
In the old variables the motion runs round an ellipse in the plane; in the new ones it runs along a straight line, fixed and increasing at the steady rate . The graph below draws the ellipse from this transformation: sets its size, and is the position around it. Section 4.6 returns to this picture: is the oscillator's action divided by , and its angle.
That is the whole strategy of the chapter in miniature. The remaining difficulty is that we had to guess the transformation, and checking it meant an integration. Section 4.2 gives a test that needs only derivatives.
Summary#
- A canonical transformation keeps Hamilton's equations in force, with a new Hamiltonian . Hamilton's principle in both sets of variables requires .
- A generating function of half old and half new variables encodes the transformation. The four types: , , , , each with .
- is the identity; exchanges coordinates and momenta. Every point transformation is canonical, through .
- For the harmonic oscillator, , is canonical, gives with constant, and makes a phase.
- The aim of the chapter: find variables in which all coordinates are cyclic, so that the motion is trivial.