Runge-Kutta Method of Order $ 4$

We are now ready to state the algorithm for using the Runge-Kutta method of order $ 4$ . This is a generalization of the R-K method of order $ 2$ to higher order methods. Without getting into analytical details, we state the R-K method of order $ 4$ . It is widely used algorithm. For the IVPs ([*]), set $ x_i = a + i h, $ for $ i=0,1,2, \ldots, n$ where $ h = \displaystyle \frac{b-a}{n}$ . Also, we set $ y(a) = y_0$ . The for $ k = 0,1,2,\ldots, n-1$ , we define

$\displaystyle y_{k+1} = y_k + \frac{k_1 + 2 k_2 + 2 k_3 + k_4}{6},$

where

$\displaystyle k_1 = h f(x_k, y_k), \; k_2 = h f(x_k + \frac{h}{2}, y_k + \frac{...
...{h}{2}, y_k + \frac{k_2}{2}) \; {\mbox{ and }}
k_4 = h f(x_k + h, y_k + k_3).$

Remark 14.3.2   The local error in the R-K method of order $ 4$ is $ O(h^5)$ . To achieve this error, we are forced to do more computation or in other words, spend more time to compute $ k_1, k_2, k_3$ and $ k_4$ . It all depends on the nature of the function to estimate the time consumed for the computation. The cost we pay for higher accuracy is more computation. Also, to reduce the local error, we need smaller values of the step size $ h$ , which again results in large number of computation. Each computation leads to more of rounding errors. In other words, reduction in discretisation error may lead to increase in rounding off error. THE MORAL IS THAT THE INDISCRIMINATE REDUCTION OF STEP-SIZE NEED NOT MEAN MORE ACCURACY.

Figure: Flow-Chart of Runge-Kutta method of order $ 4$
\includegraphics[scale=.7]{flowchart_4.eps}

EXERCISE 14.3.3   Use the Runge-Kutta method of order $ 4$ to find an approximate solution of the IVP

$\displaystyle y^\prime = y^2, \; y(0) = 1, \; 0 < x < 0.5$

with step size $ 0.05$ . Also, calculate the error and tabulate the results.

A K Lal 2007-09-12