SPA5304 Physical Dynamics Lecture 25
David Vegh
(figures by Masaki Shigemori)
12 March 2019
1 Hamiltonian mechanics
1.1 Example: Harmonic oscillator
m 2 k 2
L= ẋ − x
2 2
∂L
p= = mẋ
∂ ẋ
We need to express ẋ = ẋ(x, p, t). We get
p
ẋ =
m
p2 1
H = pẋ − L = + kx2
2m 2
Hamilton’s equations:
∂H p
ẋ =
∂p ẋ = m
⇒
ṗ = − ∂H
ṗ = −kx
∂x
This can be converted into a second order equation by plugging p into the second equation:
mẍ = −kx
We get the good old Newton’s equation.
r
2 k
ẍ + ω x = 0, ω≡
m
The solution:
x = A cos(ωt + α)
p = mẋ = −Amω sin(ωt + α)
As a trajectory in phase space:
x A cos(ωt + α)
=
p −Amω sin(ωt + α)
The energy:
p2 1 k
E=H= + kx2 = A2
2m 2 2
This equation describes an ellipse in phase space.
Trajectories are parametrized by A.
1
Motion in configuration space:
• The particle moves back and forth between A and −A.
• Trajectories with different values of A overlap.
• x(0) is not enough to determine x(t) for t > 0.
Motion in phase space:
• A trajectory is an ellipse.
• Trajectories with different values of A do not overlap.
• giving an initial position (x(0), p(0)) is enough to determine the time-evolution.
2
1.2 Example: A particle in a potential
m 2
L= ẋ − V (x)
2
∂L
p= = mẋ
∂ ẋ
We need to express ẋ = ẋ(x, p, t). We again get
p
ẋ =
m
p2 p2
m p 2
H = pẋ − L = − − V (x) = + V (x)
m 2 m 2m
Thus,
p2
H= + V (x)
2m
Hamilton’s equations:
∂H p
ẋ =
∂p = m
⇒ mẍ = −V 0 (x)
ṗ = − ∂H = −V 0 (x)
∂x
3
1.3 Example: A planar pendulum
m 2 2
L(φ, φ̇) = l φ̇ + mgl cos φ
2
∂L
pφ ≡ = ml2 φ̇
∂ φ̇
We need to express φ̇
pφ
φ̇ =
ml2
pφ 1 p 2 pφ
φ
H = pφ φ̇ − L = pφ 2 − ml2 − mgl cos φ = − mgl cos φ
ml 2 ml2 2ml2
pφ
H= − mgl cos φ
2ml2
Hamilton’s equations:
pφ
∂H
φ̇ =
∂pφ = ml2
p˙ = − ∂H = −mgl sin φ
φ ∂φ
Thus,
ml2 φ̈ = −mgl sin φ
or
g
φ̈ = − sin φ
l
4
1.4 Many degrees of freedom
Straightforward generalization of the 1 DoF case.
Start with L(~q, ~q˙, t), where ~q = (q1 , . . . , qn ).
∂L
pi ≡ ⇒ q̇i = q̇i (~q, p~, t)
∂ q̇i
Then the Hamiltonian is
H(~q, p~, t) = pi q̇i − L
where a summation over i = 1, . . . , n is understood.
• H is again the energy expressed as a function of ~q, p~, t instead of ~q, ~q˙, t.
• Hamilton’s equations can be derived exactly the same way (just add the index i):
∂H
q̇i =
∂pi
and
∂H
ṗi = −
∂qi
and we also have
dH ∂H ∂L
= =−
dt ∂t ∂t
• Hamilton’s equations are a system of first-order differential equations for 2n variables ~q, p~.
1.5 Cyclic coordinates
Let us recall that we called generalized coordinates cyclic if they did not appear in the Lagrangian:
∂L
=0
∂qi
In this case the conjugate momentum is conserved:
∂L
pi = = const.
∂ q̇i
In the Hamiltonian formulation,
∂H ∂L
= −ṗi = −
∂ q̇i ∂qi
so if qi does not appear in L, then it will not appear in H either, and vice versa.
5
6