Even though the second-order Runge-Kutta method (see menu under) "ODE - 2nd-Order Runge-Kutta" provides
more accurate results than Euler's method does, the
second-order Runge-Kutta method is still not used often in numerical applications.
Integration formulas of the fourth order are
preferred, which achieve great accuracy with less computational effort.
In most problems encountered in computational engineering, the fourth-order Runge-Kutta integration method represents
an appropriate compromise between the competing requirements of a low truncation error per step and a low computational
cost per step.
From the discussion in a previous entry (see menu under) "ODE - Euler Method",
the main reason why Euler's method has a large truncation error per step is that in evolving the solution
from xn to xn + 1, the method only evaluates derivatives at the beginning of the
interval, i.e., at xn. The method is, therefore, very asymmetric in regards to the
beginning and the end of the interval.-->
The fourth-order Runge-Kutta method can be derived by three trial steps per interval.
The standard form of this method can
be expressed by the following equations:
k1 = h f (xn, yn)
k2 = h f (xn + h/2, yn + k1/2)
k3 = h f (xn + h/2, yn + k2/2)
k4 = h f (xn + h, yn + k3)
yn + 1 = yn + (k1 + 2k2 + 2k3 + k4) / 6
The next tab shows the testing and implementation of this method.