Source
Adapted from my own handwritten and hand-typed notes from Year 1 to Year 3 of my EEE degree
The Euler method is the simplest numerical method for an initial value problem (IVP)
It produces approximations at the grid points , where is the step size.
Derivation
Expand in a Taylor series:
For small , keep only the first order part and use :
Geometrically, we walk along the tangent line for a distance , so the curve is replaced by a polygon.
Error
Error behaviour:
- local truncation error per step:
- global truncation error after steps:
- so Euler is a first order method: halving roughly halves the final error
Worked example
Solve , with . Here . The exact solution is .
| exact | error | |||
|---|---|---|---|---|
| 0 | 0.0 | 0 | 0 | 0 |
| 1 | 0.2 | 0 | 0.0214 | 0.0214 |
| 2 | 0.4 | 0.04 | 0.0918 | 0.0518 |
| 3 | 0.6 | 0.128 | 0.2221 | 0.0941 |
| 4 | 0.8 | 0.2736 | 0.4255 | 0.1519 |
| 5 | 1.0 | 0.4883 | 0.7183 | 0.2300 |
The error keeps growing as increases. A big improvement for little extra work is the Improved Euler Method.