61.1: Examples
( \newcommand{\kernel}{\mathrm{null}\,}\)
As an example, we may again solve the simple harmonic oscillator problem, this time using Hamiltonian mechanics.
Solution
We first write down the kinetic energy K, expressed in terms of momentum p :
K=p22m
As before, the potential energy of a simple harmonic oscillator is
U=12kx2
The Hamiltonian in this case is then
H(x,p)=K+U=p22m+12kx2
Substituting this expression for H into the first of Hamilton's equations, we find
dxdt=∂H∂p=∂∂p(p22m+12kx2)=pm
Substituting for H into the second of Hamilton's equations, we get
dpdt=−∂H∂x=−∂∂x(p22m+12kx2)=−kx
Equations 61.1.5 and 61.1.8 are two coupled first-order ordinary differential equations, which may be solved simultaneously to find x(t) and p(t). Note that for this example, Eq. 61.1.5 is equivalent to p=mv, and Eq. 61.1.8 is just Hooke's Law, F=−kx.
As with Lagrangian mechanics, more general coordinates (and their corresponding momenta) may be used in place of x and p. For example, in finding the motion of the simple plane pendulum, we may replace the position x with angle θ from the vertical, and the linear momentum p with the angular momentum L.
Solution
To solve the plane pendulum problem using Hamiltonian mechanics, we first write down the kinetic energy K, expressed in terms of angular momentum L :
K=L22I=L22mℓ2
where I=mℓ2 is the moment of inertia of the pendulum. As before, the gravitational potential energy of a plane pendulum is
U=mgℓ(1−cosθ)
The Hamiltonian in this case is then
H(θ,L)=K+U=L22mℓ2+mgℓ(1−cosθ)
Substituting this expression for H into the first of Hamilton's equations, we find
dθdt=∂H∂L=∂∂L[L22mℓ2+mgℓ(1−cosθ)]=Lmℓ2
Substituting for H into the second of Hamilton's equations, we get
dLdt=−∂H∂θ=−∂∂θ[L22mℓ2+mgℓ(1−cosθ)]=−mgℓsinθ
Equations 61.1.15 and 61.1.18 are two coupled first-order ordinary differential equations, which may be solved simultaneously to find θ(t) and L(t). Note that for this example, Eq. 61.1.15 is equivalent to L=Iω, and Eq. 61.1.18 is the torque τ=−mgℓsinθ.