← 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 yy at x=0.8x=0.8, where dydx=x+y\dfrac{dy}{dx}=\sqrt{x+y}, y(0.4)=0.41y(0.4)=0.41. Take the step length h=0.2h=0.2.

Technique

Standard RK4 with two steps; careful with intermediate \sqrt{\cdot} evaluations.

Solution

Setup. f(x,y)=x+yf(x,y)=\sqrt{x+y}. Two RK4 steps from x=0.4x=0.4 to x=0.6x=0.6 to x=0.8x=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).k_1=h\,f(x_n,y_n),\;k_2=h\,f(x_n+h/2,\,y_n+k_1/2),\;k_3=h\,f(x_n+h/2,\,y_n+k_2/2),\;k_4=h\,f(x_n+h,\,y_n+k_3). yn+1=yn+(k1+2k2+2k3+k4)/6.y_{n+1}=y_n+(k_1+2k_2+2k_3+k_4)/6.

Step 1 — From (0.4,0.41)(0.4, 0.41) to (0.6,?)(0.6, ?)

k1=0.20.4+0.41=0.20.81=0.2(0.9)=0.18000k_1=0.2\sqrt{0.4+0.41}=0.2\sqrt{0.81}=0.2(0.9)=0.18000.

k2=0.20.5+(0.41+0.09)=0.21.0=0.2(1.0)=0.20000k_2=0.2\sqrt{0.5+(0.41+0.09)}=0.2\sqrt{1.0}=0.2(1.0)=0.20000.

k3=0.20.5+(0.41+0.10)=0.21.010.2(1.00499)=0.20100k_3=0.2\sqrt{0.5+(0.41+0.10)}=0.2\sqrt{1.01}\approx 0.2(1.00499)=0.20100.

k4=0.20.6+(0.41+0.20100)=0.21.211000.2(1.10045)=0.22009k_4=0.2\sqrt{0.6+(0.41+0.20100)}=0.2\sqrt{1.21100}\approx 0.2(1.10045)=0.22009.

y1=0.41+0.18000+2(0.20000)+2(0.20100)+0.220096=0.41+1.202096=0.41+0.20035=0.61035.y_1=0.41+\dfrac{0.18000+2(0.20000)+2(0.20100)+0.22009}{6}=0.41+\dfrac{1.20209}{6}=0.41+0.20035=0.61035.

Step 2 — From (0.6,0.61035)(0.6, 0.61035) to (0.8,?)(0.8, ?)

k1=0.20.6+0.61035=0.21.210350.2(1.10016)=0.22003k_1=0.2\sqrt{0.6+0.61035}=0.2\sqrt{1.21035}\approx 0.2(1.10016)=0.22003.

k2=0.20.7+(0.61035+0.11001)=0.21.420360.2(1.19178)=0.23836k_2=0.2\sqrt{0.7+(0.61035+0.11001)}=0.2\sqrt{1.42036}\approx 0.2(1.19178)=0.23836.

k3=0.20.7+(0.61035+0.11918)=0.21.429530.2(1.19562)=0.23912k_3=0.2\sqrt{0.7+(0.61035+0.11918)}=0.2\sqrt{1.42953}\approx 0.2(1.19562)=0.23912.

k4=0.20.8+(0.61035+0.23912)=0.21.649470.2(1.28432)=0.25686k_4=0.2\sqrt{0.8+(0.61035+0.23912)}=0.2\sqrt{1.64947}\approx 0.2(1.28432)=0.25686.

y2=0.61035+0.22003+2(0.23836)+2(0.23912)+0.256866=0.61035+1.431856=0.61035+0.23864=0.84899.y_2=0.61035+\dfrac{0.22003+2(0.23836)+2(0.23912)+0.25686}{6}=0.61035+\dfrac{1.43185}{6}=0.61035+0.23864=0.84899.

Answer

  y(0.8)0.8490.  \boxed{\;y(0.8)\approx 0.8490.\;}
We post more of this — worked solutions, CSAT trap breakdowns, guide chapters — a few times a week on Telegram. Free, no sign-in. Join

This solution is part of the Maths Coverage Map — 13 years, mapped. Get the take-away PDF free.