Next: 3.1 Algorithm: Runge-Kutta Method Up: Main Previous: 2.1 Theorem:
3. Runge-Kutta Method

Runga- Kutta method is a more general and improvised method than that of the Euler's method. It uses, as we shall see, Taylor's expansion of a smooth function.

Before we proceed further, the following questions may arise in our mind, which has not found place in our discussion.

(a) How does one choose the starting values, sometimes called starters that are required to implement an algorithm ?

(b) Is it desirable to change the step size (or the length of the interval) h during the computation if the error estimates demands a change in h?
For the present, the discussion about question (b) is not taken up. We try to look more on question (a) in the ensuing discussion. There are many self-starter methods, like the Euler method which uses the initial condition. But these methods, are normally, not very efficient since the error bounds may not be "good enough". We have seen, in Theorem 2.1 that the local error (neglecting the rounding-off error) is $ O(h^2)$ in the Euler's Algorithm. This shows that the smaller the value of h, better the approximations are, But a smaller values of the step size h increases the volume of computations. Moreover the error of order $ O(h)$ ( h is the step size) may not be sufficiently accurate for many problems. So we look into a few methods where the error is of higher order. They are Runge-Kutta (in short R-K) methods. Let us analyze how the algorithm is reached before we actually state it. We consider the IVP

 

$ x\epsilon [a,b]$. Define $ x_k=x_0+kh$ for k=0,1,2...n with $ x_0=a$ and $ x_n=b$. We now assume that both y and f are "smooth" functions ( thereby we mean that the derivatives, could be partial also exists and are continuous upto certain "desired" order). Using Taylor's series, we now have

$\displaystyle y(x_{k+1})=y(x_k)+hy'(x_k)+\frac{h^2}{2}y''
 \vert x_k\vert+\frac{h^3}{6}y''\vert x_k\vert...$ (3.1)

($ y_{k+1}$ denotes the approximate value of y at $ x_{k+1}$, to be defined shortly.) Consider, for k=0,1,2..n-1

$\displaystyle y_{k+1}=y_k+pk_1+qk_2 ...$ (3.2)

where

$\displaystyle k_1=hf(x_k,y_k)$ (3.3)

and

$\displaystyle k_2=hf(x_k \alpha h, y_k + \beta k_1)$ (3.4)

where p,q, and $ \beta$ are constants. When , (3.2) reduces to the Euler Algorithm. We choose p,q, and $ \beta$ so that the local truncation error is ). From the definition of $ k_2$ we have

$\displaystyle \frac{k_2}{h}=f(x_k,y_k)+\alpha h f_x +\beta k_1 f_y+\frac{\alpha ^2
h^2}{2}f_{xx}+\alpha \beta hk_1f_{xy}+\frac{\beta ^2
k^2}{2}f_{yy}+O(h^3)$

where $ f_x$, $ f_y$, .... denotes the partial derivatives of f w.r.t. x,y, .... respectively. Substituting these values in (3.2), we have

$\displaystyle y_{k+1}=y_k+h(p+q)f+qh^2(\alpha f_x+\beta ff_y)+qh^3\{\frac{\alpha
 ^2}{2}.f_{xx}\alpha \beta f f
 _{xy}+\frac{p^2}{2}f^2f_{yy}\}+O(h^4)$ (3.5)

A comparison of (3.1) and (3.4), leads to the choice

$\displaystyle p+q=1$ (3.6)

$\displaystyle q(q(\alpha f_x + \beta f_y)=\frac{1}{2}y''$ (3.7)

in order that the powers of h upto match (in some sense) in the approximate values of

$ y_{k+i}$. Here we note that

Now we choose $ \alpha, \beta$,p and q so that (3.6) and(3.7) are satisfied. One of the simplest solution is

$\displaystyle p=q=\frac{1}{2}$ and $\displaystyle \alpha=\beta = 1$

Thus, we are lead to define $ y_{k+i}$ by

$\displaystyle y_{k+1}=y_k+\frac{h}{2}\{f(x_k,y_k)+f(x_k+h,y_k+hf(x_k))\}$ (3.8)

Evaluation of $ y_{k+1}$ by (3.8) is called the Runge-Kutta method of order 2 (R-K method of order 2) .

A few things are worthwhile to be noted in the above discussion. Firstly, we need the existence of partial derivatives of f upto 3 third order for R-K method of order 2. For higher order methods, we need f to be more smooth. Secondly we note that the local truncation error( in R-K method of order 2) is of the order $ O(h^3)$. Again, we remind the readers here that the round off error in the case of implementation has not been considered. Also in (3.8), the partial derivatives of f do not appear. In short, we are likely to get a better accuracy in Runge-Kutta method of order 2 in comparison with the Euler's method. Formally, we state the Runge-Kutta method of order 2.


Next: 3.1 Algorithm: Runge-Kutta Method Up: Main Previous: 2.1 Theorem: