the improved Euler (Heun) method
/ Heun (HOYN) /
Plain Euler has one obvious flaw: it commits to the slope at the START of the step and ignores how the slope changes as you go. On a curving solution that is always a little wrong. The improved Euler method fixes this with a simple, honest trick: instead of trusting one slope, it averages the slope at the start with the slope at where it thinks it will end up, and uses that average. Two estimates of the tilt, split the difference — like reading the road both at your feet and at the next bend, and steering by the average.
Precisely, it is a two-stage predictor-corrector. First the PREDICTOR: take a tentative full Euler step to get a rough end value, y_pred = y_n + h * f(t_n, y_n). Then the CORRECTOR: evaluate the slope there, f(t_(n+1), y_pred), average it with the starting slope, and use that average for the real step: y_(n+1) = y_n + (h/2) * [ f(t_n, y_n) + f(t_(n+1), y_pred) ]. The Euler prediction is just scaffolding to find out where the end slope roughly is; the averaged slope is what you actually walk along.
The payoff is dramatic. By using an average slope, the method matches the true Taylor expansion to one more term, making it second order: its global error is of size h^2, so halving the step now quarters the error. It costs two slope evaluations per step instead of one — double the work per step — but the accuracy gain more than repays it. Improved Euler is the simplest genuinely useful step method, and the natural ladder rung between crude Euler and the full Runge-Kutta family it belongs to.
For y' = y, y(0) = 1, h = 0.1: start slope f = 1, so y_pred = 1.1; end slope f = 1.1; average = 1.05; y1 = 1 + 0.1 * 1.05 = 1.105. Compare exact e^0.1 = 1.10517. Plain Euler gave only 1.1 — improved Euler is already three digits right.
Predict with Euler, correct with the averaged slope — second-order accuracy.
Improved Euler is itself a member of the Runge-Kutta family — it is a two-stage, second-order Runge-Kutta method. 'Heun' and 'improved Euler' name the same scheme; both average start and end slopes.