Skip to content
IB Diploma ProgrammeSL & HL

Euler's method

Mathematics: Applications and Interpretation SL & HL Chapter Notes

Last updated November 2026

ShareWhatsAppPost

Euler's method notes as a printable PDF.

Read online free. Download a watermarked copy with a free account.

Read the notes

The full Euler's method notes as text: skim, search, and jump between subtopics.

~12 min read

1. Euler's method for dy/dx = f(x, y)

Euler's method finds an approximate solution to a first order differential equation. Start at a known point (x₀, y₀). Use the equation to get the gradient there, then move a short step size h along the tangent.

Repeat from each new point. Each step needs the gradient f(xn, yn) at the start of the step. The rule is in the data booklet. In examinations the values are generated using technology, but you must know the rule it applies.

xn₊₁ = xn + h

yn₊₁ = yn + h × f(xn, yn)

Worked example 14 marks

Use Euler's method with step size h = 0.2 to find an approximate value of y when x = 0.4, given that dy/dx = x + y and y = 1 when x = 0.

  1. 1

    y₁ = y₀ + h f(x₀, y₀) = 1 + 0.2(0 + 1) (M1) [1]

  2. 2

    y₁ = 1.2 at x₁ = 0.2 (A1) [1]

  3. 3

    y₂ = 1.2 + 0.2(0.2 + 1.2): gradient taken at (x₁, y₁) (M1) [1]

  4. 4

    y₂ = 1.48, so y ≈ 1.48 when x = 0.4 (A1) [1]

2. Step number, time and the spreadsheet table

A spreadsheet lists n, xn and yn in columns. Row n is the value after n steps, so xn = x₀ + nh.

To reach a target value you need (x_end - x₀)/h steps. Read the time (the x-value), not the step number n. After 10 steps of h = 0.1 the time is 1, not 10.

xn = x₀ + nh

number of steps = (x_end - x₀)/h

Worked example 15 marks

Use Euler's method with h = 0.5 to estimate y when x = 2, given that dy/dx = 3 - y and y = 0 when x = 0.

  1. 1

    Number of steps = (2 - 0)/0.5 = 4, so read y₄ (A1) [1]

  2. 2

    yn₊₁ = yn + 0.5(3 - yn) (M1) [1]

  3. 3

    y₁ = 0 + 0.5 × 3 = 1.5 and y₂ = 1.5 + 0.5 × 1.5 = 2.25 (A1) [1]

  4. 4

    y₃ = 2.25 + 0.5 × 0.75 = 2.625 (A1) [1]

  5. 5

    y₄ = 2.625 + 0.5 × 0.375 = 2.8125, so y ≈ 2.81 (A1) [1]

3. A coupled system: dx/dt and dy/dt

In a coupled system two quantities change together, as in a predator-prey model. Each rate depends on both quantities. Step all three variables forward at once.

Use the old values xn, yn and tn in both rates. Do not use the new xn₊₁ to work out yn₊₁. Work out both new values from the same row, then move to the next row.

xn₊₁ = xn + h × f₁(xn, yn, tn)

yn₊₁ = yn + h × f₂(xn, yn, tn)

tn₊₁ = tn + h

Worked example 15 marks

The number of rabbits x and foxes y (in hundreds) at time t months satisfy dx/dt = 0.4x - 0.02xy and dy/dt = 0.01xy - 0.3y. Initially x = 50 and y = 10. Use Euler's method with h = 1 to estimate x and y when t = 2.

  1. 1

    xn₊₁ = xn + 1 × (0.4xn - 0.02xnyn) and yn₊₁ = yn + 1 × (0.01xnyn - 0.3yn) (M1) [1]

  2. 2

    x₁ = 50 + (20 - 10) = 60 (A1) [1]

  3. 3

    y₁ = 10 + (5 - 3) = 12: both use x₀ = 50 and y₀ = 10 (A1) [1]

  4. 4

    x₂ = 60 + (24 - 14.4) = 69.6 (A1) [1]

  5. 5

    y₂ = 12 + (7.2 - 3.6) = 15.6 (A1) [1]

4. A second order equation as a coupled system

