Improved Euler Method (Heun's Method)
Heun's Method: Predict with Euler, Correct with an Average Slope
Heun corrects a one-sided slope estimate
Euler's method advances from the slope at the beginning of a step. That is a useful prediction, but a curved solution may have a meaningfully different slope by the end of the interval.
Heun's method uses the Euler prediction to sample that end slope, then advances with the average of the beginning and predicted-end slopes. It is a predictor-corrector method and a standard explicit second-order Runge-Kutta method.
One step, in a disciplined order
- At the known point, evaluate the differential equation to obtain the start slope.
- Use a full step times that slope to predict both the new independent-variable value and a provisional dependent-variable value.
- Evaluate the differential equation at that predicted endpoint. Both arguments must be updated when the right-hand side depends explicitly on the independent variable.
- Advance the original dependent-variable value by a full step times the mean of the two slopes.
The last point prevents a common hybrid error. The corrected value is not the predictor plus another correction; it is a fresh update from the original value using the average slope. Likewise, the end slope is evaluated at the predicted endpoint, not at the old time paired with a new value.
Why the average improves local accuracy
The exact change over one step is the integral of the slope. Euler's method approximates that integral by a left-endpoint rectangle.
Heun's method approximates it by a trapezoid whose two heights are the start slope and a predicted end slope. For a smooth solution, that symmetric averaging cancels the leading one-sided error and produces second-order global accuracy.
Order is a scaling claim, not a promise of stability
When the step size is sufficiently small and the problem is smooth, Heun's global error scales with the square of the step size.
Reducing the step by a factor therefore reduces the leading global error by the square of that factor. This comparison requires the same problem and final time and assumes the asymptotic error regime has been reached.
Accuracy order does not guarantee stability. For a rapidly decaying linear equation, substitute the product of the rate constant and the step size into Heun's amplification factor.
If that factor has magnitude greater than one, a true decaying solution can be represented by values that grow. In that setting, a smaller step or a method designed for stiffness is the relevant remedy.
Use one step of Heun's method with h = 0.2 to approximate y(0.2) for y′ = t + y, y(0) = 1.
Mark Yourself Question
- Grab a piece of paper and try this problem yourself.
- When you're done, check the "I have answered this question" box below.
- View the solution and report whether you got it right or wrong.
A student solves an initial value problem on the interval 0 ≤ t ≤ 1 with Heun's method. With step size h = 0.2, the error at t = 1 is 3.2 × 10−3. Assuming h is already small enough for the leading error term to dominate, estimate the error at t = 1 when the same problem is solved with h = 0.05. Give your answer in scientific notation.