Question
Question: Use Runge-Kutta method of $4^{th}$ order to solve $\frac{dy}{dx}=y-x, y(0)=1$ at $x=0.2$ with $h=0.2...
Use Runge-Kutta method of 4th order to solve dxdy=y−x,y(0)=1 at x=0.2 with h=0.2.

y(0.2) ≈ 1.2428
Solution
We are given the differential equation dxdy=y−x with the initial condition y(0)=1. We need to find the value of y(0.2) using the Runge-Kutta method of order 4 with step size h=0.2.
The Runge-Kutta method of order 4 is given by:
yi+1=yi+61(k1+2k2+2k3+k4)
where: k1=hf(xi,yi) k2=hf(xi+2h,yi+2k1) k3=hf(xi+2h,yi+2k2) k4=hf(xi+h,yi+k3)
Here, f(x,y)=y−x, x0=0, y0=1, and h=0.2.
-
Calculate k1: k1=hf(x0,y0)=0.2(y0−x0)=0.2(1−0)=0.2
-
Calculate k2: k2=hf(x0+2h,y0+2k1)=0.2(1+20.2−(0+20.2))=0.2(1.1−0.1)=0.2(1.0)=0.22
-
Calculate k3: k3=hf(x0+2h,y0+2k2)=0.2(1+20.22−(0+20.2))=0.2(1.11−0.1)=0.2(1.01)=0.222
-
Calculate k4: k4=hf(x0+h,y0+k3)=0.2(1+0.222−(0+0.2))=0.2(1.222−0.2)=0.2(1.022)=0.2444
Now, calculate y1: y1=y0+61(k1+2k2+2k3+k4)=1+61(0.2+2(0.22)+2(0.222)+0.2444)=1+61(0.2+0.44+0.444+0.2444)=1+61(1.3284)=1+0.2214=1.2214
Thus, y(0.2)≈1.2428