IB Maths AA HL Topic 5 — Calculus Paper 1 & 2 HL ~10 min read

Euler’s Method

Euler’s method is a numerical recipe for approximating the solution of a first-order DE. You start at the known point, follow the tangent line for one small step h, recompute the slope at the new point, follow that tangent for another step, and so on. Smaller h → more accurate.

📘 What you need to know

The method, visualized

Euler’s method — formula booklet yn+1 = yn + h · f(xn, yn)     xn+1 = xn + h

At each step you compute the slope f(xn, yn), then move h units forward along that tangent line. The approximation drifts away from the true curve as the steps accumulate — smaller h keeps the drift small.

Euler’s method: tangent-line steps approximating the true curve DE: dy/dx = −y, y(0) = 1, step size h = 0.25 — true solution: y = e^(−x) x y 0.25 0.5 0.75 1 1 0.5 h = 0.25 error true: y = e^(−x) Euler approximation 0.368 (true) 0.316 (Euler)
Each orange step is a tangent line of length h. The Euler estimate at x = 1 is 0.316; the true value is e−1 ≈ 0.368. Smaller h would close the gap.

Step size: the accuracy trade-off

Larger h — fewer steps, less accurate
e.g., h = 0.5 over [0, 1] = 2 steps
Fast but the approximation drifts further from the true curve at each step. Best for quick rough estimates.
Smaller h — more steps, more accurate
e.g., h = 0.1 over [0, 1] = 10 steps
Slower but the approximation tracks the true curve more closely. Use when accuracy matters.

🧭 Recipe — applying Euler’s method

  1. Rearrange the DE into dy/dx = f(x, y) form, so the slope f is explicit.
  2. Write the recursion equations: yn+1 = yn + h·f(xn, yn) and xn+1 = xn + h.
  3. Set initial values x0, y0 from the boundary condition.
  4. Count steps: (target − start) ÷ h. Run the recursion that many times (use GDC).
  5. Read off yfinal at the last row of your table. Round to 3 s.f. unless told otherwise.

Worked examples

WE 1

Standard Euler — already in dy/dx = f(x, y) form

Use Euler’s method with h = 0.1 to approximate y(0.5) for dy/dx = x + y, given y(0) = 1.

Step 1 — identify f(x, y) = x + y; need 5 steps (0 → 0.5 with h=0.1) Recursion: y_{n+1} = y_n + 0.1·(x_n + y_n); x_{n+1} = x_n + 0.1 Step 2 — run the table n=0: x=0.0, y=1.000 n=1: x=0.1, y = 1 + 0.1·(0+1) = 1.100 n=2: x=0.2, y = 1.1 + 0.1·(0.1+1.1) = 1.220 n=3: x=0.3, y = 1.22 + 0.1·(0.2+1.22) = 1.362 n=4: x=0.4, y = 1.362 + 0.1·(0.3+1.362) = 1.528 n=5: x=0.5, y = 1.528 + 0.1·(0.4+1.528) = 1.721 y(0.5) ≈ 1.72 (3 s.f.) simple as it gets — 5 rows, each using the previous y to compute the next. Use GDC recursion to speed this up.
WE 2

Rearrange first, then apply Euler

Use Euler’s method with h = 0.2 to approximate y(2) for dy/dx − 2x = y, given y(1) = 2.

Step 1 — rearrange to dy/dx = f(x, y) dy/dx – 2x = y ⟹ dy/dx = y + 2x So f(x, y) = y + 2x; need 5 steps (1 → 2 with h=0.2) Step 2 — recursion y_{n+1} = y_n + 0.2·(y_n + 2 x_n); x_{n+1} = x_n + 0.2 Step 3 — table n=0: x=1.0, y=2.000 n=1: x=1.2, y = 2 + 0.2·(2 + 2) = 2.800 n=2: x=1.4, y = 2.8 + 0.2·(2.8 + 2.4) = 3.840 n=3: x=1.6, y = 3.84 + 0.2·(3.84 + 2.8) = 5.168 n=4: x=1.8, y = 5.168 + 0.2·(5.168 + 3.2) = 6.842 n=5: x=2.0, y = 6.842 + 0.2·(6.842 + 3.6) = 8.930 y(2) ≈ 8.93 (3 s.f.) always isolate dy/dx FIRST. Skipping the rearrangement means you put the wrong f into the recursion.
WE 3