A second order equation has d²x/dt². Let v = dx/dt. Then dx/dt = v and dv/dt comes from rearranging the equation, so you have a coupled pair.

Rearrange to make the second derivative the subject first. Divide every term, including the constant. Then step x and dx/dt together. The answer to a time question is the time, not the step number.

d²x/dt² = 4.9 - 1.2dx/dt - 4x

xn₊₁ = xn + 0.1(dx/dt)n

(dx/dt)n₊₁ = (dx/dt)n + 0.1(4.9 - 1.2(dx/dt)n - 4xn)

Worked example 15 marks

Quentin is investigating the motion of a mass hanging on a large spring.

From research, Quentin thinks the displacement, x, in metres, of the mass at time t, in seconds, will satisfy the differential equation

9.8 = 2d²x/dt² + 2.4dx/dt + 8x.

Quentin begins his investigation when the mass is at a displacement of 0.5 metres and is moving such that dx/dt = 9.8.

(a) By using Euler's method with h = 0.1 to estimate the motion of the mass after being released, find:(i) the displacement of the mass after 1 second,(ii) the first estimated time the mass reaches x = 0.

  1. 1

    xn₊₁ = xn + 0.1(dx/dt)n and (dx/dt)n₊₁ = (dx/dt)n + 0.1(d²x/dt²)n (M1) [1]

  2. 2

    d²x/dt² = 4.9 - 1.2dx/dt - 4x (A1) [1]

  3. 3

    (dx/dt)n₊₁ = (dx/dt)n + 0.1(4.9 - 1.2(dx/dt)n - 4xn) (A1) [1]

  4. 4

    When t = 1 (n = 10): x = 4.36 (4.36332…) m A1 [1]

  5. 5

    t = 2 seconds A1 [1]

5. Percentage error of an Euler estimate

A measured value given to the nearest unit is a range. A value of 385 cm to the nearest centimetre means 3.845 ≤ x < 3.855 in metres.

For the maximum possible error, put each end of the range into the percentage error formula, from the data booklet, and keep the larger answer. Use the same unit for both values.

varepsilon = |(v_A - v_E)/v_E| × 100%

Worked example 13 marks

Using technology, Quentin correctly measures the displacement of the mass, after 1 second. His software gives him a value of 385 centimetres, which is accurate to the nearest centimetre.

(b) Find the maximum possible percentage error between your estimate from part (a)(i) and the exact displacement after 1 second.

Take the estimate from part (a)(i) as 4.36332 m.

  1. 1

    x = 3.845 seen (A1) [1]

  2. 2

    (4.36332 - 3.845)/3.845 × 100: substitute into the percentage error formula (M1) [1]

  3. 3

    13.5% (13.4803…) A1 [1]

Recap

  • Euler's method: xn₊₁ = xn + h and yn₊₁ = yn + h × f(xn, yn). Take the gradient at the start of each step.
  • Row n of the table is xn = x₀ + nh. The number of steps to reach x_end is (x_end - x₀)/h.
  • A coupled system steps x, y and t together, using the old values in both rates.
  • Write a second order equation as a pair: v = dx/dt, then rearrange for dv/dt with the second derivative as the subject.
  • Give the time or x-value asked for, never the step number.
  • Maximum percentage error: use both ends of the rounding range, in one unit. Command terms: find and estimate need the method shown.

End-of-chapter exercise

