First page Back Continue Last page Overview Graphics
The Leapfrog Integrator
Extremely useful for second-order DEs in which d2x/dt2 = f(x), e.g. SHM, N-body, etc.
Suppose x is position, so d2x/dt2 is acceleration.
Procedure: define v = dx/dt at the midpoints of the steps, i.e. velocities staggered wrt positions.
- Define vi+1/2 = v(t + ½ t), i = 0, 1, 2, ...
- Then advance xi to xi+1 and vi+1/2 to vi+3/2:
- xi+1 = xi + vi+1/2 t
- vi+3/2 = vi+1/2 + f(xi+1) t
Note x, v, & f can all be considered vectors.
Also, now using t in place of h.