Given that y' = x+y^2, y(0)=1, find y(0.2), using the backward Euler’s method.
Given "y'=x+y^2, y(0)=1," find "y(0.2)" , using the backward Euler's method.
Solution:
Backward difference approximation for first derivative:
"y'" "\\approx \\frac{y_n-y_{n-1}}{h}" , "h=x_n-x_{n-1}"
"x_0=0, x_1=0.2"
"h=x_n-x_{n-1}=x_1-x_0=0.2-0=0.2"
"y_n=y_{n-1}+hy'_n" , "y'_n=f(y_n,x_n)=x_n+y_n^2"
"y_0=y(x_0)=y(0)=1;" "y_1=y(x_1)=y(0.2)"
"y_1=y_0+hy'_1=y_0+h(x_1+y_1^2)=1+0.2(0.2+1^2)=1.24"
Answer: "y(0.2)=1.24."
Comments
Leave a comment