In Initial Value Problems (IVPs) we are trying to find the curve which is a solution to an Ordinary Differential Equation (ODE) for certain initial conditions.
$$ \frac{dy}{dx}=f(x,y),~y(0)=y_0~~~\Rarr~~~y=g(x) $$
We will obtain successive values of $y$ by an incremental approach, using an increment function, $\phi$, which varies in it’s definition based on approach.
$$ y_{i+1}=y_i+\phi_ih $$
As in general in numerical methods, truncation error and round off error are present ((1) Error Evaluation and Classification). We also distinguish between the local Error, which is error incurred in a single step, and global error, which is accumulated over all steps.
When we neglect the $n^{th}$ derivative of $y$, we are ignoring terms of the Taylor series expression for $y_{i+1}$ with a factor of $h^{n}$. Thus, we are ignoring a value on the order of $h^n$. We express this saying that the local error is $O(h^n)$. As it turns out, this results in a global error that is $O(h^{n+1})$.
$$ y_{i+1}=y_i+f(x_i,y_i)h+\cdots+\frac{f^{n-2}(x_i,y_i)}{(n-1)!}h^{n-1}+O(h^n) $$
Euler’s method assumes the rate of change of $y$ to not change, neglecting the $2^{nd}$ derivative of $y$, thus having $O(h^2)$ local truncation error and $O(h^3)$ global error. Recall that $y_{i+1}=y_i+\phi_ih$.
$$
\phi_i=f(x_i,y_i)~\Rarr~y_{i+1}=y_i+f(x_i,y_i)h
$$
Heun’s method is a predictor-corrector method. It uses Euler’s method to make an initial prediction for the location of $y_{i+1}$, evaluates $f$ at that location, and averages those two values of $f$ to account for the $2^{nd}$ derivative of $y$. This accounts for the $2^{nd}$ derivative of $y$ by assuming that it is constant and using two evaluations of $f$ to compensate for its value by averaging the two sampled $1^{st}$ derivatives. Thus, Heun’s method has $O(h^3)$ local truncation error and $O(h^4)$ global error.
$$ \phi_i=\frac{f(x_i,y_i)+f(x_{i+1},y_{(i+1)0})}{2}~~~~~~~~~~~~y{(i+1)_0}=y_i+f(x_i,y_i)h $$
Heun’s method is a predictor-corrector method. It uses Euler’s method to evaluate the location of $y_{i+1/2}$, evaluates $f$ at that location, uses that slope at the midpoint to account for the $2^{nd}$ derivative of $y$. This accounts for the $2^{nd}$ derivative of $y$ by assuming that it is constant and using two evaluations of $f$ to compensate for its value by evaluating the the $1^{st}$ derivative at the midpoint. Thus, the midpoint method has $O(h^3)$ local truncation error and $O(h^4)$ global error.