Runge-Kutta Method
The Runge-Kutta method (RK4) approximates the solution of y′ = f(x, y) one step at a time. Each step averages four slopes, k1 to k4, measured at the start of the step, twice at the midpoint and at the end: y(n+1) = y(n) + (h/6)(k1 + 2k2 + 2k3 + k4). It is far more accurate than Euler’s method.