Q2E

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.1 (h = 0.1).

dydx=y(2-y)y(0)=3

Step-by-Step Solution

Verified
Answer
xn
0.10.20.30.40.5
yn
2.72.511
2.383
2.291
2.225
1Writing the recursive formula

We have, f(x,y)=y2-y,x0=0,y0=3,h=0.1

Then, yn+1=yn+h·f(xn,yn)=yn+(0.1)(2yn-yn2)

2Putting n = 0 to find y 1

y1=y0+(0.1)(2y1-y12)=3+(0.1)(6-9)=3+(-0.3)=2.7

The value of  y1=2.7 for  x1=0.1

3Putting n = 1 to find y 2

y2=y1+(0.1)(2y1-y12)=2.7+(0.1)(5.4-7.29)=2.7+(-0.189)=2.511

The value of  y2=2.511 for  x2=0.2

4Putting n = 2 to find y 3

y3=y2+(0.1)(2y2-y22)=2.511+(0.1)(5.022-6.305)=2.511+(-0.128)=2.383

The value of y3=2.383  for  x3=0.3

5Putting n = 3 to find y 4

y4=y3+(0.1)(2y3-y32)=2.383+(0.1)(4.766-5.679)=2.383+(-0.091)=2.291

The value of  y4=2.291 for  x4=0.4

6Putting n = 4 to find y 5

y5=y4+(0.1)(2y4-y42)=2.291+(0.1)(4.582-5.249)=2.291+(-0.066)=2.225

The value of y5=2.225  for  x5=0.5

Hence, the solution is

xn
0.1
0.20.30.40.5
yn
2.7
2.511
2.383
2.291
2.225