Home › Analytical mechanics › Hamilton's equations and conservation laws
Hamilton's equations and conservation laws
Generalized momenta, the Hamiltonian, canonical equations, cyclic coordinates, Noether's theorem, phase space and the principle of least action.
trolley mass M = 200 kg; load mass m = 1000 kg; rope length l = 4 m;
the trolley runs along a horizontal girder without friction; the rope is inextensible and massless.
1. Generalized momenta
For each generalized coordinate a generalized momentum is defined:
$$p_j = \frac{\partial L}{\partial\dot q_j}$$For a Cartesian coordinate it is the ordinary momentum m ẋ, and for an angle the angular momentum J θ̇.
2. Canonical equations
A Legendre transformation changes the variables from (q, q̇) to (q, p). The Hamiltonian is
$$H(q, p, t) = \sum_j p_j\,\dot q_j - L$$For scleronomic constraints and potential forces H is the total mechanical energy, Ek + Ep. Instead of n second-order equations one obtains 2n first-order equations, Hamilton's canonical equations:
$$\dot q_j = \frac{\partial H}{\partial p_j}, \qquad \dot p_j = -\,\frac{\partial H}{\partial q_j}$$For a simple pendulum: H = p²/(2ml²) − mgl cos θ, so θ̇ = p/(ml²) and ṗ = −mgl sin θ.
3. Cyclic coordinates and conservation laws
If L does not depend on some coordinate qj (it is cyclic), Lagrange's equation gives ṗj = 0, so the corresponding momentum is conserved. Emmy Noether showed the general connection: every symmetry of a system corresponds to a conservation law.
- independence of time → conservation of energy;
- independence of position (translational symmetry) → conservation of momentum;
- independence of angle (rotational symmetry) → conservation of angular momentum.
4. Phase space
The state of a system is a point in the 2n-dimensional phase space (q, p). Exactly one trajectory passes through each point, and for a conservative system the trajectories lie on the surfaces H = const. Liouville's theorem states that volume in phase space does not change during the motion. This is the foundation of statistical mechanics.
5. Principle of least action
Hamilton's principle gives the most concise statement of mechanics: of all motions between two positions at given instants, the actual one is that for which the action is stationary:
$$S = \int_{t_1}^{t_2} L(q, \dot q, t)\, dt, \qquad \delta S = 0$$Lagrange's equations are the Euler–Lagrange equations of the calculus of variations for this integral. The same principle, with other Lagrangians, leads to Maxwell's equations, general relativity and quantum field theory. Fermat's principle of least time in optics is a relative of it.
Practice problems
Problem 1. ●○○ easy What is the generalized momentum px of the system at ẋ = 1 m/s, θ = 0 and θ̇ = 0.25 rad/s? What does it represent physically?
What is happening: The generalized momentum of the trolley position coordinate is the total horizontal momentum of trolley and load.
Show answer and solution
Solution idea: px = ∂L/∂ẋ.
Given: \(M = 200\), \(m = 1000\ \text{kg}\), \(l = 4\ \text{m}\), \(\dot x = 1\), \(\dot\theta = 0.25\), \(\theta = 0\)
Find: \(p_x = ?\)
Symbols:
- \(M\) – trolley mass, kg
- \(m\) – load mass, kg
- \(l\) – rope length, m
- \(\dot x\) – trolley speed, m/s
- \(x\) – trolley position (generalized coordinate), m
- \(\dot\theta\) – rope angular velocity, rad/s
- \(\theta\) – rope angle from vertical (generalized coordinate), °, rad
- \(p_x\) – generalized momentum of x, kg·m/s
- \(L\) – Lagrangian, Ek − Ep, J
- \(\dot x_2\) – horizontal load speed, m/s
- Derivative of the Lagrangian with respect to ẋ:$$\begin{aligned}p_x &= \frac{\partial L}{\partial\dot x} \\ &= (M + m)\dot x + m l\dot\theta\cos\theta \\ &= 1200 + 1000 \\ &= 2200\ \text{kg·m/s}\end{aligned}$$
- Check via masses:$$\begin{aligned}M\dot x + m\dot x_2 &= 200\cdot 1 + 1000\cdot 2 \\ &= 2200\ \text{kg·m/s}\end{aligned}$$
Answer: px = 2200 kg·m/s – total horizontal momentum
Sanity check: The load carries 91 % of the momentum. Without external horizontal force, px stays 2200 kg·m/s throughout the swing.
Problem 2. ●●○ medium The system is at rest, then the load is deflected (by internal action) to θ = 20°. How far does the free trolley move?
What is happening: L does not depend on x (cyclic coordinate), so px is conserved. Starting from rest, the centre of mass stays on the same vertical.
Show answer and solution
Solution idea: Integrate px = 0, giving the centre-of-mass position.
Given: \(M = 200\), \(m = 1000\ \text{kg}\), \(l = 4\ \text{m}\), \(\theta = 0 \to 20^\circ\)
Find: \(\Delta x = ?\)
Symbols:
- \(M\) – trolley mass, kg
- \(m\) – load mass, kg
- \(l\) – rope length, m
- \(\theta\) – rope angle from vertical (generalized coordinate), °, rad
- \(\Delta x\) – trolley displacement, m
- \(x\) – trolley position (generalized coordinate), m
- px = 0 is conserved, so the centre of mass stays horizontally fixed:$$(M + m)\,\Delta x + m\, l\sin\theta = 0$$
- Trolley displacement:$$\begin{aligned}\Delta x &= -\frac{1000\cdot 4\cdot 0.342}{1200} \\ &= -1.14\ \text{m}\end{aligned}$$
Answer: Δx = −1.14 m (opposite to the deflection)
Sanity check: The load moves horizontally only 1.37 − 1.14 = 0.23 m, the trolley 1.14 m back. The heavy mass nearly stays put while the light one moves – like the boat and man in the Dynamics area.
Problem 3. ●●○ medium The free trolley and load are released from rest at θ = 20°. What are the trolley and load speeds when the rope passes the vertical?
What is happening: The Hamiltonian does not depend on time (energy conserved) and x is cyclic (momentum conserved). Two integrals give two speeds without solving differential equations.
Show answer and solution
Solution idea: px = 0 and E = const.
Given: \(M = 200\), \(m = 1000\ \text{kg}\), \(l = 4\ \text{m}\), \(\theta_0 = 20^\circ\)
Find: \(\dot x,\ \dot\theta,\ v_2 = ?\)
Symbols:
- \(M\) – trolley mass, kg
- \(m\) – load mass, kg
- \(l\) – rope length, m
- \(\theta_0\) – initial angle, °
- \(\dot x\) – trolley speed, m/s
- \(x\) – trolley position (generalized coordinate), m
- \(\dot\theta\) – rope angular velocity, rad/s
- \(\theta\) – rope angle from vertical (generalized coordinate), °, rad
- \(v_2\) – load speed, m/s
- \(g\) – gravitational acceleration, 9.81 m/s²
- \(E_k\) – kinetic energy, J
- Two conservation laws – momentum px = 0 and energy:$$1200\,\dot x + 4000\,\dot\theta = 0$$$$\begin{aligned}m g l(1 - \cos 20^\circ) &= 2366\ \text{J} \\ &= E_k\end{aligned}$$
- Substituting ẋ = −3.33 θ̇ into Ek (θ = 0):$$\begin{aligned}1333\,\dot\theta^2 &= 2366\ \Rightarrow\ \dot\theta \\ &= 1.33\ \text{rad/s}\end{aligned}$$$$\dot x = -4.44\ \text{m/s}$$$$\begin{aligned}v_2 &= \dot x + l\dot\theta \\ &= 0.89\ \text{m/s}\end{aligned}$$
Answer: θ̇ = 1.33 rad/s; ẋ = −4.44 m/s; load 0.89 m/s
Sanity check: Momentum check: 200·(−4.44) + 1000·0.89 = 0 ✓. The trolley moves 5 times faster than the load; with a braked trolley the load would reach 2.18 m/s.