Unit 3: Hamiltonian Formalism
- 1. Canonical Momenta and Hamiltonian
- 2. Hamilton's Equations of Motion
- 3. Physical Significance of Hamiltonian (H)
- 4. Application: Free Particle
- 5. Application: Simple Harmonic Oscillator
- 6. Application: Simple Pendulum
- 7. Application: Compound Pendulum
- 8. Application: Particle in a Central Force Field
- 9. Application: Charged Particle in an Electromagnetic Field
- 10. Application: Particle Moving Near the Surface of Earth
- 11. Conservation Theorems in Hamiltonian Formalism
- 12. Summary Table of Applications
1. Canonical Momenta and Hamiltonian
Conceptual Background
In Lagrangian mechanics, the state of a system with n degrees of freedom is specified by generalized coordinates qi and generalized velocities q̇i = dqi/dt for i = 1, 2, ..., n. The Lagrangian L(qi, q̇i, t) is a function defined in a 2n-dimensional configuration space plus time.
Hamiltonian mechanics transitions the description from configuration space (qi, q̇i) to phase space (qi, pi), replacing generalized velocities with generalized (canonical) momenta. This formulation replaces second-order differential equations with first-order differential equations.
Generalized (Canonical) Momentum Definition
Definition: For a system described by Lagrangian L(qi, q̇i, t), the generalized momentum pi conjugate to the generalized coordinate qi is defined as:
pi = ∂L / ∂q̇i
Legendre Transformation and Definition of Hamiltonian
To change the variables from (qi, q̇i, t) to (qi, pi, t), we apply a mathematical technique called the Legendre Transformation.
The total differential of the Lagrangian L(qi, q̇i, t) is given by:
dL = ∑i=1n [ (∂L / ∂qi) dqi + (∂L / ∂q̇i) dq̇i ] + (∂L / ∂t) dt
Using the definition of canonical momentum pi = ∂L / ∂q̇i and Lagrange's equation of motion d/dt(∂L / ∂q̇i) - ∂L / ∂qi = 0 (which gives ṗi = ∂L / ∂qi), we substitute these into dL:
dL = ∑i=1n [ ṗi dqi + pi dq̇i ] + (∂L / ∂t) dt
Rearranging the term ∑i pi dq̇i using the product rule d(pi q̇i) = pi dq̇i + q̇i dpi:
dL = ∑i=1n ṗi dqi + d(∑i=1n pi q̇i) - ∑i=1n q̇i dpi + (∂L / ∂t) dt
d(∑i=1n pi q̇i - L) = ∑i=1n [ q̇i dpi - ṗi dqi ] - (∂L / ∂t) dt
Definition of Hamiltonian (H): The Hamiltonian function H(qi, pi, t) is defined as:
H = ∑i=1n pi q̇i - L(qi, q̇i, t)
Here, all velocity terms q̇i in the expression must be expressed completely in terms of momentum pi and coordinates qi.
2. Hamilton's Equations of Motion
Derivation of Equations of Motion
Since the Hamiltonian H is explicitly a function of coordinates qi, canonical momenta pi, and time t, i.e., H = H(q1,...,qn, p1,...,pn, t), its total differential is:
dH = ∑i=1n [ (∂H / ∂qi) dqi + (∂H / ∂pi) dpi ] + (∂H / ∂t) dt
From the Legendre transformation derivation, we previously established that:
dH = ∑i=1n [ q̇i dpi - ṗi dqi ] - (∂L / ∂t) dt
Comparing coefficients of independent differentials dqi, dpi, and dt in both total differential expressions yields Hamilton's Canonical Equations of Motion:
Hamilton's Canonical Equations:
1. q̇i = ∂H / ∂pi
2. ṗi = - ∂H / ∂qi
3. ∂H / ∂t = - ∂L / ∂t
Properties of Canonical Equations
- They consist of 2n first-order differential equations replacing n second-order Lagrange equations.
- They show high mathematical symmetry, differing only by a minus sign.
- They describe the phase space trajectory of a mechanical system.
Exam Note: Remember that while ṗi has a negative sign (-∂H/∂qi), q̇i has a positive sign (+∂H/∂pi). Reversing these signs is a common exam mistake.
3. Physical Significance of Hamiltonian (H)
1. Hamiltonian as Total Energy
Consider a conservative system where kinetic energy T is a homogeneous quadratic function of generalized velocities:
T = ∑i,j ai,j q̇i q̇j
By Euler's theorem for homogeneous functions of degree 2:
∑i=1n q̇i (∂T / ∂q̇i) = 2T
If potential energy V is independent of generalized velocities q̇i (i.e., V = V(qi, t)), then:
pi = ∂L / ∂q̇i = ∂(T - V) / ∂q̇i = ∂T / ∂q̇i
Substituting this into the Hamiltonian definition:
H = ∑i=1n pi q̇i - L = 2T - (T - V) = T + V = E
Physical Significance Rule 1: If the transformation equations between Cartesian and generalized coordinates do not depend explicitly on time (synamical constraints are time-independent) and potential energy is velocity-independent, the Hamiltonian H represents the total mechanical energy (E = T + V) of the system.
2. Hamiltonian as Constant of Motion
Taking the total time derivative of H(qi, pi, t):
dH / dt = ∑i=1n [ (∂H / ∂qi) q̇i + (∂H / ∂pi) ṗi ] + ∂H / ∂t
Substitute Hamilton's canonical equations (q̇i = ∂H/∂pi and ṗi = -∂H/∂qi):
dH / dt = ∑i=1n [ (∂H / ∂qi)(∂H / ∂pi) + (∂H / ∂pi)(-∂H / ∂qi) ] + ∂H / ∂t
dH / dt = ∂H / ∂t
Physical Significance Rule 2: If the Hamiltonian does not depend explicitly on time t (i.e., ∂H / ∂t = 0), then dH / dt = 0, meaning H is a constant of motion (conserved quantity).
4. Application: Free Particle
System Description
Consider a particle of mass m moving freely in three-dimensional space with no external potential acting on it (V = 0).
Step-by-Step Derivation
Step 1: Write Lagrangian
L = T - V = ½ m (ẋ2 + ẏ2 + ż2)
Step 2: Calculate Canonical Momenta
px = ∂L / ∂ẋ = m ẋ → ẋ = px / m
py = ∂L / ∂ẏ = m ẏ → ẏ = py / m
pz = ∂L / ∂ż = m ż → ż = pz / m
Step 3: Construct Hamiltonian
H = px ẋ + py ẏ + pz ż - L
H = (px2 + py2 + pz2) / m - ½ m [ (px/m)2 + (py/m)2 + (pz/m)2 ]
H = (px2 + py2 + pz2) / (2m)
Step 4: Apply Hamilton's Equations
For x-component:
ẋ = ∂H / ∂px = px / m
ṗx = - ∂H / ∂x = 0 → px = constant (c1)
Therefore, ẋ = c1 / m = constant → x(t) = (c1/m)t + x0
Similarly for y and z coordinates, py and pz are constant.
Physical Conclusion
The free particle moves in a straight line with constant velocity, illustrating Newton's First Law of Motion.
5. Application: Simple Harmonic Oscillator
System Description
A mass m attached to a spring with force constant k performing one-dimensional oscillation along the x-axis.
Step-by-Step Derivation
Step 1: Write Lagrangian
T = ½ m ẋ2, V = ½ k x2
L = ½ m ẋ2 - ½ k x2
Step 2: Calculate Canonical Momentum
p = ∂L / ∂ẋ = m ẋ → ẋ = p / m
Step 3: Construct Hamiltonian
H = p ẋ - L = p (p/m) - [ ½ m (p/m)2 - ½ k x2 ]
H = p2 / (2m) + ½ k x2
Step 4: Apply Hamilton's Equations
1. ẋ = ∂H / ∂p = p / m
2. ṗ = - ∂H / ∂x = - k x
Differentiating equation (1) with respect to time t:
ẍ = ṗ / m
Substitute ṗ = -k x into the above equation:
ẍ = - (k / m) x
ẍ + ω2 x = 0 (where ω2 = k / m)
Physical Conclusion
The equation obtained is the standard equation of Simple Harmonic Motion with angular frequency ω = √(k/m).
6. Application: Simple Pendulum
System Description
A point mass m suspended by a light, inextensible string of length l swinging in a vertical plane under gravity g. Generalized coordinate is angle θ.
Step-by-Step Derivation
Step 1: Write Lagrangian
Velocity v = l θ̇
Kinetic Energy: T = ½ m l2 θ̇2
Potential Energy (relative to equilibrium lowest position): V = m g l (1 - cos θ)
L = ½ m l2 θ̇2 - m g l (1 - cos θ)
Step 2: Calculate Canonical Momentum
pθ = ∂L / ∂θ̇ = m l2 θ̇ → θ̇ = pθ / (m l2)
Step 3: Construct Hamiltonian
H = pθ θ̇ - L = pθ2 / (m l2) - [ ½ pθ2 / (m l2) - m g l (1 - cos θ) ]
H = pθ2 / (2 m l2) + m g l (1 - cos θ)
Step 4: Apply Hamilton's Equations
1. θ̇ = ∂H / ∂pθ = pθ / (m l2)
2. ṗθ = - ∂H / ∂θ = - m g l sin θ
Differentiating equation (1) with respect to t:
θ̈ = ṗθ / (m l2)
Substitute ṗθ = - m g l sin θ:
θ̈ = - (m g l sin θ) / (m l2)
θ̈ + (g / l) sin θ = 0
For small angular displacements (sin θ ≈ θ):
θ̈ + (g / l) θ = 0
7. Application: Compound Pendulum
System Description
A rigid body of mass M pivoted about a horizontal axis through a point O, oscillating under gravity. Let I be the moment of inertia about the axis of rotation and h be the distance from the pivot O to the center of mass C.
Step-by-Step Derivation
Step 1: Write Lagrangian
Kinetic Energy: T = ½ I θ̇2
Potential Energy: V = M g h (1 - cos θ)
L = ½ I θ̇2 - M g h (1 - cos θ)
Step 2: Calculate Canonical Momentum
pθ = ∂L / ∂θ̇ = I θ̇ → θ̇ = pθ / I
Step 3: Construct Hamiltonian
H = pθ θ̇ - L = pθ (pθ / I) - [ ½ I (pθ / I)2 - M g h (1 - cos θ) ]
H = pθ2 / (2 I) + M g h (1 - cos θ)
Step 4: Apply Hamilton's Equations
1. θ̇ = ∂H / ∂pθ = pθ / I
2. ṗθ = - ∂H / ∂θ = - M g h sin θ
Differentiating equation (1) with respect to t:
θ̈ = ṗθ / I = - (M g h / I) sin θ
I θ̈ + M g h sin θ = 0
For small amplitudes (sin θ ≈ θ):
θ̈ + (M g h / I) θ = 0
The frequency of oscillation is ω = √(Mgh / I), and equivalent length Leq = I / (Mh).
8. Application: Particle in a Central Force Field
System Description
A particle of mass m moving under a central potential V(r) depending only on the distance from a central origin. Motion is confined to a plane, described by plane polar coordinates (r, θ).
Step-by-Step Derivation
Step 1: Write Lagrangian
T = ½ m (ṙ2 + r2 θ̇2)
L = ½ m (ṙ2 + r2 θ̇2) - V(r)
Step 2: Calculate Canonical Momenta
pr = ∂L / ∂ṙ = m ṙ → ṙ = pr / m
pθ = ∂L / ∂θ̇ = m r2 θ̇ → θ̇ = pθ / (m r2)
Step 3: Construct Hamiltonian
H = pr ṙ + pθ θ̇ - L
H = pr (pr/m) + pθ (pθ/(m r2)) - [ ½ m ((pr/m)2 + r2 (pθ/(m r2))2) - V(r) ]
H = pr2 / (2m) + pθ2 / (2 m r2) + V(r)
Step 4: Apply Hamilton's Equations
1. ṙ = ∂H / ∂pr = pr / m
2. θ̇ = ∂H / ∂pθ = pθ / (m r2)
3. ṗr = - ∂H / ∂r = pθ2 / (m r3) - ∂V / ∂r
4. ṗθ = - ∂H / ∂θ = 0
Key Observations
- Since θ does not appear explicitly in H, θ is a cyclic (ignorable) coordinate.
- ṗθ = 0 implies pθ = constant = Lz (angular momentum is conserved).
- Equation for radial motion: m r̈ = pθ2 / (m r3) - ∂V / ∂r.
9. Application: Charged Particle in an Electromagnetic Field
System Description
A particle with charge q and mass m moving in an electromagnetic field described by scalar potential ϕ(r, t) and vector potential A(r, t).
Step-by-Step Derivation
Step 1: Generalized Velocity-Dependent Potential and Lagrangian
The velocity-dependent potential is U = q ϕ - q v · A.
L = T - U = ½ m v2 - q ϕ + q (v · A)
In Cartesian components:
L = ½ m (ẋ2 + ẏ2 + ż2) - q ϕ + q (ẋ Ax + ẏ Ay + ż Az)
Step 2: Canonical Momentum
px = ∂L / ∂ẋ = m ẋ + q Ax → m ẋ = px - q Ax
In vector form: p = m v + q A
Important Note: The canonical momentum p is not equal to mechanical momentum pmech = mv; it includes the field term qA.
Step 3: Construct Hamiltonian
H = p · v - L
H = p · [ (p - q A) / m ] - [ ½ m ((p - q A) / m)2 - q ϕ + q ((p - q A)/m) · A ]
Simplifying terms:
H = (p - q A)2 / (2m) + q ϕ
Step 4: Hamilton's Canonical Equations
1. ṙ = ∇p H = (p - q A) / m
2. ṗ = - ∇ H = - ∇ [ (p - q A)2 / (2m) + q ϕ ]
Evaluating Hamilton's equations yields the standard Lorentz Force Law:
F = m a = q (E + v × B)
where E = -∇ϕ - ∂A/∂t and B = ∇ × A.
10. Application: Particle Moving Near the Surface of Earth
System Description
A particle of mass m moving near Earth's surface where acceleration due to gravity g is assumed constant along the vertical z-axis (z pointing vertically upwards).
Step-by-Step Derivation
Step 1: Write Lagrangian
Position: (x, y, z)
Kinetic Energy: T = ½ m (ẋ2 + ẏ2 + ż2)
Potential Energy: V = m g z
L = ½ m (ẋ2 + ẏ2 + ż2) - m g z
Step 2: Calculate Canonical Momenta
px = ∂L / ∂ẋ = m ẋ → ẋ = px / m
py = ∂L / ∂ẏ = m ẏ → ẏ = py / m
pz = ∂L / ∂ż = m ż → ż = pz / m
Step 3: Construct Hamiltonian
H = px ẋ + py ẏ + pz ż - L
H = (px2 + py2 + pz2) / (2m) + m g z
Step 4: Apply Hamilton's Equations
For x and y components:
ẋ = px / m, ṗx = - ∂H / ∂x = 0 → px = constant
ẏ = py / m, ṗy = - ∂H / ∂y = 0 → py = constant
For vertical z component:
ż = pz / m
ṗz = - ∂H / ∂z = - m g
Differentiating ż with respect to t:
z̈ = ṗz / m = - (m g) / m = - g
Physical Results
- Motion in x and y directions is uniform unaccelerated motion.
- Motion along the z direction is uniformly accelerated downward motion with acceleration -g.
- Coordinates x and y are cyclic; hence px and py are conserved constants of motion.
11. Conservation Theorems in Hamiltonian Formalism
1. Cyclic Coordinates and Conservation of Canonical Momentum
Definition: A generalized coordinate qk is said to be cyclic or ignorable if it does not explicitly appear in the Hamiltonian H, i.e., ∂H / ∂qk = 0.
Using Hamilton's second canonical equation for a cyclic coordinate qk:
ṗk = - ∂H / ∂qk = 0 → pk = constant
Theorem: The canonical momentum conjugate to a cyclic coordinate is a constant of motion (conserved quantity).
2. Conservation of Linear Momentum
Consider a closed system unaffected by external forces. If the entire system is translated along a direction (e.g., x-axis) by an infinitesimal displacement, the potential energy and Hamiltonian remain invariant.
Since H is invariant under translation along x, the coordinate x is cyclic (∂H / ∂x = 0).
From Hamilton's equation:
ṗx = - ∂H / ∂x = 0 → px = constant
Conclusion: Translational invariance of a system implies conservation of total linear momentum along that direction.
3. Conservation of Angular Momentum
Consider a system invariant under rotation about a specific axis (e.g., z-axis). If the orientation angle θ about this axis does not appear in H, then θ is a cyclic coordinate.
∂H / ∂θ = 0
From Hamilton's equation:
ṗθ = - ∂H / ∂θ = 0 → pθ = constant
Since pθ is the canonical angular momentum Lz about the rotation axis:
Lz = constant
Conclusion: Rotational invariance of a system implies conservation of angular momentum about the symmetry axis.
4. Conservation of Energy
The total time derivative of Hamiltonian H(qi, pi, t) is:
dH / dt = ∑i=1n [ (∂H / ∂qi) q̇i + (∂H / ∂pi) ṗi ] + ∂H / ∂t
Substituting q̇i = ∂H / ∂pi and ṗi = - ∂H / ∂qi gives:
dH / dt = ∂H / ∂t
If the system's constraints and potential are time-independent, H does not depend explicitly on time t (∂H / ∂t = 0).
Therefore:
dH / dt = 0 → H = constant
If, additionally, coordinates are independent of explicit time, H equals total mechanical energy E, giving total energy conservation E = constant.
12. Summary Table of Applications
| System | Generalized Coordinates | Hamiltonian (H) | Cyclic Coordinates | Conserved Quantities |
|---|---|---|---|---|
| Free Particle | x, y, z | (px2 + py2 + pz2) / (2m) | x, y, z | px, py, pz, Total Energy H |
| Simple Harmonic Oscillator | x | p2 / (2m) + ½ k x2 | None | Total Energy H |
| Simple Pendulum | θ | pθ2 / (2 m l2) + m g l (1 - cos θ) | None | Total Energy H |
| Compound Pendulum | θ | pθ2 / (2 I) + M g h (1 - cos θ) | None | Total Energy H |
| Central Force Field | r, θ | pr2 / (2m) + pθ2 / (2 m r2) + V(r) | θ | Angular Momentum pθ, Total Energy H |
| EM Field Charged Particle | x, y, z | (p - q A)2 / (2m) + q ϕ | Depends on field symmetry | Canonical momentum along symmetric axes |
| Particle near Earth's Surface | x, y, z | (px2 + py2 + pz2) / (2m) + m g z | x, y | Linear Momenta px, py, Total Energy H |