← 2019 Paper 2
UPSC 2019 Maths Optional Paper 2 Q5d — Step-by-Step Solution
10 marks · Section B
Runge-Kutta methods (RK2/RK4) · Numerical Analysis · asked 4× in 13 yrs · Read the full method →
Question
Using Runge-Kutta method of fourth order, solve dxdy=y2+x2y2−x2 with y(0)=1 at x=0.2. Use four decimal places for calculation and step length 0.2.
Technique
Single fourth-order Runge–Kutta step.
Solution
Setup. f(x,y)=y2+x2y2−x2, x0=0, y0=1, h=0.2. One RK4 step reaches x=0.2.
RK4:
k1=hf(x0,y0),k2=hf(x0+2h,y0+2k1),k3=hf(x0+2h,y0+2k2),k4=hf(x0+h,y0+k3),
y1=y0+61(k1+2k2+2k3+k4).
Step 1 — k1
f(0,1)=1+01−0=1.
k1=0.2(1)=0.2000.
Step 2 — k2 at (0.1,1+0.1=1.1)
f(0.1,1.1)=1.21+0.011.21−0.01=1.221.20=0.983607.
k2=0.2(0.983607)=0.196721≈0.1967.
Step 3 — k3 at (0.1,1+0.098361=1.098361)
f(0.1,1.098361)=1.206397+0.011.206397−0.01=1.2163971.196397=0.983559.
k3=0.2(0.983559)=0.196712≈0.1967.
Step 4 — k4 at (0.2,1+0.196712=1.196712)
f(0.2,1.196712)=1.432119+0.041.432119−0.04=1.4721191.392119=0.945656.
k4=0.2(0.945656)=0.189131≈0.1891.
Step 5 — Combine
y1=1+61(0.2000+2(0.1967)+2(0.1967)+0.1891)=1+61(1.1759)=1+0.195983.
Answer
y(0.2)≈1.1960.