← 2023 Paper 2
UPSC 2023 Maths Optional Paper 2 Q5b — Step-by-Step Solution
10 marks · Section B
Euler's method (and modified Euler) · Numerical Analysis · asked 2× in 13 yrs · Read the full method →
Question
Given dxdy=y2+xy2−x with initial condition y=1 at x=0. Find the value of y for x=0.4 by Euler’s method, correct to 4 decimal places, taking step length h=0.1.
Technique
Euler’s method (forward, first-order). Four steps of h=0.1 from x=0 to x=0.4.
Solution
Euler’s recurrence. With f(x,y)=y2+xy2−x and h=0.1, the iteration is
xn+1=xn+h,yn+1=yn+hf(xn,yn).
Starting from (x0,y0)=(0,1), perform four steps to reach x=0.4.
Step 1 — From (0,1) to (0.1,y1)
f(0,1)=1+01−0=1.0000.
y1=1+0.1(1.0000)=1.1000.
Step 2 — From (0.1,1.1000) to (0.2,y2)
y12=1.2100.
f(0.1,1.1)=1.2100+0.11.2100−0.1=1.31001.1100=0.84733.
y2=1.1000+0.1(0.84733)=1.1847.
Step 3 — From (0.2,1.1847) to (0.3,y3)
y22=1.4035 (since 1.18472=1.40352…).
f(0.2,1.1847)=1.4035+0.21.4035−0.2=1.60351.2035=0.75055.
y3=1.1847+0.1(0.75055)=1.2598.
Step 4 — From (0.3,1.2598) to (0.4,y4)
y32=1.5871 (since 1.25982=1.58708…).
f(0.3,1.2598)=1.5871+0.31.5871−0.3=1.88711.2871=0.68205.
y4=1.2598+0.1(0.68205)=1.3280.
Summary table
| n | xn | yn | f(xn,yn) | h⋅f |
|---|
| 0 | 0.0 | 1.0000 | 1.00000 | 0.10000 |
| 1 | 0.1 | 1.1000 | 0.84733 | 0.08473 |
| 2 | 0.2 | 1.1847 | 0.75055 | 0.07506 |
| 3 | 0.3 | 1.2598 | 0.68205 | 0.06821 |
| 4 | 0.4 | 1.3280 | — | — |
Answer
y(0.4)≈1.3280.