5.16 Euler's method
Studying this course? Keep your progress in one place.
Key facts
- Euler's method approximates the solution of by following tangents in steps of length .
- and : always use the values at the start of the step.
- A smaller step length is more accurate but needs more steps; it is never exact.
- Where the solution is concave up, Euler underestimates; concave down, it overestimates.
- For a coupled system, update , and together using the old values.
What Euler does
It builds an approximate solution by following the tangent for a short step, then recalculating the gradient.
Many differential equations have no neat formula for the solution. Euler's method builds a numerical approximation instead. Given and an initial condition , the equation gives the gradient at any point.
Follow the tangent for a short horizontal distance , the step length, then recalculate the gradient and repeat. The result is a list of points joined by short straight segments.
- 1
Find the gradient
Substitute into
- 2
Follow the tangent
Move along and along
- 3
Record the new point
This is
Then back to step 1
Which gradient does a step use?
Formulae and an example
Each step adds to and adds gradient to .
For with and step length , use the recurrence below. Example: , , .
- at
- at
- at
So . The true value is (3 s.f.): close, not exact.
- Euler (h = 0.1)
- True solution
, , . What is ?
Spreadsheet or GDC
Enter the recurrence in a spreadsheet or GDC, fill down, and round only the final answer.
Repeated steps are slow by hand, so examinations use permissible technology. In a spreadsheet, put and in the first row. In the next row type the recurrences, for example =A2+0.1 for and =B2+0.1*(A2+B2) for , then fill down. Most GDCs can do this with a recursive sequence or table mode.
Keep full precision and round only the final answer to 3 significant figures. A spreadsheet is also the quickest way to answer "when does first exceed...?": read down the column.
- 1
Enter the start
and in row 1
- 2
Type the recurrences
one formula for , one for
- 3
Fill down
one row per step
- 4
Read the answer
round at the end to 3 s.f.
When should you round?
Accuracy and step length
A smaller step length is more accurate; the sign of the error follows the curvature.
Each step replaces a curve by a tangent, so a small error is made, and errors build up. A smaller step length gives a more accurate estimate but needs more steps. Halving roughly halves the final error.
If the true solution is concave up, the tangent lies below the curve and Euler underestimates. If concave down, it overestimates. In the example the gradient increases, so .
The true solution is concave down. Euler gives...
Coupled systems
Step , and together, always using the old values on the right.
Two quantities that depend on each other give a coupled system: and . Euler's method steps , and together, and both new values use the OLD and .
Example: , , , , . Then and . Next and .
In the example, what is ?
Predator-prey models
Each term is either growth or loss, and the interaction terms need both species to meet.
With prey and predators a common model is and .
Populations are constant when both rates are zero: and , the non-zero equilibrium.
Example: , with , gives rates and , so with : , . A spreadsheet then shows cycles, with predators peaking after the prey.
- Prey x
- Predators y
| Prey | Predators | |
|---|---|---|
| Increases | : growth with plenty of food | : growth from eating prey |
| Decreases | : eaten by predators | : deaths |
Prey
- Increases:
- : growth with plenty of food
- Decreases:
- : eaten by predators
Predators
- Increases:
- : growth from eating prey
- Decreases:
- : deaths
In , what does represent?
Try an exam question
Euler's method with step length is used to solve with . Find an estimate of , and state with a reason whether it is an overestimate or an underestimate.
[4 marks]
- [1].
- [1].
- [1].
- [1]The solution is concave up (the gradient is increasing), so the tangents lie below the curve: an underestimate.
That's the notes covered.
Carry on to the next subtopic.
Try a question
Find the approximation to when .
1 mark, marked against the mark scheme
Find the approximation to when .
1 mark, marked against the mark scheme