Question #125138
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' = x2 + y2, y(0) = 3; y(0.5)

y(0.5) ≈ _________ (h = 0.1)
y(0.5) ≈ _________(h = 0.05)
1
Expert's answer
2020-07-09T18:19:05-0400

Euler's method explanation


We have an equation y=f(x,y)y'=f(x,y), a point (xo,yo)(x_o,y_o) and a step value hh. We determine a sequence of points (x1,y1),(x2,y2)(xn,yn)(x_1,y_1), (x_2,y_2) \dots (x_n,y_n), where xi+1=xi+hx_{i+1} = x_i + h and yi+1=yi+hf(xi,yi)y_{i+1} = y_i + h\cdot f(x_i,y_i).


In our task f(x,y)=x2+y2f(x,y) = x^2+y^2, point is (0,3)(0,3), and using current step value we want to find the point (xn,yn)(x_n, y_n), where xn=0.5x_n = 0.5.


Euler's method with step h = 0.1

Solution


x1=xo+h=0+0.1=0.1x_1 = x_o + h = 0 +0.1 = 0.1

y1=yo+hf(xo,yo)=3+0.1(02+32)=3.9y_1 = y_o + h \cdot f(x_o,y_o) = 3 + 0.1\cdot(0^2+3^2) = 3.9

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

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

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

y3=y2+hf(x2,y2)=5.422+0.1(0.22+5.4222)8.3658y_3 = y_2 + h \cdot f(x_2,y_2) = 5.422 + 0.1\cdot(0.2^2+ 5.422^2) \approx 8.3658

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

y4=y3+hf(x3,y3)=8.3658+0.1(0.32+8.36582)15.3735y_4 = y_3 + h \cdot f(x_3,y_3) = 8.3658 + 0.1\cdot(0.3^2+ 8.3658^2) \approx 15.3735

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

y5=y4+hf(x4,y4)=15.3735+0.1(0.42+15.37352)39.0240y_5 = y_4 + h \cdot f(x_4,y_4) = 15.3735 + 0.1\cdot(0.4^2+ 15.3735^2) \approx 39.0240


Answer: y(0.5) ≈ 39.024


Euler's method with step h = 0.05

Solution

x1=xo+h=0+0.05=0.05y1=yo+hf(xo,yo)=3+0.05(02+32)=3.45x2=x1+h=0.05+0.05=0.1y2=y1+hf(x1,y1)=3.45+0.05(0.052+3.452)4.0453x3=x2+h=0.1+0.05=0.15y3=y2+hf(x2,y2)=4.0453+0.05(0.12+4.04532)4.864x4=x3+h=0.15+0.05=0.2y4=y3+hf(x3,y3)=4.864+0.05(0.152+4.8642)6.048x5=x4+h=0.2+0.05=0.25y5=y4+hf(x4,y4)=6.048+0.05(0.22+6.0482)7.8789x6=x5+h=0.25+0.05=0.3y6=y5+hf(x5,y5)=7.8789+0.05(0.252+7.87892)10.9859x7=x6+h=0.3+0.05=0.35y7=y6+hf(x6,y6)=10.9859+0.05(0.32+10.98592)17.0249x8=x7+h=0.35+0.05=0.4y8=y7+hf(x7,y7)=17.0249+0.05(0.352+17.02492)31.5234x9=x8+h=0.4+0.05=0.45y9=y8+hf(x8,y8)=31.5234+0.05(0.42+31.52342)81.2176x10=x9+h=0.45+0.05=0.5y10=y9+hf(x9,y9)=81.2176+0.05(0.452+81.21762)411.0427x_1 = x_o + h = 0 + 0.05 = 0.05\\ y_1 = y_o + h \cdot f(x_o, y_o) = 3 + 0.05 \cdot (0^2 + 3^2) = 3.45\\ x_2 = x_1 + h = 0.05 + 0.05 = 0.1\\ y_2 = y_1 + h \cdot f(x_1, y_1) = 3.45 + 0.05 \cdot (0.05^2 + 3.45^2) \approx 4.0453\\ x_3 = x_2 + h = 0.1 + 0.05 = 0.15\\ y_3 = y_2 + h \cdot f(x_2, y_2) = 4.0453 + 0.05 \cdot (0.1^2 + 4.0453^2) \approx 4.864\\ x_4 = x_3 + h = 0.15 + 0.05 = 0.2\\ y_4 = y_3 + h \cdot f(x_3, y_3) = 4.864 + 0.05 \cdot (0.15^2 + 4.864^2) \approx 6.048\\ x_5 = x_4 + h = 0.2 + 0.05 = 0.25\\ y_5 = y_4 + h \cdot f(x_4, y_4) = 6.048 + 0.05 \cdot (0.2^2 + 6.048^2) \approx 7.8789\\ x_6 = x_5 + h = 0.25 + 0.05 = 0.3\\ y_6 = y_5 + h \cdot f(x_5, y_5) = 7.8789 + 0.05 \cdot (0.25^2 + 7.8789^2) \approx 10.9859\\ x_7 = x_6 + h = 0.3 + 0.05 = 0.35\\ y_7 = y_6 + h \cdot f(x_6, y_6) = 10.9859 + 0.05 \cdot (0.3^2 + 10.9859^2) \approx 17.0249\\ x_8 = x_7 + h = 0.35 + 0.05 = 0.4\\ y_8 = y_7 + h \cdot f(x_7, y_7) = 17.0249 + 0.05 \cdot (0.35^2 + 17.0249^2) \approx 31.5234\\ x_9 = x_8 + h = 0.4 + 0.05 = 0.45\\ y_9 = y_8 + h \cdot f(x_8, y_8) = 31.5234 + 0.05 \cdot (0.4^2 + 31.5234^2) \approx 81.2176\\ x_{10} = x_9 + h = 0.45 + 0.05 = 0.5\\ y_{10} = y_9 + h \cdot f(x_9, y_9) = 81.2176 + 0.05 \cdot (0.45^2 + 81.2176^2) \approx 411.0427\\


Answer: y(0.5) ≈ 411.0427


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