# Euler's method vs midpoint method

Are the following methods equally accurate and if not, why?

• Using Euler's method with a step size of $h$.
• Using the midpoint method with a step size of $2h$.

Even though Euler's method has a global error of $\mathcal{O}(h)$ and the midpoint method has a global error of $\mathcal{O}(h^2)$, I do not see why using the latter would be more accurate.

Euler's method has a global error $O(h)$, not $O(h^3)$. The error constant of Euler's method essentially depends (aside from the scale of the function itself) only on the Lipschitz constant or maximum of the Jacobian of the right side. The midpoint method has a global error $O(h^2)$, however its constant depends also on the size of the second derivative.
So in total, no direct comparison is possible, however, if you compare both methods over several magnitudes for $h$, the midpoint method will quickly win.
Consider the standard test case of $y'=f(t,y)=y$, then the Euler method gives for time $T$ and $h=T/(2N)$ $$y_N=(1+h)^{2N}·y_0=e^{2N·\ln(1+h)}·y_0=e^{T-\frac12Th+O(Th^2)}·y_0$$ while the explicit midpoint method with step size $2h=T/N$ and thus the same number of evaluations of the ODE function gives $$y_N=(1+2h+2h^2)^N·y_0 =e^{N·(2h·(1+h)-\frac12·(2h)^2·(1+h^2)+\frac13·(2h)^3(1+h)^3+O(h^4)}·y_0\\ =e^{T·(1+h-h·(1+2h+…)+\frac43·h^2·(1+…)+O(h^3))}·y_0 =e^{T-\frac23·Th^2+O(Th^3)}·y_0$$ Thus the leading terms in the relative error are $-\frac12 Th$ for the Euler method and $-\frac23 Th^2$ for the midpoint method. For $h<\frac34$ the error in the midpoint method is smaller.