Before the final, flavours A and B
Why does Euler’s method drift off the solution?
A differential equation sets a slope at every point; Euler’s method follows it in straight steps, and each step lands on a neighbouring solution, below where the solutions bend up and above where they bend down.
Builds on exponential growth and decay.
The lesson as text
1. A slope at every point
The equation gives a slope at every point: at it is , at it is . The short segments draw those slopes, and a solution is a curve that runs along them. Drag the start up and down the -axis.
Find the start whose solution is a straight line.
From the solution is the line : along it , the line's own slope. Start above it and the solution bends up, ever steeper; start below it and the solution bends down.
The figure: The slope field of y′ = y − x, and the solution through (0, 1.00), which reaches 2.000 at x = 1.
2. Hold one slope
Start at , where the slope is . The quickest estimate of keeps that slope the whole way: . But the slope is , and it changes as soon as the curve moves.
Question: Is too high, too low, or right?
Too low: the solution reaches . It bends up, so its slope keeps growing past , and the amber line, which holds the first slope, falls further behind all the way. Holding a changing rate constant draws a straight line where the solution curves.
The figure: The slope field of y′ = y − x, and the solution through (0, 1.50), which reaches 3.359 at x = 1. In amber, the line that holds the starting slope 1.50 all the way, reaching 3.000.
3. Read the slope again
Euler's method rereads the slope as it goes: from each point it follows the field's slope there for one step of , then looks again. With 2 steps of it reaches , short of the solution's by .
Take more steps until Euler's estimate is within of the solution.
With 8 steps of it reaches , short. The error shrinks with the step: , , , for 1, 2, 4 and 8 steps, closer to halving with each halving of .
The figure: The slope field of y′ = y − x, and the solution through (0, 1.50), which reaches 3.359 at x = 1. Euler’s method in 8 steps of 0.125 ends at 3.283.
4. Each step lands on another solution
Every point has a solution through it, so each of Euler's points sits on some solution. After the first step, the next one follows the field where it landed: the slope of that solution, not of the one it started on.
Question: Compared with the solution through the start, where are the solutions through Euler’s points?
Each lower than the last. A curve that bends up lies above its tangents, so every step drops onto a lower solution, and the next step sets off from there. The drops add up, which is why Euler's estimate runs low wherever the solutions bend up.
The figure: The slope field of y′ = y − x, and the solution through (0, 1.50), which reaches 3.359 at x = 1. Euler’s method in 2 steps of 0.500 ends at 3.125. Dashed, the solution on from each of Euler’s points, each lower than the last where the solutions bend up and higher where they bend down.
5. Where Euler runs high
Above the line the solutions bend up and Euler runs low. Drag the start to see what it does elsewhere.
Drag the start to where Euler's estimate comes out too high.
Below the line the solutions bend down, so each step lands on a higher solution and the estimate runs high: from , against . On the line Euler is exact. Here , positive above the line and negative below it: the bending says which way Euler errs.
The figure: The slope field of y′ = y − x, and the solution through (0, 0.50), which reaches 0.641 at x = 1. Euler’s method in 2 steps of 0.500 ends at 0.875. Dashed, the solution on from each of Euler’s points, each lower than the last where the solutions bend up and higher where they bend down.
The film, as said, 1:26
- 0:00
The equation gives a slope at every point. The segments draw them, and a solution runs along them.
- 0:06
Slide the start down the -axis. From the solution is a straight line, .
- 0:14
Start below that line and the solution bends down; above it, it bends up.
- 0:21
Start at , where the slope is .
- 0:26
Holding that slope to gives , the amber line. The solution reaches .
- 0:30
The slope is , and it grows as the solution climbs. One slope held is a straight line where the solution curves.
- 0:38
Euler's method rereads the slope after every step. Two steps of reach , short.
- 0:43
Four steps of : , short.
- 0:46
Eight steps of : , short. Each halving of the step cuts the error, closer to half each time.
- 0:52
Each of Euler’s points sits on a solution of its own. With two steps, here they are, dashed.
- 0:58
These solutions bend up and lie above their tangents, so each step drops onto a lower solution, and the drops add up.
- 1:06
Below the line the solutions bend down, and each step lands on a higher one.
- 1:13
From , two steps give , above the true . On the line itself Euler is exact.
- 1:19
A differential equation sets a slope everywhere. Euler follows it in straight steps: low where solutions bend up, high where they bend down.