Why is f(y,t+h) Equal to y(t+2) in Implicit Euler Method?

3 replies · 4K views · last reply
porcupineman23
Messages
3
Reaction score
0
Hey
I don't understand this backward euler solution, in particular why the f(y,t+h) is equal to y(t+2)
 
Attachments
  • Handwritten-style worked solution comparing forward and backward Euler for y' + y = 0 with h = 2, showing y(t+2) = y(t) + 2(-y(t)), then backward Euler steps y(t+2) = y(t) + 2(y(t+2)) and y(2) = -1, y(4) = 1, y(6) = -1.
    photo.JPG
    39.6 KB · Views: 643
porcupineman23 said:
Hey
I don't understand this backward euler solution, in particular why the f(y,t+h) is equal to y(t+2)
Because it's wrong.

It should be:

y(t+2)=y(t)+y'(t+2)h

Since, in this problem y'=-y, you have:

y(t+2)=y(t)-y(t+2)h

Solving for y(t+2) gives:
[tex]y(t+2)=\frac{y(t)}{1+2h}[/tex]
Chet
 
Chestermiller said:
Because it's wrong.
I agree with you there!

It should be:

y(t+2)=y(t)+y'(t+2)h
Actually, it should be y(t+h)=y(t)+h*y'(t+h). Given that y'(t)=-y(t), this becomes y(t+h)=y(t)-h*y(t+h), or y(t+h)=y(t)/(1+h).

Solving for y(t+2) gives:
[tex]y(t+2)=\frac{y(t)}{1+2h}[/tex]
Chet
Better: ##y(t+2)=\frac {y(t)}{3}##.

You've already set h=2.
 
D H said:
I agree with you there!

Actually, it should be y(t+h)=y(t)+h*y'(t+h). Given that y'(t)=-y(t), this becomes y(t+h)=y(t)-h*y(t+h), or y(t+h)=y(t)/(1+h).


Better: ##y(t+2)=\frac {y(t)}{3}##.

You've already set h=2.
Thanks DH. I'm usually more careful about checking over what I've written before I submit my replies. I hope I didn't confuse the OP too much.

Chet