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)=(1−alpha h)/(1+alpha h)y_n

2k1ablakrh0

2k1ablakrh0

Answered question

2022-09-19

I am trying to show that, for the equation
y + α y = 0
alternating between a forward Euler method step for y 2 n and a backward Euler step for y 2 n + 1 with time-step h is equivalent to
y n + 1 = 1 α h 1 + α h y n
I have that
y 1 = y 0 + h ( α y 0 ) = ( 1 α h ) y 0
How exactly ( 1 + α 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 y ^ n the approximation of y n using the forward Euler method, I get
y 2 = y 1 + h ( y 1 + y ^ 2 2 )
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 ( y 1 + ( 1 α h ) y 1 2 ) = ( 1 + h ( 2 α h 2 ) ) y 1
This doesn't seem to be shaping up to the form I'm supposed to be getting. Am I doing something wrong?

Answer & Explanation

Isaac Molina

Isaac Molina

Beginner2022-09-20Added 8 answers

Let f ( z ) = α z, so y = f ( y ).
The forward Euler method is
y n + 1 = y n + h f ( y n ) = y n h α y n , and the the backwards Euler method is y n + 1 = y n + h f ( y n + 1 ) = y n h α y n + 1
So we have y 2 = y 1 + h f ( y 2 ) = y 1 h α y 2 and y 1 = y 0 + h f ( y 0 ) = y 0 h α y 0
So putting this to gether we get ( 1 + h α ) y 2 = y 1 = ( 1 h α ) y 0 , or
y 2 = 1 h α 1 + h α y 0
Now you can generalize this and fin
y 2 n = 1 h α 1 + h α y 2 ( n 1 )
so in your solution h probably only refers to half a time step.
Averi Fields

Averi Fields

Beginner2022-09-21Added 3 answers

Its great, thank you

Do you have a similar question?

Recalculate according to your conditions!

Ask your question.
Get an expert answer.

Let our experts help you. Answer in as fast as 15 minutes.

Didn't find what you were looking for?