## Differential Equations Euler's method

Find the solution y = φ(t) of the given problem and evaluate φ(t) at t = 0.1, 0.2, 0.3,
and 0.4.

1.y'=3+t-y
y = φ(t)=t-2e^-t
y(1)= 0+(0-2e^0)*(.1)=.8
and the correct answer is 1.19516

2. y'=2y-1

What I'm getting stuck on is do I use the formula y(n)=y(n-1)+f(t(n-1),y(n-1)h because when I do I do not get the same answers as back of the book.

Thanks for the help!
 PhysOrg.com science news on PhysOrg.com >> City-life changes blackbird personalities, study shows>> Origins of 'The Hoff' crab revealed (w/ Video)>> Older males make better fathers: Mature male beetles work harder, care less about female infidelity

Recognitions:
Gold Member
You are using Euler's method for this? Yes, Euler's method approximates y'= dy/dx by $\Delta y/\Delta x= \Delta y/h$ so your equation becomes $\Delta y/h= f(t, y)$ so that $\Delta y= y_n- y_{n-1}= f(t, y)h$ so that $y_n= y_{n-1}+ f(t, y)h$. For this problem, f(t, y)= 2y- 1 so you just have $y_n= y_{n-1}+ (2y_{n-1}-1)h$. What did you get?