The Runge-Kutta methods are a family of numerical analysis techniques used for the approximation of solutions of ordinary differential equations. They were developed around 1900 by the mathematicians C. Runge and M.W. Kutta. The fourth-order formulation ("RK4") is the most commonly used, since it provides substantial accuracy without excessive complexity.
If y' = f(t,y) is a differential equation and its value at some initial time is specified by y(t0) = y0, then the RK4 method is given by the following equation:
- k1 is the slope at the beginning of the interval;
- k2 is the slope at the midpoint of the interval, using slope k1 to determine the value of y at the point tn + h/2 using Euler's formula;
- k3 is again the slope at the midpoint, but now using the slope k2 to determine the y-value;
- k4 is the slope at the end of the interval, with its y-value determined using k3.