From the Lagrangian to the Hamiltonian
Conjugate momenta, regularity, and the Legendre transformation.
1. Why replace velocities by momenta?
A position alone does not specify how a system will evolve. The pendulum can pass the same angle in either direction and with many different speeds. Lagrangian mechanics completes the state with generalized velocities. Hamiltonian mechanics uses their conjugate momenta instead.
This is useful because momenta carry the conservation laws found in Unit 2, and because position and momentum can be treated as independent coordinates of a state space. The Hamiltonian then supplies two first-order evolution equations for each pair. It does not require a new force law.
The replacement must be possible mathematically. Starting from , we must solve for all as functions of . A sufficient local condition is an invertible velocity Hessian . For the regular mechanical systems studied here, this is the positive-definite inertia matrix. Singular Lagrangians need a different constraint theory and are outside this syllabus.
2. Constructing the Hamiltonian
Definition. The Hamiltonian obtained from a regular Lagrangian is
with every on the right replaced by its expression in . Before that substitution, the right-hand side is the energy function written using velocities. After substitution it is a function on phase space.
This operation is a Legendre transformation. The derivative supplies the new variable, and subtracting from removes the old velocity as an independent argument. A completed Hamiltonian may contain prescribed parameters such as ; it must not contain an unresolved dynamical .
For one free particle, gives , so . Then
The two terms in the definition are both needed. Merely replacing by in would happen to work for a free particle but gives the wrong sign of potential energy for a general system.
3. A useful matrix construction
For , the superscript means transpose, so the products are sums over coordinates. The momenta satisfy
Let . Substitution in gives
The second equality follows because and is symmetric. This is a compact construction rule; the component calculations below remain sufficient without matrix notation.
4. Applications
Example 1 · The spring oscillator
Choose displacement . Then , , and . Since ,
The potential changes sign in passing from to . Here equals total mechanical energy, because the coordinate transformation is stationary and is quadratic homogeneous. For , , , and , the kinetic and potential contributions are and , so .
Example 2 · Polar coordinates
For a particle in ,
The momenta are and . Invert them: , . The sum is , while is half that sum. Hence
Do not substitute : an angular conjugate momentum has different dimensions. When differentiating with respect to , hold fixed. Holding fixed would mean differentiating a different function on a different state space.
Example 3 · Coupled velocities
Let with . From Chapter 10,
Their momentum-weighted sum is . Since , subtracting gives
The cross term changes sign in the inverse quadratic form. For the particles' kinetic terms separate; as the inverse fails, matching the loss of regularity already identified.
Example 4 · A translating coordinate origin
A free particle on a line has laboratory position , with constant prescribed . Its physical kinetic energy is , and . Thus and
The Hamiltonian is
Laboratory energy is , so even though both are constant for this free motion. The term is a consequence of the explicitly time-dependent coordinate transformation. Relative kinetic energy equals ; the difference is a constant, but neither equals laboratory energy for arbitrary .
5. Momentum is coordinate-dependent
The Cartesian momentum of a particle is the vector in this ordinary mechanical setting. The generalized momentum is its projection weighted by the positional response to , possibly including terms from a more general velocity-dependent Lagrangian. It is not generally a Cartesian vector component.
For example, in polar coordinates equals angular momentum, whereas is radial linear momentum. Treating them as interchangeable “momenta” without units obscures the mechanics. Their shared role is that each is conjugate to a coordinate and that their product has units of power times time, namely energy.
6. Construction checks
A correct construction defines the coordinates, writes , differentiates to obtain every momentum, inverts the complete set, and substitutes into . Check that all dynamical velocities have disappeared and that dimensions remain those of energy. The meaning of the resulting function, including when it is conserved and when it equals mechanical energy, will be examined after introducing its equations of motion.
Exercises
Hints and solutions are collected separately.
12.1 What must be checked before replacing velocities by momenta?
12.2 Construct for .
12.3 For with constant , construct .
12.4 Why must a completed Hamiltonian contain no unresolved generalized velocities?
12.5 Construct for , .
12.6 For with constant , find and .
12.7 Invert , and construct kinetic .
12.8 For , prove for a free particle.
12.9 For , calculate at fixed momenta.
12.10 Why is the Legendre construction not merely changing the sign of ?
12.11 If , , , and in SI units, find the spring Hamiltonian.
12.12 Explain why polar momentum coordinates fail at the origin although the free-particle problem is regular.
Reading progress is saved on this device.