Explicity vs implicit first order euler to approximate $e^{\alpha x}, \alpha > 0$

31 Views Asked by At

Hello for the function

$$ y(x) = e^{\alpha x} \Leftrightarrow y' = \alpha y, y(0)=1 $$

I wanted to evaluate the error of the two following iterations

$$ \left\{ \begin{array}{l} y_k = y_{k-1} + \alpha y_{k-1} \delta t \\ y_0 = 1 \end{array} \right. \Rightarrow y_k = (1+\alpha \delta t)^k $$

and

$$ \left\{ \begin{array}{l} y_k = y_{k-1} + \alpha y_{k}\delta t \\ y_0 = 1 \end{array} \right. \Rightarrow (1 - \alpha \delta t)y_k = y_{k-1} \Rightarrow y_k = (1 - \alpha \delta t)^{-1} y_{k-1} \Rightarrow y_k = (1-\alpha \delta t)^{-k} $$

Now I'd like to evaluate the the errors using

$$ y(k\delta t) = e^{\alpha k \delta t} = 1 + \alpha k \delta t + \alpha^2 \frac{k^2}{2} \delta t^2 + ... $$

I can figure the taylor expansion of the first iteration (assuming $\delta t \rightarrow 0$), indeed I would get

$$ y_k = \sum_{l=0}^{k} \binom{k}{l} (\alpha \delta t)^l $$

In such a case $$ y(k\delta t) - y_k = O(\alpha \delta t) $$

In the second iteration though I was expecting less error (asymptotically at least, i.e. something like $O(\alpha^2 \delta t^2)$), Taylor expansion I managed to get, not sure if this is correct

$$ y_k = \sum_{l=0}^{+\infty} \frac{\Gamma(1-k)}{\Gamma(1-k-l)\Gamma(l+1)} (-1)^l(\alpha \delta t)^l = 1 + \alpha k \delta t + \frac{k (k+1)}{2}\alpha^2\delta t^2 + ... $$

however the entailed error in this case is the same, is there something I'm missing? or is what I've done correct?

1

There are 1 best solutions below

4
On

You get easier results by comparing the powers in question in the exponents, that is as arguments of an exponential function after applying the appropriate logarithms. \begin{align} (1+αδt)^k=\exp\left(k\ln(1+αδt)\right) &=\exp\left(αkδt\left(1-\frac{αδt}2+\frac{(αδt)^2}3-\frac{(αδt)^3}4+...\right)\right) \\&=\exp\left(αt_k-\frac{α^2}2t_kδt+...\right), \\ (1-αδt)^{-k}=\exp\left(-k\ln(1-αδt)\right) &=\exp\left(αkδt\left(1+\frac{αδt}2+\frac{(αδt)^2}3+\frac{(αδt)^3}4+...\right)\right) \\&=\exp\left(αt_k+\frac{α^2}2t_kδt+...\right). \end{align} So you see, in both cases you get nearly the same first-order error, only with opposite signs.