global error in Euler's method

Solution 1:

If you posit that for the exact solution you get the formula $$ y(t_k+h)=y(t_k)+hf(t_k,y(t_k))+\frac{h^2}{2}l_k $$ where $l_k=y''(t_k+\theta_kh)$, $θ_k\in(0,1)$, then the error $e_k=y_k-y(t_k)$ propagates as $$ |e_{k+1}|=\left|e_k+h[f(t_k,y_k)-f(t_k,y(t_k))]-\frac{h^2}{2}l_k\right| \le |e_k|+hL|e_k|+\frac{h^2}{2}|l_k| $$ so that $$ |e_k|\le\sum_{j=0}^{k-1}(1+Lh)^{k-j-1}\frac{h^2}{2}|l_j| $$ You can now interpret this sum after further relaxing $(1+Lh)\le e^{Lh}$ as a Riemann sum for $$ |e_k|\lessapprox\frac{h}2\int_{t_0}^{t_k} e^{L(t_k-s)}|y''(s)|\,ds $$ or use a bound $M_2$ on the second derivative $y''(t)=f_t(t,y(t))+f_x(t,y(t))f(t,y(t))$ and the geometric sum formula $$ |e_k|\le\frac{(1+Lh)^k-1}{(1+Lh)-1}\frac{h^2}2M_2=\frac{M_2}{2L}[(1+Lh)^k-1]h \le\frac{M_2}{2L}[e^{L(t_k-t_0)}-1]h. $$