next up previous
Next: Example Up: 3. Runge-Kutta Method Previous: 3.2. Example

3.3 Algorithm (Runge-Kutta) method of order 4)

For the initial value problems (1.1), set $ x_i=a+ih$, i=i=0,1,2..n $ h=\frac{b-a}{n}$ and $ y_0=y_0$ for k=0,1,2...n-1, define $ y_{k+1}$ by

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

where

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

$\displaystyle k_2=hf(x_k+\frac{h}{2},y_k+\frac{k_1}{2})$

$\displaystyle k_3=hf(x_k+\frac{h}{2},y_k+\frac{k_2}{2})$




Subsections

root 2006-02-16