Professional Documents
Culture Documents
Hamiltonians For Harmonic Oscillators
Hamiltonians For Harmonic Oscillators
where the velocities q̇i are expressed in terms of the positions qi and mo-
menta pi . In this case, we have, using the coordinate x as the displacement
from equilibrium
1 1
L (x, ẋ) = mẋ2 − kx2 (2)
2 2
∂L
p= = mẋ (3)
∂ ẋ
p
ẋ = (4)
m
p2 1
L (x, ẋ (x, p)) = − kx2 (5)
2m 2
p2
2
p 1 2
H= − − kx (6)
m 2m 2
p2 1
= + kx2 (7)
2m 2
∂H
= ẋ (8)
∂p
∂H
− = ṗ (9)
∂x
We get
∂H p
= = ẋ (10)
∂p m
∂H
− = −kx = ṗ (11)
∂x
We thus get a pair of first order ODEs which can be solved in the usual
way, given x (0) and p (0). The second order ODE that we got by using the
Lagrangian method can be obtained by differentiating the first equation and
plugging it into the second:
ṗ
ẍ = (12)
m
k
=− x (13)
m
From 7 we see that, since in the absence of external force, the total energy
H = T + V = E is a constant,
p2 1
+ kx2 = E = constant (14)
2m 2
This can be written as the equation of an ellipse:
p 2 x2
+ =1 (15)
b 2 a2
where
2E
a2 = (16)
k
2
b = 2mE (17)
Example 2. We can use the Hamiltonian formalism to get the equations of
motion of the coupled harmonic oscillator. From our Lagrangian treatment,
we had
1
L = m ẋ21 + ẋ22 − k x21 + x22 − x1 x2
(18)
2
HAMILTONIANS FOR HARMONIC OSCILLATORS 3
∂L
pi = = mẋi (19)
∂ ẋi
pi
ẋi = (20)
m
H = ∑ pi ẋi − L (x, ẋ) (21)
i
1 2 2
1 2 2
2 2
= p + p2 − m p 1 + p 2 − k x1 + x2 − x1 x2 (22)
m 1 2m
1
p21 + p22 + k x21 + x22 − x1 x2
= (23)
2m
Applying the canonical equations gives
∂H pi
= = ẋi (24)
∂pi m
∂H
− = −2kx1 + kx2 = ṗ1 (25)
∂x1
∂H
− = −2kx2 + kx1 = ṗ2 (26)
∂x2
Again, by taking the derivative of the first line and substituting into the
last two lines, we get back the previous equations of motion:
k k
ẍ1 = −2 x1 + x2 (27)
m m
k k
ẍ2 = x1 − 2 x2 (28)
m m