Step size effect — same DE, two different h’s

For dy/dx = x² with y(0) = 0, approximate y(1) using (a) h = 0.5, and (b) h = 0.1. The exact solution is y = x³/3. Compare.

(a) h = 0.5, only 2 steps n=0: x=0, y=0 n=1: x=0.5, y = 0 + 0.5·(0)² = 0 n=2: x=1.0, y = 0 + 0.5·(0.5)² = 0.125 ⟹ y(1) ≈ 0.125 (b) h = 0.1, 10 steps (GDC) y(1) ≈ 0.285 Exact comparison y(1) = 1³/3 = 0.333 Error with h=0.5: |0.125 – 0.333| = 0.208 Error with h=0.1: |0.285 – 0.333| = 0.048 Smaller h gives smaller error: 0.048 vs 0.208 — a 4× improvement. this is WHY exam questions say “decrease the step size to improve accuracy” — the closer h gets to 0, the closer Euler’s estimate gets to the true value.
WE 4

Population modelling — using t and P

A population P satisfies dP/dt = 0.5P − 0.01P² with P(0) = 10. Use h = 1 to estimate P(3).

Step 1 — already in dP/dt = f(t, P) form; f(t, P) = 0.5P − 0.01P² Step 2 — recursion P_{n+1} = P_n + 1·(0.5 P_n − 0.01 P_n²); t_{n+1} = t_n + 1 Step 3 — table (3 steps for t = 0 → 3) n=0: t=0, P=10.00 n=1: t=1, P = 10 + (0.5·10 − 0.01·100) = 10 + 4 = 14.00 n=2: t=2, P = 14 + (0.5·14 − 0.01·196) = 14 + 5.04 = 19.04 n=3: t=3, P = 19.04 + (0.5·19.04 − 0.01·362.5) = 19.04 + 5.895 = 24.93 P(3) ≈ 24.9 variables are t and P (not x and y) — the formula structure is identical, just renamed. f is allowed to depend on P alone (no explicit t here).
WE 5

Larger step size, more steps

Use Euler with h = 0.25 to approximate y(1) for dy/dx = 2x + 3y, given y(0) = 0.

f(x, y) = 2x + 3y; need 4 steps (0 → 1 with h=0.25) Table n=0: x=0.00, y=0.000 n=1: x=0.25, y = 0 + 0.25·(0 + 0) = 0.000 n=2: x=0.50, y = 0 + 0.25·(0.5 + 0) = 0.125 n=3: x=0.75, y = 0.125 + 0.25·(1 + 0.375) = 0.469 n=4: x=1.00, y = 0.469 + 0.25·(1.5 + 1.406) = 1.195 y(1) ≈ 1.20 (3 s.f.) notice y stays at 0 for the first step because both x and y are 0 there. As soon as x grows, the slope kicks in and y starts rising.
WE 6

Compare Euler vs exact solution

For dy/dx = −y with y(0) = 1, use h = 0.25 to estimate y(1). Then compare with the exact solution y = ex.

f(x, y) = −y; need 4 steps n=0: x=0.00, y=1.0000 n=1: x=0.25, y = 1 + 0.25·(−1) = 0.7500 n=2: x=0.50, y = 0.75 + 0.25·(−0.75) = 0.5625 n=3: x=0.75, y = 0.5625 + 0.25·(−0.5625) = 0.4219 n=4: x=1.00, y = 0.4219 + 0.25·(−0.4219) = 0.3164 Compare with exact Euler: y(1) ≈ 0.316 Exact: y(1) = e^(−1) = 0.368 Error = 0.052 Euler estimate y(1) ≈ 0.316; exact = 0.368; error ≈ 0.052. Euler UNDERESTIMATES here because the curve y=e^(−x) is concave up — tangent lines lie below it. Halving h to 0.125 would roughly halve the error.

💡 Top tips

⚠ Common mistakes

Up next: Separation of Variables. The first ANALYTICAL technique — for DEs where dy/dx = g(x)·h(y) (a function of x times a function of y). You rearrange to put all y‘s on one side and all x‘s on the other, then integrate both sides separately. Exact solutions, no approximation errors — but only works when the RHS factorises nicely.

Need help with Calculus?

Get 1-on-1 help from an IB examiner who knows exactly what Paper 1 & 2 are looking for.

Book Free Session →