Answer:
So y(3)=1
Step-by-step explanation:
Given that
[tex]\dfrac{dy}{dx}=x-y[/tex]
y(0)=1,step size h=1
From Euler's method
[tex]\dfrac{dy}{dx}=f(x,y)=x-y[/tex]
[tex]y_{n+1}=y_n+hf(x_n,y_n),x_n=x_0+nh[/tex]
[tex]y_1=y_0+hf(x_0,y_0)[/tex]
[tex]y_1=1+1f(0,1)[/tex]
f(0,1)=0-1= -1
[tex]y_1=1-1[/tex]=0
[tex]y_{2}=y_1+hf(x_1,y_1)[/tex]
[tex]y_{2}=0+1f(1,0)[/tex]
f(1,0)=1
[tex]y_{2}=1[/tex]
[tex]y_{3}=y_2+hf(x_2,y_2)[/tex]
[tex]y_{3}=1+1f(2,1)[/tex]
f(2,1)=1
[tex]y_{3}=1+1[/tex]=2
[tex]y_{4}=y_3+hf(x_3,y_3)[/tex]
[tex]y_{4}=2+1f(3,2)[/tex]
f(3,2)= -1
[tex]y_{4}=2-1[/tex]=1
So y(3)=1