Runge-Kutta Method :
Runge-Kutta method here after called as RK method is the generalization of the concept used in Modified Euler's method.
In Modified Eulers method the slope of the solution curve has been approximated with the slopes of the curve at the end points of the each sub interval in computing the solution. The natural generalization of this concept is computing the slope by taking a weighted average of the slopes taken at more number of points in each sub interval. However, the implementation of the scheme differes from Modified Eulers method so that the developed algorithm is explicit in nature. The final form of the scheme is of the form
yi+1 = yi + (weighted average of the slopes) for i = 0, 1, 2 . . .
where h is the step length and yi and yi+1 are the values of y at xi and xi+1 respectively.
In genaral, the slope is computed at various points xs in each sub interval [xi, xi+1] and multiplied them with the step length h and then weighted average of it is then added to yi to compute yi+1. Thus the RK method with v slopes called as v-stage RKmethod can be written as
xn+1 = xn + h
yn+1 = yn + (1/6)(k1 + 2k2 + 2k3 + k4)
where
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)
Example Apply Runge 4th order kutta method to find an approximate value of y when h=0.2 given that dy/dx =x+y and y=1 when x=0
\[k_1=0.2\]
\[k_2=0.24\]
\[k_3=0.2440\]
\[k_4=0.2888\]
\[y_1=y_0+(1/6)(k_1+2k_2+2k_3+k_4)\]
\[y_1=y_0+k=1+0.2428=1.2428\]