-Letís consider the initial-value problem
Dy/dt = 2-y, y(0)=1
How can I compute three different approximate solutions corresponding, for an example, to Δt= 1.0, 0.5 and 0.25 over the interval 0 ≤ t ≤ 4 by using Eulerís method. Also how can I graph all three solutions? What predictions can I make about the actual solutions to the initial-value problem? How can I include a table of the approximate values of the dependent variable?
I know we want to start first by approximating the solution of the initial value problem y'(t)=f(t,y(t)), y(t0)=y0. Is Euler method yn+1=yn+hf(tn,yn)? I know we must first compute f(t0,y0). Because this differential equation depends only on y, so we need only worry about inputting the values for y. After that I get stuck? Or am I right at all?
I think I'm on the right track
since we can also say Euler's Method is yk=y0+f(y)t
So to get y's I plug for each t...(1,.5,.25), 4 times..(y1,y2,y3,y4)
and for the x's can I use xn+1=xn+h or xn+1=xn+t? therefore I compute the same way as I did for y
so my table of the approximate values would look like this
y t x
y1=1+(2-1)1=2 1.0 x1=0+1=1
y2=2+(2-2)1=2 1.0 x2=1+1=2
y3=2+(2-2)1=2 1.0 x3=2+1=3
y4=2+(2-2)1=2 1.0 x4=3+1=4
Then I would do the same for t=0.5 and t=0.25. Am I on the right track?
The way I would graph, would be x-vs-y
Now I don't know what the question is trying to ask with "what predictions can I make about the actual solutions to the initial-value problem"?
Do I have to differentiate? If yes then what?
Have a read of this article, its very good.
Originally Posted by hansbahia
Pauls Online Notes : Differential Equations - Euler's Method
Also google "stability of Euler's method". It should be clear that accuracy will improve as you make the change in t smaller.