Test yourself on the whole chapter. Work through these before moving on.

  1. State the formula for xn₊₁ in Euler's method with step size h.1 mark
    Answer
    1. xn₊₁ = xn + h

    Trap: The step in x is just h. The factor f(xn, yn) belongs to the update of y.

  2. Given dy/dx = 2x + y and y = 3 when x = 1, use Euler's method with h = 0.5 to find y₁.2 marks
    Answer
    1. y₁ = 3 + 0.5(2 × 1 + 3).
    2. y₁ = 3 + 2.5 = 5.5

    Trap: Work out the gradient at the start point (1, 3), not at x = 1.5.

  3. Show that Euler's method with h = 0.1 applied to dy/dx = 2y, with y = 1 when x = 0, gives y₂ = 1.44.3 marks
    Answer
    1. y₁ = 1 + 0.1(2 × 1) = 1.2.
    2. y₂ = 1.2 + 0.1(2 × 1.2).
    3. y₂ = 1.2 + 0.24 = 1.44

    Trap: The command term show that needs every substitution. Writing 1.44 with no working earns nothing.

  4. Euler's method with h = 0.05 starts at x₀ = 2 and is used to reach x = 3. (a) Calculate the number of steps needed. [1] (b) Determine the value of x after 7 steps. [1]2 marks
    Answer
    1. (a)
    2. (3 - 2)/0.05 = 20 steps.
    3. (b)
    4. x₇ = 2 + 7 × 0.05 = 2.35

    Trap: x₇ is the x-value after 7 steps, not 7. Likewise n = 20 is a step number, not a value of x.

  5. Given dy/dx = x - y and y = 2 when x = 0, use Euler's method with h = 0.5 to estimate y when x = 1.3 marks
    Answer
    1. y₁ = 2 + 0.5(0 - 2) = 1 at x₁ = 0.5.
    2. y₂ = 1 + 0.5(0.5 - 1).
    3. y₂ = 1 - 0.25 = 0.75

    Trap: The gradient is negative at the start, so y falls. Update both x and y before the second step.

  6. A population P, in thousands, satisfies dP/dt = 0.2P, where t is in years. Initially P = 50. Use Euler's method with h = 1 to estimate P when t = 3.4 marks
    Answer
    1. Pn₊₁ = Pn + 1 × 0.2Pn = 1.2Pn.
    2. P₁ = 1.2 × 50 = 60.
    3. P₂ = 1.2 × 60 = 72.
    4. P₃ = 1.2 × 72 = 86.4 thousand

    Trap: The rate must be recalculated from each new P. Using P₀ = 50 every time gives 50 + 3 × 10 = 80.

  7. Euler's method with h = 0.2 is applied to dy/dx = a + y, where a is a constant. Starting at x = 0, y = 1, the first step gives y₁ = 1.6. Determine the value of a.3 marks
    Answer
    1. 1.6 = 1 + 0.2(a + 1).
    2. 0.6 = 0.2(a + 1), so a + 1 = 3.
    3. a = 2

    Trap: The change 0.6 is h times the gradient, so divide by 0.2. Taking 0.6 as the gradient gives a = -0.4.

  8. The numbers of rabbits R and foxes F (in hundreds) satisfy dR/dt = 0.5R - 0.04RF and dF/dt = 0.02RF - 0.4F, with t in years. Initially R = 20 and F = 10. Use Euler's method with h = 1 to estimate R and F when t = 2.5 marks
    Answer
    1. Step 1: R₁ = 20 + (10 - 8) = 22.
    2. F₁ = 10 + (4 - 4) = 10, using R₀ = 20 and F₀ = 10.
    3. Step 2: R₂ = 22 + (11 - 8.8) = 24.2.
    4. F₂ = 10 + (4.4 - 4) = 10.4
    5. R ≈ 24.2 and F ≈ 10.4 (hundreds)

    Trap: Both new values come from the same old row. Using R₁ = 22 to work out F₁ gives 10.4 instead of 10 at t = 1.

  9. A float on a fishing line bobs up and down. Its height y metres above its starting level at time t seconds is modelled by 4d²y/dt² + 2dy/dt + 16y = 8. At t = 0, y = 0 and dy/dt = 1 m s⁻¹. (a) Write down the Euler's method formulas for yn₊₁ and (dy/dt)n₊₁ with h = 0.25. [3] (b) Hence estimate the height of the float when t = 0.75. [2] (c) Determine the first estimated time at which the float is moving downwards. [2]7 marks
    Answer
    1. (a)
    2. d²y/dt² = 2 - 0.5dy/dt - 4y, dividing every term by 4, the constant too.
    3. yn₊₁ = yn + 0.25(dy/dt)n
    4. (dy/dt)n₊₁ = (dy/dt)n + 0.25(2 - 0.5(dy/dt)n - 4yn)
    5. (b)
    6. t = 0.75 is n = 3. Rows (t, y, dy/dt): (0.25, 0.25, 1.375), (0.5, 0.59375, 1.453125), (0.75, 0.957031…, 1.177734…).
    7. y ≈ 0.957 m
    8. (c)
    9. Moving downwards means dy/dt < 0. Rows: (1, 1.25146…, 0.573486…), (1.25, 1.39484…, -0.249664…).
    10. dy/dt is first negative at n = 5, so t = 1.25 seconds.

    Trap: Leaving the constant as 8 when dividing by 4 spoils every row, and the answer to (c) is the time 1.25 s, not the step number 5.

  10. The temperature T in °C of a drink satisfies dT/dt = -0.1(T - 20), where t is in minutes. At t = 0, T = 90. (a) Use Euler's method with h = 5 to estimate T when t = 10. [3] (b) A thermometer gives the exact value as 46 °C, correct to the nearest degree. Find the maximum possible percentage error in your estimate. [3]6 marks
    Answer
    1. (a)
    2. T₁ = 90 + 5(-0.1 × 70) = 55.
    3. T₂ = 55 + 5(-0.1 × 35) = 37.5, so T ≈ 37.5 °C.
    4. (b)
    5. The exact value is between 45.5 and 46.5.
    6. (|37.5 - 46.5|)/46.5 × 100 = 19.35… and (|37.5 - 45.5|)/45.5 × 100 = 17.58…
    7. The maximum is 19.4%

    Trap: The estimate is below the exact value here, so the larger error comes from the upper end 46.5, not the lower one. Work out both ends.

