Question #301670

If dy/dx = y − x, y(0) = 1 2 . Use Modified Euler’s method with h = 0.1 to obtain an approximation to y(0.2).


1
Expert's answer
2022-02-24T05:55:42-0500

Solution:

Given y=yx,y(0)=0.5,h=0.1,y(0.2)=?y^{\prime}=y-x, y(0)=0.5, h=0.1, y(0.2)=?

Here, x0=0,y0=0.5,h=0.1,xn=0.2x_{0}=0, y_{0}=0.5, h=0.1, x_{n}=0.2

y=yxf(x,y)=yx\begin{aligned} &y^{\prime}=y-x \\ &\therefore f(x, y)=y-x \end{aligned}

Modified Euler method

ym+1=ym+hf(xm+12h,ym+12hf(xm,ym))x0+12h=0+0.12=0.05y0+12hf(x0,y0)=0.5+0.120.5=0.525f(x0+12h,y0+12hf(x0,y0)=f(0.05,0.525)=0.475y_{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) \\x_{0}+\frac{1}{2} h=0+\frac{0.1}{2}=0.05 \\y_{0}+\frac{1}{2} h f\left(x_{0}, y_{0}\right)=0.5+\frac{0.1}{2} \cdot 0.5=0.525 \\f\left(x_{0}+\frac{1}{2} h, y_{0}+\frac{1}{2} h f\left(x_{0}, y_{0}\right)=f(0.05,0.525)=0.475\right.

y1=y0+hf(x0+12h,y0+12hf(x0,y0))=0.5+0.10.475=0.5475y(0.1)=0.5475\begin{aligned} &y_{1}=y_{0}+h f\left(x_{0}+\frac{1}{2} h, y_{0}+\frac{1}{2} h f\left(x_{0}, y_{0}\right)\right)=0.5+0.1 \cdot 0.475=0.5475 \\ &\therefore y(0.1)=0.5475 \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.1,0.5475)=0.4475x1+12h=0.1+0.12=0.15y1+12hf(x1,y1)=0.5475+0.120.4475=0.5699f(x1+12h,y1+12hf(x1,y1)=f(0.15,0.5699)=0.4199y2=y1+hf(x1+12h,y1+12hf(x1,y1))=0.5475+0.10.4199=0.5895y(0.2)=0.5895\begin{aligned} &f\left(x_{1}, y_{1}\right)=f(0.1,0.5475)=0.4475 \\ &x_{1}+\frac{1}{2} h=0.1+\frac{0.1}{2}=0.15 \\ &y_{1}+\frac{1}{2} h f\left(x_{1}, y_{1}\right)=0.5475+\frac{0.1}{2} \cdot 0.4475=0.5699 \\ &f\left(x_{1}+\frac{1}{2} h, y_{1}+\frac{1}{2} h f\left(x_{1}, y_{1}\right)=f(0.15,0.5699)=0.4199\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)=0.5475+0.1 \cdot 0.4199=0.5895 \\ &\therefore y(0.2)=0.5895 \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!
LATEST TUTORIALS
APPROVED BY CLIENTS