# Symplectic integrators of the pendulum equation?

In particular, a symplectic integrator to solve:

$$\ddot{\theta} + \dfrac{g}{l} \sin(\theta) = 0.$$

I'm currently using velocity verlet - by realizing that

$$\ddot{\theta} = -\nabla (-cos(\theta)) = A(\theta(t)),$$

ie. letting $$x = \theta$$

$$v = d \theta/dt$$

$$a = d^2 \theta /dt^2.$$

Is it safe to apply Verlet integration to generalized coordinates? In particular, does this hold true for a generalized coordinate theta:

$$\theta_{t+dt} \approx \theta_t + \dot{\theta}_t dt + \frac{1}{2} \ddot{\theta}_t (dt)^2?$$

-

The canonical momentum corresponding to the generalizaed coordinate $\theta$ is:

$p_{\theta} = \frac{\partial L}{\dot{\partial\theta}} = ml^2\dot{\theta} = ml^2 v$

where $L$ is the Lagrangian:

$L = T-V = \frac{1}{2}ml^2\dot{\theta}^2+mgl(1-cos\theta)$

Thus the symplectic form is

$\omega = dp_{\theta} \wedge d\theta = ml^2 dv \wedge d\theta$

This is the symplectic form of a particle moving on a circle (symplectic form of $T^*S^1$). It looks locally just like the canonical symplectic form of a particle moving on a line. This is the reason why the Verlet integration formula will provide a symplectic integrator for this problem. This is provided that it is implemented just in the form written in the Wikipedia page:

$v(t+\frac{1}{2}\Delta t) = v(t)+ \frac{1}{2}A(t) \Delta t$

$x(t+\Delta t) = x(t)+v(t+\frac{1}{2}\Delta t) \Delta t$

$v(t+\Delta t) = v(t+\frac{1}{2}\Delta t))+\frac{1}{2}A(t+\Delta t) \Delta t$

-