227k views
5 votes
Apply Euler’s method to approximate y(3) to the differential equation dy dx = x − y, y(0) = 1 using step size h=1.

1 Answer

4 votes

Answer:

So y(3)=1

Explanation:

Given that


(dy)/(dx)=x-y

y(0)=1,step size h=1

From Euler's method


(dy)/(dx)=f(x,y)=x-y


y_(n+1)=y_n+hf(x_n,y_n),x_n=x_0+nh


y_1=y_0+hf(x_0,y_0)


y_1=1+1f(0,1)

f(0,1)=0-1= -1


y_1=1-1=0


y_(2)=y_1+hf(x_1,y_1)


y_(2)=0+1f(1,0)

f(1,0)=1


y_(2)=1


y_(3)=y_2+hf(x_2,y_2)


y_(3)=1+1f(2,1)

f(2,1)=1


y_(3)=1+1=2


y_(4)=y_3+hf(x_3,y_3)


y_(4)=2+1f(3,2)

f(3,2)= -1


y_(4)=2-1=1

So y(3)=1

User Sam Krygsheld
by
8.2k points