Question #126292
Use a numerical solver and Euler's method to obtain a four-decimal approximation of the indicated value. First use h = 0.1 and then use h = 0.05.

y' = x^2 + y^2, y(0) = 3; y(0.5)

y(0.5) ≈ _______ (h = 0.1)
y(0.5) ≈ _______ (h = 0.05)
1
Expert's answer
2020-07-16T19:20:08-0400

Solution:

The iterative formulas for Euler's method are xn+1=xn+h,x_{n+1}=x_n+h, yn+1=yn+h×f(xn,yn)y_{n+1}=y_n+h\times f(x_n, y_n) , where y=f(x,y)y'=f(x,y) , y(x0)=y0y(x_0)=y_0

In this case f(x,y)=x2+y2f(x,y)=x^2+y^2 , x0=0,x_0=0, y0=3y_0=3

I) Solution for h=0.1

x1=x0+h=0+0.1=0.1x_1=x_0+h=0+0.1=0.1

y1=y0+h×f(x0,y0)=3+0.1×(02+32)=3.9y_1=y_0+h\times f(x_0, y_0)=3+0.1\times (0^2+3^2)=3.9

Analogically, searching for the next points of the solution - x2,y2,x3,y3,x4,y4,x5,y5,x_2, y_2, x_3, y_3, x_4, y_4, x_5, y_5, until reaching the desired value y(0.5)

x2=x1+h=0.1+0.1=0.2x_2=x_1+h=0.1+0.1=0.2

y2=y1+h×f(x1,y1)y_2=y_1+h\times f(x_1, y_1) =3.9+0.1×(0.12+3.92)=5.422=3.9+0.1\times (0.1^2+3.9^2)=5.422

x3=x2+h=0.3x_3=x_2+h=0.3

y3=y3+h×f(x3,y3)y_3=y_3+h\times f(x_3, y_3) =5.422+0.1×(0.22+5.4222)=8.3658=5.422+0.1\times (0.2^2+5.422^2)=8.3658

x4=x3+h=0.4x_4=x_3+h=0.4

y4=y4+h×f(x4,y4)y_4=y_4+h\times f(x_4, y_4) =8.3658+0.1×(0.32+8.36582)=15.3735=8.3658+0.1\times (0.3^2+8.3658^2)=15.3735

x5=x4+h=0.5x_5=x_4+h=0.5

y5=y4+h×f(x4,y4)y_5=y_4+h\times f(x_4, y_4) =15.3735+0.1×(0.42+15.37352)=39.0239=15.3735+0.1\times (0.4^2+15.3735^2)=39.0239

So the answer for h=0.1 is y(0.5)=39.0239y(0.5)=39.0239

II)Solution for h=0.05

x1=x0+h=0+0.05=0.05x_1=x_0+h=0+0.05=0.05

y1=y0+h×f(x0,y0)y_1=y_0+h\times f(x_0, y_0) =3+0.05×(02+32)=3.45=3+0.05\times (0^2+3^2)=3.45

x2=x1+h=0.1x_2=x_1+h=0.1

y2=y1+h×f(x1,y1)y_2=y_1+h\times f(x_1, y_1) =3.45+0.05×(0.052+3.452)=4.0453=3.45+0.05\times (0.05^2+3.45^2)=4.0453

x3=x2+h=0.15x_3=x_2+h=0.15

y3=y2+h×f(x2,y2)y_3=y_2+h\times f(x_2, y_2) =4.0453+0.05×(0.12+4.04532)=4.8640=4.0453+0.05\times (0.1^2+4.0453^2)=4.8640

x4=x3+h=0.2x_4=x_3+h=0.2

y4=y3+h×f(x3,y3)y_4=y_3+h\times f(x_3, y_3) =4.8640+0.05×(0.152+4.86402)=6.0480=4.8640+0.05\times (0.15^2+4.8640^2)=6.0480

x5=x4+h=0.25x_5=x_4+h=0.25

y5=y4+h×f(x4,y4)y_5=y_4+h\times f(x_4, y_4) =6.0480+0.05×(0.22+6.04802)=7.8789=6.0480+0.05\times (0.2^2+6.0480^2)=7.8789

x6=x5+h=0.3x_6=x_5+h=0.3

y6=y5+h×f(x5,y5)y_6=y_5+h\times f(x_5, y_5) =7.8789+0.05×(0.252+7.87892)=10.9858=7.8789+0.05\times (0.25^2+7.8789^2)=10.9858

x7=x6+h=0.35x_7=x_6+h=0.35

y7=y6+h×f(x6,y6)y_7=y_6+h\times f(x_6, y_6) =10.9858+0.05×(0.32+10.98582)=17.0248=10.9858+0.05\times (0.3^2+10.9858^2)=17.0248

x8=x7+h=0.4x_8=x_7+h=0.4

y8=y7+h×f(x7,y7)y_8=y_7+h\times f(x_7, y_7) =17.0248+0.05×(0.352+17.02482)=31.5231=17.0248+0.05\times (0.35^2+17.0248^2)=31.5231

x9=x8+h=0.45x_9=x_8+h=0.45

y9=y8+h×f(x8,y8)y_9=y_8+h\times f(x_8, y_8) =31.5231+0.05×(0.42+31.52312)=81.2163=31.5231+0.05\times (0.4^2+31.5231^2)=81.2163

x10=x9+h=0.5x_{10}=x_9+h=0.5

y10=y9+h×f(x9,y9)y_{10}=y_9+h\times f(x_9, y_9) =81.2163+0.05×(0.452+81.21632)=411.0307=81.2163+0.05\times (0.45^2+81.2163^2)=411.0307

So the answer for h=0.05 is y(0.5)=411.0307y(0.5)=411.0307

Answer: y(0.5)39.0239(h=0.1)y(0.5)\approx 39.0239 (h=0.1)

y(0.5)411.0307(h=0.05)y(0.5) \approx 411.0307 (h=0.05)

Results of all the calculations are summarized in a tabular form (screenshot attached)

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

No comments. Be the first!
LATEST TUTORIALS
APPROVED BY CLIENTS