Procedure for solving ODEs
In mathematics and computational science, Heun's method may refer to the improved[1] or modified Euler's method (that is, the explicit trapezoidal rule[2]), or a similar two-stage Runge–Kutta method. It is named after Karl Heun and is a numerical procedure for solving ordinary differential equations (ODEs) with a given initial value. Both variants can be seen as extensions of the Euler method into two-stage second-order Runge–Kutta methods.
The procedure for calculating the numerical solution to the initial value problem:

by way of Heun's method, is to first calculate the intermediate value
and then the final approximation
at the next integration point.

![{\displaystyle y_{i+1}=y_{i}+{\frac {h}{2}}[f(t_{i},y_{i})+f(t_{i+1},{\tilde {y}}_{i+1})],}](https://wikimedia.org/api/rest_v1/media/math/render/svg/4de50045f6b3fe877e7109e855e63a72c78663e2)
where
is the step size and
.
- ^ Süli, Endre; Mayers, David (2003), An Introduction to Numerical Analysis, Cambridge University Press, ISBN 0-521-00794-1.
- ^
Ascher, Uri M.; Petzold, Linda R. (1998), Computer Methods for Ordinary Differential Equations and Differential-Algebraic Equations, Philadelphia: Society for Industrial and Applied Mathematics, ISBN 978-0-89871-412-8.