I am trying to show that, for the equation

$$y'+\alpha y=0$$

alternating between a forward Euler method step for $y_{2n}$ and a backward Euler step for $y_{2n+1}$ with time-step $h$ is equivalent to

$$y_{n+1}=\frac{1-\alpha h}{1+\alpha h}y_n$$

I have that

$$y_1 = y_0 + h(-\alpha y_0) = (1-\alpha h)y_0$$

How exactly $(1+\alpha h)$ works into this I don't see. If I just press forward anyway, using the trapezoid rule for the backward Euler step next, and call $\hat{y}_n$ the approximation of $y_n$ using the forward Euler method, I get

$$y_2 = y_1 + h\left(\frac{y_1 + \hat{y}_2}{2}\right)$$

I'm kind of doing this a priori but that seems right to me: the trapezoid rule is to multiply the change in the $x$-axis by the average of the bases which are $y_1$ and $y_2$. This becomes

$$y_2 = y_1 + h\left(\frac{y_1+(1-\alpha h)y_1}{2}\right) = \left( 1 + h\left(\frac{2-\alpha h}{2}\right)\right)y_1$$

This doesn't seem to be shaping up to the form I'm supposed to be getting. Am I doing something wrong?

  • $\begingroup$ It seems you forgot to ask a question. $\endgroup$ – mathreadler Sep 23 '17 at 22:47
  • 1
    $\begingroup$ @mathreadler It's at the end. $\endgroup$ – Addem Sep 23 '17 at 22:58

Let $f(z) = -\alpha z$, so $y' = f(y)$.

The forward Euler method is

$y_{n+1} = y_n + hf(y_n) =y_n -h\alpha y_n$, and the the backwards Euler method is $y_{n+1} =y_n + hf(y_{n+1}) =y_n -h\alpha y_{n+1}$

So we have $y_2 = y_1 + hf(y_2) = y_1-h\alpha y_2$ and $y_1 =y_0 + hf(y_0) = y_0 -h\alpha y_0$

So putting this to gether we get $(1+h\alpha)y_2 = y_1 = (1-h\alpha )y_0$, or

$$y_2 = \frac{1-h\alpha}{1+h\alpha} y_0$$

Now you can generalize this and fin

$$y_{2n} = \frac{1-h\alpha}{1+h\alpha} y_{2(n-1)}$$

so in your solution $h$ probably only refers to half a time step.

  • $\begingroup$ Wait, I keep getting the wrong thing here, and I've been trying to trace down the reason. I think it's that I'm not sure $y_2=y_1+hf(y_2) = y_1-h\alpha y_2$, as I believe at this point we should be using the trapezoid rule for the approximation, no? $\endgroup$ – Addem Sep 26 '17 at 22:16
  • $\begingroup$ What is unclear aobut this equation? Also why would you want to use the trapeziod rule? Your task only asks for implicit and explicit Euler. The result in the end is indeed equivalent to the trapezoid rule. $\endgroup$ – flawr Sep 26 '17 at 22:37
  • $\begingroup$ Nevermind, I think you're probably right to only use the rectangle approximation rather than the trapezoid approximation since that would explain everything. $\endgroup$ – Addem Sep 26 '17 at 22:48
  • $\begingroup$ I was under the impression that "backward Euler" just meant the trapezoid rule, since that's sort of how it's presented in my book--but after some online research I realize that's not so. $\endgroup$ – Addem Sep 26 '17 at 22:48
  • 1
    $\begingroup$ Backward Euler usually refers to the implicit Euler (and fwd to the explicit). $\endgroup$ – flawr Sep 26 '17 at 22:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.