# Stormer-Verlet method

1. Nov 12, 2012

### Master J

Is there an explicit equation for the Stormer-Verlet numerical integration method for any problem?
I usually only see it in a formulation that is specific to a given problem. Is there a general equation?

2. Nov 14, 2012

### bigfooted

Stormer-Verlet integration was developed specifically to solve Newtons equation F=ma, or:
$\ddot{x}=a(x(t))$ for initial value problems.
Stormer-Verlet integration leads to the relation:
$x_{n+1}=2x_n -x_{n-1}+a_n\Delta t^2 + O(\Delta t^4)$

That's why you usually only see it in this form.

However, it is easy to extend this to more general cases, although I've never seen people do this. For the general second order ode:

$a(t)\ddot{x}+b(t)\dot{x}+c(t)x=0$,

first transform to get rid of the $\dot{x}$ term:

$\ddot{y}=ry$, with $r=\frac{b(t)^2+2a(t)\dot{b}(t)-2b(t)\dot{a}(t)-4a(t)c(t)}{4a(t)^2}$

then, proceed as usual to get the recursive relationship:

$y_{n+1}=2y_n -y_{n-1}+r_n\Delta t^2 + O(\Delta t^4)$

Note that to get the same accuracy as the original Stormer-Verlet method, you have to construct r(t) exactly first, you should not approximate the derivatives of a(t),b(t) and c(t).
By the way, when a,b,c are constants, r reduces to $r=\frac{b^2-4ac}{4a^2}$

To get the first derivative (velocity), you need to do the usual (leapfrogging or central differencing)

For other differential equations, you need to switch to other methods though.

3. Dec 20, 2013

### franzi

hello,
i have the same problem. I thought Verlet's integration scheme is not practicable for damped systems, i.e. with a therm dependent on the velocity on the left side of the equation of motion. Could you please explain the transformation property a little more detailed? Or if you could give me some literature, where this transformation is discussed i yould be pleased...

Greetings from Austria

4. Dec 21, 2013

### bigfooted

I don't see why a velocity term would introduce problems. You even have the velocity-verlet algorithm that deals with exactly this problem, and this has the same order of accuracy, but maybe the region of stability is much smaller?

Anyway, the transformation above is a standard transformation for second order ODE's that can probably be found in many textbooks on ordinary differential equations. I don't know if it has a specific name. it can be found for instance on the Wolfram page:

http://mathworld.wolfram.com/Second-OrderOrdinaryDifferentialEquation.html

As I said above, if you construct r(t) directly from the ODE, then the problem reduces to the standard (Stormer-)Verlet algorithm.