Answer to Question #284739 in Quantitative Methods for Vaibhav

Question #284739

Given that y'=x+y with y(0) = 1 find y(0.1).h=0.05 by Euler's modified method.


1
Expert's answer
2022-01-05T04:17:33-0500

Solution:

Given y=x+y,y(0)=1,h=0.05,y(0.1)=?y^{\prime}=x+y, y(0)=1, h=0.05, y(0.1)=?

Here, x0=0,y0=1,h=0.05,xn=0.1x_{0}=0, y_{0}=1, h=0.05, x_{n}=0.1

y=x+yf(x,y)=x+y\begin{aligned} &y^{\prime}=x+y \\ &\therefore f(x, y)=x+y \end{aligned}

Modified Euler method

ym+1=ym+hf(xm+12h,ym+12hf(xm,ym))f(x0,y0)=f(0,1)=11x0+12h=0+0.052=0.0251y0+12hf(x0,y0)=1+0.0521=1.025f(x0+12h,y0+12hf(x0,y0)=f(0.025,1.025)=1.05y(0.05)=1.0525\begin{aligned} &y_{m+1}=y_{m}+h f\left(x_{m}+\frac{1}{2} h, y_{m}+\frac{1}{2} h f\left(x_{m}, y_{m}\right)\right) \\ &f\left(x_{0}, y_{0}\right)=f(0,1)=1 \\ &\begin{array}{l} 1 \\ x_{0}+\frac{1}{2} h=0+\frac{0.05}{2}=0.025 \\ 1 \\ y_{0}+\frac{1}{2} h f\left(x_{0}, y_{0}\right)=1+\frac{0.05}{2} \cdot 1=1.025 \\ f\left(x_{0}+\frac{1}{2} h, y_{0}+\frac{1}{2} h f\left(x_{0}, y_{0}\right)=f(0.025,1.025)=1.05\right. \\ \therefore y(0.05)=1.0525 \end{array} \end{aligned}

Again taking (x1,y1)\left(x_{1}, y_{1}\right) in place of (x0,y0)\left(x_{0}, y_{0}\right) and repeat the process

f(x1,y1)=f(0.05,1.0525)=1.1025x1+12h=0.05+0.052=0.075y1+12hf(x1,y1)=1.0525+0.0521.1025=1.0801f(x1+12h,y1+12hf(x1,y1)=f(0.075,1.0801)=1.1551y2=y1+hf(x1+12h,y1+12hf(x1,y1))=1.0525+0.051.1551=1.1103y(0.1)=1.1103\begin{aligned} &f\left(x_{1}, y_{1}\right)=f(0.05,1.0525)=1.1025 \\ &x_{1}+\frac{1}{2} h=0.05+\frac{0.05}{2}=0.075 \\ &y_{1}+\frac{1}{2} h f\left(x_{1}, y_{1}\right)=1.0525+\frac{0.05}{2} \cdot 1.1025=1.0801 \\ &f\left(x_{1}+\frac{1}{2} h, y_{1}+\frac{1}{2} h f\left(x_{1}, y_{1}\right)=f(0.075,1.0801)=1.1551\right. \\ &y_{2}=y_{1}+h f\left(x_{1}+\frac{1}{2} h, y_{1}+\frac{1}{2} h f\left(x_{1}, y_{1}\right)\right)=1.0525+0.05 \cdot 1.1551=1.1103 \\ &\therefore y(0.1)=1.1103 \end{aligned}


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!

Leave a comment