Simple pendulum YouTube

Figure 5.1 - Simple pendulum

Figure 5.1 - Simple pendulum

In figure 5.1 we show a pendulum, of length $r$, with a bob of mass $m$ near the surface of the earth. We choose the origin to be at the base of the rod.

Nb. As usual, we take the mass of the rod to be negligible.

The coordinate that varies in this problem is $\theta$ ($r$ is fixed). The mass, on a circular path, has speed $v = r\dot{\theta}$, hence we can write down the kinetic energy immediately, $$T = \tfrac{1}{2} mr^2\dot{\theta}^2$$

The potential is proportional to the height, $h = r\cos\theta$, and if we set $$U\left(\frac{\pi}{2}\right) = 0$$ then we get $$U(\theta) = -mgr \cos\theta$$

So now the Lagrangian is $$\begin{align*}L(\theta,\dot{\theta}) &= T - U\\&= \tfrac{1}{2} mr^2\dot{\theta}^2 + mgr \cos\theta\end{align*}$$

The momentum conjugate to $\theta$ is $$\pi_\theta = \frac{\partial L}{\partial \dot{\theta}} = m r^2 \dot{\theta}$$ and $$\frac{\partial L}{\partial \theta} = -mgr \sin\theta$$

Thus, the equations of motion are $$\begin{align*}0 &= \frac{\mathrm{d} \pi_\theta}{\mathrm{d} t} -\, \frac{\partial L}{\partial \theta}\\&= m r^2 \ddot{\theta} + mgr \sin\theta\end{align*}$$ or $$\ddot{\theta} = - \frac{g}{r}\sin\theta$$

Now, the Hamiltonian for the pendulum is $$\begin{align*}H &= \pi_\theta \dot{\theta} - L\\&= \tfrac{1}{2} mr^2\dot{\theta}^2 - mgr \cos\theta\\&= T \;+ \; U\end{align*}$$ which is the energy, as usual.