0
1.2kviews
Solve $\frac{dy}{dx} = x^3 + y$ with initial conditions y(0) = 2 at x = 0.2 in steps of h = 0.1 by Runge Kutta method of fourth order.
2 Answers
0
53views

Solution:

Given that, $\frac{d y}{d x}=x^{3}+y$

$f(x, y)=x^{3}+y, x_{0}=0, y_{0}=2$ and $h=0.1$

$\therefore k_{1}=h f\left(x_{0}, y_{0}\right)=0.1(0+2)=0.2$

$\therefore k_{2}=h f\left(x_{0}+\frac{h}{2}, y_{0}+\frac{k_{1}}{2}\right)=0.1\left[\left(\frac{0.1}{2}\right)^{3}+2+\frac{0.2}{2}\right]=0.2100$

$\therefore k_{3}=h f\left(x_{0}+\frac{h}{2}, y_{0}+\frac{k_{2}}{2}\right)=0.1\left[\left(\frac{0.1}{2}\right)^{3}+2+\frac{0.2100}{2}\right]=0.2105$

$\therefore k_{4}=h f\left(x_{0}+\frac{h}{2}, y_{0}+\frac{k_{3}}{2}\right)=0.1\left[\left(\frac{0.1}{2}\right)^{3}+2+\frac{0.2100}{2}\right]=0.23105$

$\therefore k=\frac{k_{1}+2 k_{2}+2 k_{3}+k_{4}}{6}=\frac{0.2+2(0.21)+2(0.2105)+0.23105}{6}$

$\therefore k=0.2120$

0
25views

Solution:

Given that, $\frac{d y}{d x}=x^{3}+y$

$f(x, y)=x^{3}+y, x_{0}=0, y_{0}=2$ and $h=0.1$

$\therefore k_{1}=h f\left(x_{0}, y_{0}\right)=0.1(0+2)=0.2$

$\therefore k_{2}=h f\left(x_{0}+\frac{h}{2}, y_{0}+\frac{k_{1}}{2}\right)=0.1\left[\left(\frac{0.1}{2}\right)^{3}+2+\frac{0.2}{2}\right]=0.2100$

$\therefore k_{3}=h f\left(x_{0}+\frac{h}{2}, y_{0}+\frac{k_{2}}{2}\right)=0.1\left[\left(\frac{0.1}{2}\right)^{3}+2+\frac{0.2100}{2}\right]=0.2105$

$\therefore k_{4}=h f\left(x_{0}+\frac{h}{2}, y_{0}+\frac{k_{3}}{2}\right)=0.1\left[\left(\frac{0.1}{2}\right)^{3}+2+\frac{0.2100}{2}\right]=0.23105$

$\therefore k=\frac{k_{1}+2 k_{2}+2 k_{3}+k_{4}}{6}=\frac{0.2+2(0.21)+2(0.2105)+0.23105}{6}$

$\therefore k=0.2120$

Please log in to add an answer.