Convergence of Euler's Method. It can be shown that, under suitable conditions
on \(f\) the numerical approximation generated by the Euler method for the
initial value problem \(y^{\prime}=f(t, y), y\left(t_{0}\right)=y_{0}\)
converges to the exact solution as the step size \(h\) decreases. This is
illustrated by the following example. Consider the initial value problem
$$
y^{\prime}=1-t+y, \quad y\left(t_{0}\right)=y_{0}
$$
(a) Show that the exact solution is \(y=\phi(t)=\left(y_{0}-t_{0}\right)
e^{t-t_{0}}+t\)
(b) Using the Euler formula, show that
$$
y_{k}=(1+h) y_{k-1}+h-h t_{k-1}, \quad k=1,2, \ldots
$$
(c) Noting that \(y_{1}=(1+h)\left(y_{0}-t_{0}\right)+t_{1},\) show by induction
that
$$
y_{n}=(1+h)^{x}\left(y_{0}-t_{0}\right)+t_{n}
$$
for each positive integer \(n .\)
(d) Consider a fixed point \(t>t_{0}\) and for a given \(n\) choose
\(h=\left(t-t_{0}\right) / n .\) Then \(t_{n}=t\) for every \(n .\) Note also that
\(h \rightarrow 0\) as \(n \rightarrow \infty .\) By substituting for \(h\) in
\(\mathrm{Eq}\). (i) and letting \(n \rightarrow \infty,\) show that \(y_{n}
\rightarrow \phi(t)\) as \(n \rightarrow \infty\). Hint: \(\lim _{n \rightarrow
\infty}(1+a / n)^{n}=e^{a}\).