Solution (source code)

= Solution

Here
$$
\phi(u,h)=\frac14\left[
f(u)+3f\left(u+\frac{2h}{3}f(u)\right)\right].
$$
For $0<h\leq1$, the Lipschitz bound on $f$ gives
$$
|\phi(u,h)-\phi(v,h)|
\leq\left(K+\frac{K^2}{2}\right)|u-v|,
$$
so part (ii) applies with a constant independent of sufficiently small $h$.

The exact solution has the <Taylor series>[Taylor expansion]\>
$$
y(t+h)=y(t)+hf(y(t))
+\frac{h^2}{2}f'(y(t))f(y(t))+O(h^3).
$$
Meanwhile,
$$
f\left(y+\frac{2h}{3}f(y)\right)
=f(y)+\frac{2h}{3}f'(y)f(y)+O(h^2),
$$
so one numerical step from $y$ is
$$
y+h\phi(y,h)
=y+hf(y)+\frac{h^2}{2}f'(y)f(y)+O(h^3).
$$
The local error is therefore $O(h^3)$. Taking $p=2$ in part (ii) proves the required second-order global-error bound. This method is a two-stage <Runge-Kutta method>.