Use Euler's method with step size 0.2 to estimate y(1), where y(x) is the solution of the initial value problem y'=-3x+y^2, y(0)=0.
y(1)=____
My attempt:
y_1=y_0+hf(x_0,y_0)
y_1=0+0.2(-3(0)+(0)^2)=0
y_2=y_1+hf(x_1,y_1)
x_1=x_0+h=0.2
y_2=0+0.2(-3(0.2)+(0)^2)=-0.12
-0.12, -0.24,-1.44 are all answers I've gotten over the last couple days but none of them are correct. Please help in letting me know where I've gone wrong!!
y(1)=____
My attempt:
y_1=y_0+hf(x_0,y_0)
y_1=0+0.2(-3(0)+(0)^2)=0
y_2=y_1+hf(x_1,y_1)
x_1=x_0+h=0.2
y_2=0+0.2(-3(0.2)+(0)^2)=-0.12
-0.12, -0.24,-1.44 are all answers I've gotten over the last couple days but none of them are correct. Please help in letting me know where I've gone wrong!!
-
y_1 = y(0.2) = 0 + 0.2(-3*0 + 0²) = 0
y_2 = y(0.4) = 0 + 0.2(-3*0.2 + 0²) = -0.12
So we agree so far. Continuing (didn't you?),
y_3 = y(0.6) = -0.12 + 0.2(-3*0.4 + (-0.12)²) = -0.12 + 0.2(-1.11856) = -0.35712
y_4 = y(0.8) = -0.35712 + 0.2(-3*0.6 + (-0.35712)²) ≈ -0.691613
y_5 = y(1.0) = -0.69161 + 0.2(-3*0.8 + (-0.69161)²) ≈ -1.075947
y_2 = y(0.4) = 0 + 0.2(-3*0.2 + 0²) = -0.12
So we agree so far. Continuing (didn't you?),
y_3 = y(0.6) = -0.12 + 0.2(-3*0.4 + (-0.12)²) = -0.12 + 0.2(-1.11856) = -0.35712
y_4 = y(0.8) = -0.35712 + 0.2(-3*0.6 + (-0.35712)²) ≈ -0.691613
y_5 = y(1.0) = -0.69161 + 0.2(-3*0.8 + (-0.69161)²) ≈ -1.075947
-
Hey