0
5.0kviews
Apply Runge-kutta method of fourth order to find an approximate value of y at $x=1.2$ If $dy/dx=x^2+y^2$

Given that $y=1.5$ when $x=1$ choosing $h=0.1$

1 Answer
0
366views

$Let \space f(x,y)dy/dx=x^2+y^2$ Part I Hereh=0.1\space x_0=1$ and $y_0=1.5$

By Runge kutta method of fourth order

$$k_1=hf(x_0,y_0)=0.1\times f(1,1.5)=0.1(1^2+1.5^2)=0.3250\\ k_2=hf(x_0+\dfrac h2,y_0+\dfrac {k_1}2)\\ =0.1\times f(1+\dfrac {0.1}2,1.5+\dfrac {0.325}2)\\ =0.1[1.05^2+1.6625^2]=0.3866\\ k_3=hf(x_0+\dfrac h2,y_0+\dfrac {k_2}2) =0.1f(1+\dfrac {0.1}2,1.5+\dfrac {0.3866}2)\\ =0.1[1.05^2+(1.6933)^2]\\ =0.3970 \\ k_4=hf(x_0+h,y_0+k_3)=0.1f(1+0.1,1.5+0.3970)\\ =0.1(1.1^2+1.897^2)=0.4809\\ K=\dfrac 16(k_1+2k_2+2k_3+k_4)\\ =\dfrac 16[0.325+2(0.3386)+2(0.3970)+0.4809]\\ 0.3955\\ y=y_0+K=1.5+0.3955\\ =1.8955$$

Part II

Here $h=0.1 , x1 = 1.1$ and $y_1 = 1.8955$

$$k_1=hf(x_1,y_1)=0.1f(1.1,1.8955)\\ =0.1[1.1^2+1.8955^2]=0.4803\\ k_2=hf(x_1+\dfrac h2,y_2+\dfrac {k_1}2)\\ =0.1f(1.1+\dfrac {0.1}2,1.8955+\dfrac {0.4803}2)\\ =0.1[1.15^2+2.1357^2]\\ =0.5884\\ k_3=hf(x_1+\dfrac h2,y_1+\dfrac {k_2}2) \\ =0.1f(1.1+\dfrac {0.1}2,1.8955 + \dfrac {0.5884}2) \\ =0.1[1.15^2+(2.1897)^2]\\ =0.617 \\ k_4=hf(x_1+h,y_1+k_3)=0.1\times(1.2^2+2.5072^2)\\ =0.7726\\ \therefore K=\dfrac 16(k_1+2k_2+2k_3+k_4)\\ =\dfrac 16[0.4803+2(0-.5884)+2(0.6117)+0.7726]\\ 0.6088 \\ y=y_1+k=1.8955+0.6088 \\ =2.5043$$

The correct value of y when $x=1.2$ is $2.5043$

Please log in to add an answer.