Differential Equations

Improved Euler / Heun's Method

2nd-order predictor-corrector: ỹₙ₊₁ = yₙ + h·f(xₙ,yₙ) (predict), then yₙ₊₁ = yₙ + (h/2)[f(xₙ,yₙ) + f(xₙ₊₁,ỹₙ₊₁)] (correct with average slope).

Live Calculator · Step-by-Step · Differential Equations
Inputs
Result
Predictor (Euler)
ỹₙ₊₁ = yₙ + h·f(xₙ,yₙ)
Corrector (Heun)
yₙ₊₁ = yₙ + (h/2)[f(xₙ,yₙ)+f(xₙ₊₁,ỹₙ₊₁)]
Heun Approx y(x_end)
Error vs Exact

Iteration Table

Configure inputs above.

Euler vs Heun vs Exact