Although Euler’s method works in principle, it is neither fast nor stable. There are several ways to improve Euler’s method, and similar to numerical integration, these ways differ in the amount of additional sampling points used and in the way the additional information gained from these points is treated. Using fixed step sizes leads to the family of Runge–Kutta methods.
Consider the use of Euler’s method not for the full interval but only to take an intermediate step to the midpoint and to determine the slope also there, in order to use the increment determined from this midpoint slope to perform the full step:
| \begin{equation*} \begin{split} k_1 &= hf(x_n,y_n),\\ k_2 &= hf(x_n+\frac{1}{2}h,y_n+\frac{1}{2}k_1),\\ y_{n+1} &= y_n+k_2 \end{split} \end{equation*} | (7.7) |
As an example for a method of even higher order, consider the frequently used fourth-order Runge–Kutta method, where the derivative is computed four times in each step to determine increments: first at the starting point (stored in \(k_1\)), then twice at the midpoint (stored in \(k_2\) and \(k_3\)), and also at a trial endpoint (stored in \(k_4\)). The final endpoint is obtained by using a weighted average of these slopes:
![]() |
![]() |
![]() |
![]() |
© J. Carstensen (Comp. Math.)