Heun's Method Calculator
Type y' = f(x, y), the starting point, the step size and the end value.
Write y' = f(x, y), such as y' = x + y, or just the right side.
The starting value of x.
The value of y at the start.
The step size, more than 0. The distance from x₀ to the end must be a whole number of steps.
The value of x to stop at, more than x₀. At most 1000 steps.
Result
You entered
Exact solution
Exact value
Error
Show the work
Heun's method (improved Euler)
Euler's method uses only the slope at the start of a step, so it lags behind a curving solution. Heun's method first PREDICTS the end of the step with Euler, takes the slope there too, and moves with the average of the two slopes.
Using
Step 1
From .
Step 2
From .
Step 3
From .
Table of steps
Every step with its two slopes.
Compare with the exact solution
This equation has an exact solution, so the numerical value can be checked: gives , an error of .
Result
The value after steps.