Solution (source code)

= Solution

By the <chain rule>, $y''=f_x+f_yf$ along the exact solution. Applying <Taylor's theorem> to the exact increment and the two arguments of $f$ gives
$$
\frac{y(x+h)-y(x)}h=f(x,y(x))+\frac h2y''(x)+O(h^2),\qquad
\Phi(x,y(x),h)=f(x,y(x))+\beta h(f_x+f_yf)(x,y(x))+O(h^2).
$$
The assumed differentiability makes the remainders uniform on $0\leq x\leq1-h$. Subtracting gives the <consistency error>
$$
\boxed{T_n=h\left(\frac12-\beta\right)y''(x_n)+O(h^2).}
$$
Here $O$ denotes <Big O notation>. The general <order of a numerical method> is therefore one for $\beta\ne1/2$ and at least two for $\beta=1/2$. For example, on $y'=y$ with unit initial value, $y_N=(1+h+\beta h^2)^{1/h}$. Expanding its <logarithm> gives $y_N=e[1+(\beta-1/2)h+O(h^2)]$, so the first-order term is actually nonzero when $\beta\ne1/2$.

To control accumulation, the <mean value theorem> and the bound on $f_y$ give
$$
|\Phi(x,u,h)-\Phi(x,v,h)|\leq L(1+\beta hL)|u-v|.
$$
Put $K_h=L(1+\beta hL)$, $q_h=1+hK_h$ and $e_n=y(x_n)-y_n$. The exact and numerical updates yield $|e_{n+1}|\leq q_h|e_n|+h|T_n|$, with $e_0=0$. Iterating this recurrence, as in the <Lipschitz one-step error bound>, gives
$$
|e_n|\leq\frac{q_h^n-1}{K_h}\max_{j<n}|T_j|
\leq\frac{e^{K_hx_n}-1}{K_h}\max_{j<n}|T_j|.
$$
Because $K_h\leq L(1+L)$ for $h\leq1$, the prefactor is bounded independently of the mesh. When $\beta=1/2$, the <consistency error> is $O(h^2)$, hence the maximum <global error> is $O(h^2)$. This proves at least second-order <numerical convergence> of the <explicit midpoint method>.