Source
Adapted from my own handwritten and hand-typed notes from Year 1 to Year 3 of my EEE degree
The improved Euler method (also called Heun's method) predicts with Euler, then corrects using the average of the slopes at both ends of the step.
Idea
Integrating from to gives
Approximating the integral with the trapezoidal rule:
The unknown on the right is replaced by the plain Euler guess .
Formula
is the Euler increment (predictor) and is the increment using the slope at the predicted end point (corrector).
Error
Error behaviour:
- local truncation error
- global error , so it is a second order method
Worked example
Same IVP as the Euler example: , , .
Solution:
- step 1: , ,
- step 2: , ,
| 0.2 | 0.4 | 0.6 | 0.8 | 1.0 | |
|---|---|---|---|---|---|
| Heun | 0.0200 | 0.0884 | 0.2158 | 0.4153 | 0.7027 |
| exact | 0.0214 | 0.0918 | 0.2221 | 0.4255 | 0.7183 |
The error at drops from 0.23 (Euler) to 0.016. Going further to four slope samples per step gives the Fourth Order Runge-Kutta Method.