Question on Euler's method - ODE

Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
1 reply · 2K views
cue928
Messages
129
Reaction score
0

Homework Statement


y' = y - x - 1, y(0) = 1, h = .25


Homework Equations





The Attempt at a Solution


y1 = 1+(.25)*(1-0-1) = 1
y2 = 1+(.25)*(1-1-1) = .75

This is not what the book has, but it is organized weird to me. It asks for EM twice, first w/ step size h=.25, then h=0.1. But the way the answers are listed in the back do not correspond with this so I am not sure what they are getting. Curious if folks agree w/ me here on y1, y2. Thanks in advance.
 
Physics news on Phys.org
cue928 said:

Homework Statement


y' = y - x - 1, y(0) = 1, h = .25


Homework Equations





The Attempt at a Solution


y1 = 1+(.25)*(1-0-1) = 1
y2 = 1+(.25)*(1-1-1) = .75

This is not what the book has, but it is organized weird to me. It asks for EM twice, first w/ step size h=.25, then h=0.1. But the way the answers are listed in the back do not correspond with this so I am not sure what they are getting. Curious if folks agree w/ me here on y1, y2. Thanks in advance.

Why are using using [itex]x_2=1[/itex]?