← 2014 Paper 2
UPSC 2014 Maths Optional Paper 2 Q6c — Step-by-Step Solution
20 marks · Section B
Runge-Kutta methods (RK2/RK4) · Numerical Analysis · asked 4× in 13 yrs · Read the full method →
Question
Use Runge–Kutta formula of fourth order to find the value of y at x=0.8, where dxdy=x+y, y(0.4)=0.41. Take the step length h=0.2.
Technique
Standard RK4 with two steps; careful with intermediate ⋅ evaluations.
Solution
Setup. f(x,y)=x+y. Two RK4 steps from x=0.4 to x=0.6 to x=0.8.
RK4 formulas:
k1=hf(xn,yn),k2=hf(xn+h/2,yn+k1/2),k3=hf(xn+h/2,yn+k2/2),k4=hf(xn+h,yn+k3).
yn+1=yn+(k1+2k2+2k3+k4)/6.
Step 1 — From (0.4,0.41) to (0.6,?)
k1=0.20.4+0.41=0.20.81=0.2(0.9)=0.18000.
k2=0.20.5+(0.41+0.09)=0.21.0=0.2(1.0)=0.20000.
k3=0.20.5+(0.41+0.10)=0.21.01≈0.2(1.00499)=0.20100.
k4=0.20.6+(0.41+0.20100)=0.21.21100≈0.2(1.10045)=0.22009.
y1=0.41+60.18000+2(0.20000)+2(0.20100)+0.22009=0.41+61.20209=0.41+0.20035=0.61035.
Step 2 — From (0.6,0.61035) to (0.8,?)
k1=0.20.6+0.61035=0.21.21035≈0.2(1.10016)=0.22003.
k2=0.20.7+(0.61035+0.11001)=0.21.42036≈0.2(1.19178)=0.23836.
k3=0.20.7+(0.61035+0.11918)=0.21.42953≈0.2(1.19562)=0.23912.
k4=0.20.8+(0.61035+0.23912)=0.21.64947≈0.2(1.28432)=0.25686.
y2=0.61035+60.22003+2(0.23836)+2(0.23912)+0.25686=0.61035+61.43185=0.61035+0.23864=0.84899.
Answer
y(0.8)≈0.8490.