Loading [MathJax]/jax/output/HTML-CSS/jax.js
Skip to main content
Library homepage
 

Text Color

Text Size

 

Margin Size

 

Font Type

Enable Dyslexic Font
Physics LibreTexts

61.1: Examples

( \newcommand{\kernel}{\mathrm{null}\,}\)

Example 61.1.1 Simple Harmonic Oscillator

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=Hp=p(p22m+12kx2)=pm

Substituting for H into the second of Hamilton's equations, we get

dpdt=Hx=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.

Example 61.1.1 Plane Pendulum

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=L22m2

where I=m2 is the moment of inertia of the pendulum. As before, the gravitational potential energy of a plane pendulum is

U=mg(1cosθ)

The Hamiltonian in this case is then

H(θ,L)=K+U=L22m2+mg(1cosθ)

Substituting this expression for H into the first of Hamilton's equations, we find

dθdt=HL=L[L22m2+mg(1cosθ)]=Lm2

Substituting for H into the second of Hamilton's equations, we get

dLdt=Hθ=θ[L22m2+mg(1cosθ)]=mgsinθ

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 τ=mgsinθ.


61.1: Examples is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or curated by LibreTexts.

Support Center

How can we help?