The math optional, made finite. Daily Practice

Euler’s method (and modified Euler)

At a Glance

Why This Chapter Matters

Euler’s method appears as a 15-mark question in 2013 and a 10-mark compulsory question in 2023. Both are pure computation: apply the recurrence yn+1=yn+hf(xn,yn)y_{n+1}=y_n+hf(x_n,y_n) step by step until the target xx is reached. The algorithm is identical in both cases; only the function f(x,y)f(x,y) and number of steps differ. This is the easiest ODE numerical method to execute, and the only real risks are arithmetic errors and forgetting to carry enough decimal places.

Minimum Theory

Euler’s method. For the initial-value problem y=f(x,y)y'=f(x,y), y(x0)=y0y(x_0)=y_0, with step size hh:

xn+1=xn+h,yn+1=yn+hf(xn,yn)x_{n+1} = x_n + h,\qquad y_{n+1} = y_n + h\,f(x_n,\,y_n)

Each step uses the slope at the current point (xn,yn)(x_n,y_n) to step forward. The method is first-order accurate: global error O(h)O(h).

Practical execution. Evaluate f(xn,yn)f(x_n,y_n) first, multiply by hh, add to yny_n. Use the old (xn,yn)(x_n,y_n) for computing ff at every step — do not update either variable before using them in the formula. Carry at least 5–6 significant figures in intermediate steps; rounding to 4 decimal places at each step compounds error and corrupts the final digit.

Number of steps. Steps needed =(xtargetx0)/h= (x_\text{target}-x_0)/h. Check this before starting.

Euler step diagram: tangent line approximation

Question Archetypes

ArchetypeRecognition
euler-method”Use Euler’s method with step size hh to find yy at x=x=\ldots”; ODE given; initial condition given

euler-method (2 question(s); 2013, 2023)

Recognition Cues

Solution Template

  1. Identify f(x,y)f(x,y), x0x_0, y0y_0, hh, and the target xx. Compute the number of steps n=(xx0)/hn=(x-x_0)/h.
  2. Set up the iteration table: columns nn, xnx_n, yny_n, f(xn,yn)f(x_n,y_n), hfh\cdot f.
  3. Execute each step: compute f(xn,yn)f(x_n,y_n), then yn+1=yn+hf(xn,yn)y_{n+1}=y_n+h\cdot f(x_n,y_n). Carry 5+ significant digits.
  4. State the final answer rounded to the required decimal places and boxed.

Worked Example

2013 Paper 2, 2013-P2-Q7b (15 marks)

Use Euler’s method with h=0.15h=0.15 to compute y(0.6)y(0.6) (to 5 decimal places) from y=x(y+x)2y'=x(y+x)-2, y(0)=2y(0)=2.

f(x,y)=xy+x22f(x,y)=xy+x^2-2. Steps: (0.60)/0.15=4(0.6-0)/0.15=4.

Stepxnx_nyny_nf(xn,yn)f(x_n,y_n)hfh\cdot f
00.002.0000002+02=2.000000\cdot2+0-2=-2.000000.30000-0.30000
10.151.700000.15(1.85)2=1.722500.15(1.85)-2=-1.722500.25838-0.25838
20.301.441630.30(1.74163)2=1.477510.30(1.74163)-2=-1.477510.22163-0.22163
30.451.220000.45(1.67000)2=1.248500.45(1.67000)-2=-1.248500.18728-0.18728
40.601.03272

y(0.6)1.03272\boxed{y(0.6) \approx 1.03272}

Sample computation (Step 1 \to Step 2):

f(0.15,1.70000)=0.15(1.70000+0.15)2=0.15×1.852=0.27752=1.72250f(0.15,\,1.70000)=0.15(1.70000+0.15)-2=0.15\times1.85-2=0.2775-2=-1.72250.

y2=1.70000+0.15×(1.72250)=1.700000.25838=1.44163y_2=1.70000+0.15\times(-1.72250)=1.70000-0.25838=1.44163.


2023 Paper 2, 2023-P2-Q5b (10 marks)

Given dy/dx=(y2x)/(y2+x)dy/dx=(y^2-x)/(y^2+x), y(0)=1y(0)=1, h=0.1h=0.1. Find y(0.4)y(0.4) by Euler’s method (4 decimal places).

f(x,y)=(y2x)/(y2+x)f(x,y)=(y^2-x)/(y^2+x). Steps: 0.4/0.1=40.4/0.1=4.

nnxnx_nyny_nf(xn,yn)f(x_n,y_n)hfh\cdot f
00.01.0000(10)/(1+0)=1.00000(1-0)/(1+0)=1.000000.10000
10.11.1000(1.21000.1)/(1.2100+0.1)=0.84733(1.2100-0.1)/(1.2100+0.1)=0.847330.08473
20.21.1847(1.40350.2)/(1.4035+0.2)=0.75055(1.4035-0.2)/(1.4035+0.2)=0.750550.07506
30.31.2598(1.58710.3)/(1.5871+0.3)=0.68205(1.5871-0.3)/(1.5871+0.3)=0.682050.06821
40.41.3280

y(0.4)1.3280\boxed{y(0.4) \approx 1.3280}

Common Traps

Marks-Aware Writing

A 15-mark Euler answer must show: the formula yn+1=yn+hf(xn,yn)y_{n+1}=y_n+hf(x_n,y_n) stated, the function f(x,y)f(x,y) identified, the iteration table with all four columns filled for all steps, and sample computations written out for at least one step. A 10-mark answer needs the table and final answer; the formula may be stated briefly.

Practice Set

We've mapped all 13 years of this exam. Get new chapters, tools, and solutions as we release them — free.