0
19kviews
Apply Runge kutta method of 4th order to find an approximate value of y at $x=0.2$ if $dy/dx=x+y^2$ given $y=1$

When $x=0$ in steps of $h=0.1$

1 Answer
2
2.0kviews

$$Let\space f(x,y)\therefore dy/dx=x+y^2 $$ $$ Part I :\ h=0.1\space x_0=0\space and \space y+0=1\ $$

By Runge kutta method of 4th order.

$K_1=hf(x_0,y_0)=0.1\times f(0,1)\\ =0.1\times (0+1^2)=0.1\\ K_2=hf(x_0+\dfrac h2,y_0+\dfrac{k_1}2=0.1f(0+\dfrac {0.1}2,\dfrac {1+0.1}2)\\0.1\times (\dfrac {0.1}2+(\dfrac {2.1}2)^2)\\ =0.1\times (0.05+(1.05)^2)\\=0.1153\\ K_3=hf(x_0+\dfrac h2,y_0+\dfrac {k_2}2)=0.1\times f(0+\dfrac {0.1}2,1+\dfrac {0.1153}2)\\ =0.1\times\Big[\dfrac {0.1}2+\Big(\dfrac {2.1153}2\Big)^2\Big]\\ =0.1169\\ K_4=hf(x_0+h,y_0+k_3)=0.1\times f(0+0.1,1+0.1169)\\ =0.1[0.1+(1.1169)^2]\\ =0.1347\\ \therefore K=\dfrac 16(K_1+2K_2+2K_3+K_4)\\ =\dfrac 16(0.1+0.1153\times 2+0.1169\times2 +0.1347)\\ =0.1165\\ \therefore y=y_0+k=1+0.1165=1.1165\\ $

$\therefore$ The correct value of y when $x=0.1$ is $1.1165$

Part 2

$$h=0.1,x=0.1 \space \&\space y_1=1.1165$$

$k_1=hf(x_1,y_1)=0.1f(0.1,1.1105)\\ =0.1[0.1+(1.1165)^2]\\ =0.1347\\ K_2=hf(x_1+\dfrac h2,y_1+\dfrac {k_1}2)\\ =0.1\times f(0.1+\dfrac {0.1}2,1.1165+\dfrac {0.1347}2)\\ =0.1[0.15+(1.1838)^2]\\ 0.1551\\ K_3=hf(x_1+\dfrac h2,y_1+\dfrac {k_2}2) \\ =0.1\times f(0.1+\dfrac {0.1}2,1.1165+\dfrac {0.1551}2)\\ =0.1\times [0.15+(1.1941)^2]\\ =0.1576\\ K_4=hf(x_1+h_1,y_1+k_3)\\ =0.1f(0.1+0.1,1.1165+0.1576)\\ =0.1[0.2+(1.2741)^2]\\ =0.1823\\ K=\dfrac 16(k_1+2k_2+2k_3+k_4)\\ =\dfrac 16(0.1347+2\times 0.1551+2\times 0.1576+0.1823)\\ =0.1751\\ \therefore y=y_1+k=1.1165+0.1571\\ =1.2736 $

$\therefore$ The correct value of y when $x=0.2$ is $1.2736$

Please log in to add an answer.