Consider the differential equation with initial condition y0
Consider the differential equation with initial condition y(0) = 3. A. Use Euler?s method with two steps to estimate y when x = 1: Now use four steps: B. What is the solution to this differential equation (with the given initial condition)? C. What is the magnitude of the error in the two Euler approximations you found? Magnitude of error in Euler with 2 steps = Magnitude of error in Euler with 4 steps = D. By what factor should the error in these approximations change (that is, the error with two steps should be what number times the error with four)? factor =
Solution
y\'=3x
y_(n+1)=y_(n)+hf(x,y)
y_1= 3+0.5(3*0)=3
y_2=3 +0.5(3*0.5)=3.75
y(1)=3.75
using step 4, h=0.25
y_1= 3+0.25(3*0)=3
y_2=3 +0.25(3*0.25)=3.1875
y_3=3.1875+0.25(3*0.5)=3.5625
y_4=3.5625+0.25(3*0.75)=4.125
y(1)=4.125
(b)
dy/dx=3x
dy=3xdx
integrate both the side, y= 3x^2/2 +c
initial condition: y(0)=3
c=3
differential equation :y= 3^2/2 + 3
y(1)= 3*1^2/2 +3=4.5
C.
magnitude error in step two= 4.5-3.75=0.75
magnitude error in step four= 4.5-4.125=0.375?
D. 0.5
