Consider the following discrete methods of solution for the first
order linear differential equation:
Euler Method: Uses slope
at beginning of interval to get next point.
Verlet, Modified Euler, or Central Difference Method: Uses
average of slope at the endpoints of the interval.
An equivalent expression for the derivative is
Second Order Runge-Kutta Method: Predict midpoint of interval
by Euler method and then use the slope at the midpoint as the
slope over the entire interval.
with
k2 = f(xn + Dx/2, yn + k1/2) Dx
k1 = f(xn,yn) Dx
Fourth Order Runge-Kutta Method: Extension of 2nd order
RK to include a quadratic term in the predictions, not just a
linear term.
with
k1 = f(xn, yn)
k2 = f(xn + Dx/2, yn + k1 Dx/2)
k3 = f(xn + Dx/2, yn + k2 Dx/2)
k4 = f(xn + Dx,
yn + k3 Dx)
The 4th order RK method is more accurate than the Verlet method although it does require 4 evaluations of f(x,y) compared to 2 for the Verlet.