Q4E

Question

In problems 1-4 Use Euler’s method to approximate the solution to the given initial value problem at the points x=0.1,0.2,0.3,0.4 , and 0.5 , using steps of size 0.1h=0.1 .

dydx=xy,y(0)=-1

Step-by-Step Solution

Verified
Answer
xn
0.10.20.30.40.5
yn
-1-1.01-1.029-1.085-1.096
1Write the recursive formula

For the solution use the Euler’s formula yn+1=yn+h.fxn,yn

2Apply recursive formula

One has ,fx,y=-xy,x0=0,y0=-1,h=0.1

Then , yn+1=yn+h.fxn,yn=yn+0.1xnyn

3Put n = 0 to find y 1

Now, find the value of y1 when n = 0, then

y1=y0+0.1x0y0=-1+0.10=-1

Hence, the value of  y1=-1  when  x1=0.1

4Put n = 1 to find y 2

 The value of y2 is

y2=y1+0.1x1y1=-1+0.10.1-1=-1.01

Thus, the value of  y2=-1.01 when  x2=0.2

5Put n = 2 to find y 3

Now the value of  y3 is

y3=y2+0.1x2y2=-1.01+0.10.2-1.01=-1.01+-0.019=-1.029

So, the value is  y3=-1.029 when  x3=0.3

6Put n = 3 to find y 4

The value of y4  is

y4=y3+0.1x3y3=-1.029+0.10.3-1.029=-1.029+-0.029=-1.058

Consequently, the value is  y4=-1.058  when  x4=0.4

7Put n = 4 to find y 5

The value of y5 is

y5=y4+0.1x4y4=-1.058+0.10.4-1.058=-1.058+-0.0378=-1.096

Therefore, the value is  y5=-1.096 when  x5=0.5

Therefore the solution is

xn
0.1
0.2
0.3
0.4
0.5
yn
-1
-1.01-1.029
-1.058
-1.096