I am to show the IVP as defined by
$$y' = ay + b, \quad y(0) = y_0$$
converges using Euler's method.
To do this, I need to show that
$$\lim_{h \to 0} u_n = y_n$$ where $u_n$ is the approximated value and $y_n$ is the exact value (given by $y(t) = (y_0 + \frac{b}{a}) e^{at} – \frac{b}{a}$). Then
$$y_0 = y_0$$
and
$$y_1 = y_0 + hf(t_0, y_0) = y_0 + hay_0 + hb$$
$$y_2 = y_1 + hf(t_1, y_1) = y_1 + hay_1 + hb = y_0 + hay_0 + hb + ha(y_0 + hay_0 + hb) + hb$$
However, when I go up until $y_n$, I can't find a function that yields the sequence. I have tried FindSequenceFunction
but it didn't help either. How can I find such a function? If there's no such function, is there perhaps a better way to show the convergence?
Edit: Using @Lutz Lehmann's hint;
$$ y_1 = q y_0 + d $$
$$ y_2 = q y_1 + d = q(qy_0 + d) + d$$
$$ y_3 = q y_2 + q = q(q(qy_0 + d) + d) + d $$
Continuing this, don't we obtain
$$ y_n = q^n y_0 + q^{n – 1} d + d $$
where $d = hb$ and $q = (1 + h)$ and
$$ \lim_{h \to 0} (1+h) y_0 + (1+h)^{n -1} + hb = y_0$$ I must be missing something critical.
Best Answer
The Euler step is $$ y_{n+1}=y_n+h(ay_n+b)=(1+ah)y_n+hb =qy_n+d. $$ This is just a linear recursion and has a standard solution formula. \begin{align} q^{-n-1}y_{n+1}&=q^{-n}y_n+q^{-n-1}d \\=... &=q^{-0}y_0+(q^{-1}+...+q^{-n-1})d \\&=y_0+\frac{1-q^{-n-1}}{q-1}d \end{align} or $$ y_n=q^ny_0+\frac{q^n-1}{q-1}d $$ Then use the power series of logarithm or exponential to compare to the exact solution.
Substituted back this gives $$ y_n=(1+ah)^ny_0+((1+ah)^n-1)\frac{b}{a} $$ Now use $$ (1+ah)^n=\exp(n\ln(1+ah))=\exp(at_n(1-\tfrac12ah+\tfrac13(ah)^2+...)) $$ Your hang-up seems to be that when considering the limit $h\to 0$ you need to increase $n$ at the same time, so that $nh$ remains approximately constant at the value $t$ where the the numerical and exact value are compared.