Question #74942

use modified euler 's method to find the approximate solution of IVP y' =2xy, y(1)=1, at x=1.5 with h=0.1. if the exact solution is y(x) =ex2-1, find the error.

Expert's answer

Question #74942 - Math - Quantitative Methods

use modified euler's method to find the approximate solution of IVP y=2xyy' = 2xy , y(1)=1y(1) = 1 , at x=1.5x = 1.5 with h=0.1h = 0.1 . If the exact solution is y(x)=ex21y(x) = ex2 - 1 , find the error.

**Solution:** for the numerical solution of the differential equation:


y=f(x,y),f(x,y)=2xyy ^ {\prime} = f (x, y), \qquad f (x, y) = 2 \cdot x \cdot y


use the explicit midpoint method also known as the modified Euler method:


yn+1=yn+hf(xn+h2,yn+h2f(xn,yn)),h=0.1,x0=1,y0=1y _ {n + 1} = y _ {n} + h \cdot f \left(x _ {n} + \frac {h}{2}, y _ {n} + \frac {h}{2} \cdot f \left(x _ {n}, y _ {n}\right)\right), \quad h = 0. 1, \quad x _ {0} = 1, \quad y _ {0} = 1


to find the approximate solution of IVP at x=1.5x = 1.5 , it takes 5 steps:


x1=x0+h=1.1,y1=y0+hf(x0+h2,y0+h2f(x0,y0))=1+0.1f(1.05,1+0.05f(1,1))=1+0.1f(1.05,1.1)=1.2310\begin{array}{l} x _ {1} = x _ {0} + h = 1. 1, y _ {1} = y _ {0} + h \cdot f \left(x _ {0} + \frac {h}{2}, y _ {0} + \frac {h}{2} \cdot f \left(x _ {0}, y _ {0}\right)\right) \\ = 1 + 0. 1 \cdot f (1. 0 5, 1 + 0. 0 5 \cdot f (1, 1)) = 1 + 0. 1 \cdot f (1. 0 5, 1. 1) = 1. 2 3 1 0 \\ \end{array}x2=x1+h=1.2,y2=y1+hf(x1+h2,y1+h2f(x1,y1))=1.231+0.1f(1.15,1.231+0.05f(1.1,1.231))=1.231+0.1f(1.15,1.3664)=1.5453\begin{array}{l} x _ {2} = x _ {1} + h = 1. 2, y _ {2} = y _ {1} + h \cdot f \left(x _ {1} + \frac {h}{2}, y _ {1} + \frac {h}{2} \cdot f \left(x _ {1}, y _ {1}\right)\right) \\ = 1. 2 3 1 + 0. 1 \cdot f (1. 1 5, 1. 2 3 1 + 0. 0 5 \cdot f (1. 1, 1. 2 3 1)) \\ = 1. 2 3 1 + 0. 1 \cdot f (1. 1 5, 1. 3 6 6 4) = 1. 5 4 5 3 \\ \end{array}x3=x2+h=1.3,y3=y2+hf(x2+h2,y2+h2f(x2,y2))=1.5453+0.1f(1.25,1.5453+0.05f(1.2,1.5453))=1.5453+0.1f(1.25,1.7307)=1.97795\begin{array}{l} x _ {3} = x _ {2} + h = 1. 3, y _ {3} = y _ {2} + h \cdot f \left(x _ {2} + \frac {h}{2}, y _ {2} + \frac {h}{2} \cdot f \left(x _ {2}, y _ {2}\right)\right) \\ = 1. 5 4 5 3 + 0. 1 \cdot f (1. 2 5, 1. 5 4 5 3 + 0. 0 5 \cdot f (1. 2, 1. 5 4 5 3)) \\ = 1. 5 4 5 3 + 0. 1 \cdot f (1. 2 5, 1. 7 3 0 7) = 1. 9 7 7 9 5 \\ \end{array}x4=x3+h=1.4,y4=y3+hf(x3+h2,y3+h2f(x3,y3))=1.97795+0.1f(1.35,1.97795+0.05f(1.3,1.97795))=1.97795+0.1f(1.35,2.2351)=2.5814\begin{array}{l} x _ {4} = x _ {3} + h = 1. 4, y _ {4} = y _ {3} + h \cdot f \left(x _ {3} + \frac {h}{2}, y _ {3} + \frac {h}{2} \cdot f \left(x _ {3}, y _ {3}\right)\right) \\ = 1. 9 7 7 9 5 + 0. 1 \cdot f (1. 3 5, 1. 9 7 7 9 5 + 0. 0 5 \cdot f (1. 3, 1. 9 7 7 9 5)) \\ = 1. 9 7 7 9 5 + 0. 1 \cdot f (1. 3 5, 2. 2 3 5 1) = 2. 5 8 1 4 \\ \end{array}x5=x4+h=1.5,y5=y4+hf(x4+h2,y4+h2f(x4,y4))=2.5814+0.1f(1.45,2.5814+0.05f(1.4,2.5814))=2.5814+0.1f(1.45,2.9428)=3.4348\begin{array}{l} x _ {5} = x _ {4} + h = 1. 5, y _ {5} = y _ {4} + h \cdot f \left(x _ {4} + \frac {h}{2}, y _ {4} + \frac {h}{2} \cdot f \left(x _ {4}, y _ {4}\right)\right) \\ = 2. 5 8 1 4 + 0. 1 \cdot f (1. 4 5, 2. 5 8 1 4 + 0. 0 5 \cdot f (1. 4, 2. 5 8 1 4)) \\ = 2. 5 8 1 4 + 0. 1 \cdot f (1. 4 5, 2. 9 4 2 8) = 3. 4 3 4 8 \\ \end{array}


exact solution:


y(x)=ex21,y(1.5)=3.4903error=3.49033.4348=0.0555(1.6%)y (x) = e ^ {x ^ {2} - 1}, y (1. 5) = 3. 4 9 0 3 \quad e r r o r = 3. 4 9 0 3 - 3. 4 3 4 8 = 0. 0 5 5 5 (\sim 1. 6 \%)


Answer: y5=3.4348y_{5} = 3.4348 , error =0.0555= 0.0555 ( 1.6%\sim 1.6\% )

Answer provided by https://www.AssignmentExpert.com

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!

LATEST TUTORIALS
APPROVED BY CLIENTS