Say this, not that

Wording that loses the mark, against the wording the mark scheme credits.

Loses the markGets the mark
n = 20 as the time the mass first reaches x = 0t = 2 seconds
t = 20: the step number read as the timet = 2 seconds: 20 steps of 0.1 seconds
4.36332 m against 385 cm in the percentage errorx = 3.845 m seen: both values in metres, or both in centimetres

Frequently asked questions

How does Euler's method give an approximate solution to a differential equation?
Start at a known point (x₀, y₀), find the gradient f(xn, yn) there, then move a short step h along the tangent: yn₊₁ = yn + h × f(xn, yn). Repeat from each new point, always taking the gradient at the start of the step. For dy/dx = x + y with y = 1 at x = 0 and h = 0.2, the approximation is y ≈ 1.48 when x = 0.4.
How many steps does Euler's method need, and which value should I read off?
The number of steps is (x_end - x₀)/h. Row n gives xn = x₀ + nh, so read the time or x-value, not the step number n. For dy/dx = 3 - y with h = 0.5 and y = 0 at x = 0, the value at x = 2 takes 4 steps and gives y ≈ 2.81.
How do I use Euler's method for a pair of linked rates, such as rabbits and foxes?
Step all the variables forward at once, using the old values xn, yn and tn in both rates. Do not use the new xn₊₁ to work out yn₊₁. For dx/dt = 0.4x - 0.02xy and dy/dt = 0.01xy - 0.3y with x = 50, y = 10 and h = 1, you get x₁ = 60 and y₁ = 12, then x₂ = 69.6 and y₂ = 15.6.
How do I apply Euler's method to a second order differential equation?
Let v = dx/dt, so the equation becomes a coupled pair. First rearrange to make the second derivative the subject, dividing every term by the coefficient, including the constant. Then step x and dx/dt together. For the spring with h = 0.1 and x = 0.5 at the start, the displacement after 1 second is 4.36 m, and the mass first reaches x = 0 at t = 2 seconds.
How do I find the maximum possible percentage error of an Euler estimate?
Put each end of the range of the exact value into the percentage error formula, using the same unit for both values, and keep the larger answer. For a drink measured as 46 °C to the nearest degree, the ends are 45.5 and 46.5. With the estimate 37.5 °C, the errors are 19.35…% and 17.58…%, so the maximum is 19.4%.
Why does my answer give the step number 20 instead of the time 2 seconds?
You have read the step number n instead of the time. Row n is the value after n steps, so n = 20 with a step of 0.1 seconds gives t = 2 seconds. The question asks for the time or the x-value, so give that, and check that the number of steps is (x_end - x₀)/h.

Free notes are just the start.

Unlock every Workbook and Chapter at a Glance, and generate your own worksheets and predicted papers.

Explore plans

Related chapters