Topic 5.16 · teacher page · Higher Level

Running Euler's method

A recipe they can follow and rarely picture, and an error that is systematic rather than careless.

The one thing to do with the animation

Start at one step and let it be badly wrong.

With a single step the estimate is hopeless, and that is useful: it shows the method is an approximation by construction, not by accident.

Then add steps. The staircase closes on the curve from below, every time, because each segment leaves on a tangent and the curve bends up away from it. Ask them to predict the direction of the error BEFORE adding steps; it is the same reasoning as the trapezoidal rule at SL.

It is a table, not a formula

Set the working out as columns for x, y and the gradient. Examiners follow columns, and a single bad value then reads as one slip rather than a wrong method.

A spreadsheet or the calculator's list is expected here, and is far safer than copying numbers by hand.

The answers

dy/dx = x + y, y(0) = 1, h = 0.1y₁ = 1.1, y₂ = 1.22, y₃ = 1.362, y₄ = 1.5282, y₅ = 1.72102 at x = 0.5.
The exact solutiony = 2ex − x − 1, giving 1.7974 at x = 0.5. Euler is low by 0.0764.
Halving hRoughly halves the error. Euler is a first order method.
1. y₁1.1.
2. y₂1.22.
3. Why it is lowB. The gradient is taken at the start and the curve bends up away from it.

Where the marks go

1 markUsing the formula correctly for the first step.

1 markCarrying it through the right number of steps. Zero to 0.5 with h = 0.1 is five steps.

1 markKeeping full accuracy and rounding only at the end.

1 markCommenting on the accuracy or the direction of the error, when asked.

What each wrong answer tells you

They giveWhat it means
2 for y₁Added the gradient without multiplying by h. The h is the whole idea of a step.
1.2 for y₁Gave the gradient at the next point rather than the new y.
1.21 for y₂Used gradient 1.1 instead of 1.2, forgetting that x has moved on as well as y.
Wrong step countCounting rows rather than steps. Six rows, five steps, from 0 to 0.5.
Rounded intermediatesEach rounding feeds into the next step, so the errors compound. Usually shows as a final answer wrong in the third decimal.

Other things they will say

"Why not just solve it?" Because most differential equations cannot be solved in closed form. This one can, which is exactly why it makes a good demonstration: we can see how wrong Euler is.

"Is smaller h always better?" Mathematically yes. In practice, far more arithmetic and more rounding, which is why nobody uses Euler for real work.

"Can h be negative?" Yes, to step backwards from the initial condition, and it comes up occasionally. The formula is unchanged.

A possible order

 What is happening
1Recall the slope field. We can see the solution's shape; now we want numbers.
2The formula, derived from "gradient times step". One step on the board.
3The table in full, five steps, keeping all the digits.
4The animation. Predict the error direction, then add steps.
5Questions 1 to 3, and a second equation for practice.
6Set it up on a spreadsheet so they see it is a repeated row.

Two things not to say

Do not let them round to three decimals in the table. It is the single most common reason a correct method produces a wrong final answer here.

Do not describe the error as a mistake. It is built into the method, it is predictable in direction, and saying so is worth a mark.

Questions to set

Three tiers, ramping the way practice should: the method on its own, then the method inside something real, then a challenge. Set the tier the class in front of you needs rather than one undifferentiated sheet. Answers are given so these can go straight onto a board.

1Fluency

The method on its own, with friendly numbers. Set these first and move on quickly once they are secure.

  1. One stepFor dy/dx = x + y with y(0) = 1 and h = 0.1, find y at x = 0.1.
    1 + 0.1(0 + 1) = 1.1
  2. Two moreContinue to x = 0.3.
    1.22 at x = 0.2, then 1.362 at x = 0.3.

2In context

The same skill inside a real situation, where the first job is working out what is being asked.

  1. Compare with exactThe exact solution is y = 2ex − x − 1. Find the error at x = 0.3.
    The exact value is 1.3997, so Euler is 0.0377 low.
  2. Explain the directionWhy does Euler undershoot here?
    It steps along the tangent, and this solution curve is concave up, so each tangent runs below the curve and every step falls a little further behind.

3Challenge

Reasoning, working backwards, or spotting an error. These are where the top grades are decided.

  1. Halve the stepRepeat with h = 0.05 and state the new error and the ratio.
    1.3802, an error of 0.0195. The ratio is about 1.93, so halving h roughly halves the error.
  2. Compare the two rulesEuler's error halves when h halves; the trapezoidal rule's error quarters. State what that means for choosing a method.
    Euler is first order and the trapezoidal rule is second order, so for the same extra work the trapezoidal rule buys far more accuracy. Euler is used because it handles equations that cannot be integrated at all, not because it is accurate.

Practicalities

Works on a phone. Nothing is loaded from any other site, so it runs behind a school firewall, and nothing a student does is saved or sent anywhere.