Step by step
The question
Question: use Euler's method on dy/dx = −y, with y(0) = 4, step 0.5, to find y(1).
There are four choices.
First we solve it, the normal way.
Then we pick.
1 The idea
We cannot solve it exactly here.
So we walk: from a point, follow its slope for a short step h.
Then look at the slope again.
The slope is how much y goes up for each 1 to the right.
So for a step h, y goes up h times the slope: new y = old y + h times the slope.
2 The step size
From x = 0 to x = 1, in steps of 0.5: that is 2 steps.
3 Go to x = 0.5
The slope at our point (0, 4): put x and y into −y.
It is −4.
New y = old y + h times the slope: 4 + 0.5 × (−4), which is 2.
Now we are at x = 0.5.
Careful!
Times the step size h!
We only move 0.5 to the right, so y changes by 0.5 times the slope.
The right way: y₁ = 4 + 0.5 × (−4) = 2.
4 Go to x = 1
The slope at (0.5, 2) is −2.
New y: 2 + 0.5 × (−2) = 1.
All the points in a table.
On a graph:
Euler's steps: straight lines, each with the slope at its start.
The true solution, in green, bends away a little.
So y(1) ≈ 1.
5 Check
Let's check: a calculator with very tiny steps gives about 1.4715.
Close to our 1.
Euler is a bit low: the slope changes during each step, and each step uses only the slope at its start.
Smaller steps get closer.
Right!
6 Pick the choice
Our answer is y(1) ≈ 1.
That is choice D.
7 Why not the others
A is 2.
Wrong: one step only: two steps reach x = 1.
B is 0.
Wrong: used step 1.
C is 9.
Wrong: used + y: dy/dx is −y.
Let's look back.
First: the idea.
Then: the step size.
Then: go to x = 0.5.
Then: go to x = 1.
Then: check.
Then: pick the choice.
Last: why not the others.