Answer to Question #216241 in Differential Equations for Wavie

Question #216241

Use Euler’s method with h = 0.25 to obtain a numerical solution of

dy/

dx= −xy2

subject to y(0) = 2, giving approximate values of y for 0 "\\leq" x "\\geq" 1. Work throughout

to three decimal places and determine the exact solution for comparison.


1
Expert's answer
2021-07-13T09:00:11-0400

Solution

Exact solution of DE: dy/y2 = -xdx  =>   -1/y = -x2/2-C  =>  y = 2/(x2+2C)

y(0) = 2   => 2 = 2/(0+2C)  =>  C = ½   =>  y(x) = 2/( x2+1)

For the first-order differential equation with the initial value

y’(x) = F(x,y y(x)),  y(x0) = y0

according to the Euler method

yn+1 = yn + h*F(xn, yn)

where h – step, xn = h*n, yn = y(xn), n = 0,1,2…N

In this case F(x,y) = -xy2 , h = 0.25 , x0 = 0 , y0 = 2.

Calculations gives such results (last column is the exact solution):

n            xn           yn           y(xn)

0            0            2             2

1            0.25      2             1.882

2            0.5         1.75       1.6

3            0.75      1.367    1.28

4            1            1.017    1


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

Martha
13.07.21, 19:47

Ok

Leave a comment

LATEST TUTORIALS
New on Blog