Symplectic integrators of the pendulum equation?

1. May 21, 2012

exmachina

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 = dtheta/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$

Last edited: May 22, 2012