# Help with implicit euler method

#### porcupineman23

Hey
I don't understand this backward euler solution, in particular why the f(y,t+h) is equal to y(t+2)

#### Attachments

• 95.4 KB Views: 356
Related Differential Equations News on Phys.org

#### Chestermiller

Mentor
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:
$$y(t+2)=\frac{y(t)}{1+2h}$$
Chet

#### D H

Staff Emeritus
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:
$$y(t+2)=\frac{y(t)}{1+2h}$$
Chet
Better: $y(t+2)=\frac {y(t)}{3}$.

#### Chestermiller

Mentor
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}$.