45.6k views
2 votes
Use Euler's method with step size 0.5 to compute the approximate y-values y y(1.5), y2y (2), yzy (2.5), and y4 y(3) of the solution of the initial-value problem y' = 2 – 5x + 2y, y(1) = 0.

1 Answer

2 votes

Let
f(x,y)=y'. In Euler's method, we start with an initial value
y_0=y(x_0) and recursively compute


\begin{cases}x_(n+1)=x_n+h\\y_(n+1)=y_n+f(x_n,y_n)h\end{cases}

for
n\ge0 and where
h=0.5.

For example, when
n=0, we have


y_1=y_0+0.5(2-5x_0+2y_0)\implies y_1=0+0.5(2-5+0)\implies y_1=-1.5

and so on. A table can help organize this:


\begin{array}{ccccc}n&x_n&y_n&f(x_n,y_n)&y_(n+1)\\0&1&0&-3&\boxed{-1.5}\\1&1.5&-1.5&-8.5&\boxed{-5.75}\\2&2&-5.75&-19.5&\boxed{-15.5}\\3&2.5&-15.5&-41.5&\boxed{-36.25}\end{array}

User MaicolBen
by
8.1k points