Americas
Europe
Q 3.6-8E
Expert-verifiedUse the improved Euler’s method subroutine with step size h = 0.2 to approximate the solution to the initial value problem ${\mathbf{y}}{\mathbf{\text{'}}}{\mathbf{=}}\frac{\mathbf{1}}{\mathbf{x}}{\mathbf{(}}{{\mathbf{y}}}^{{\mathbf{2}}}\mathbf{+}\mathbf{y}\mathbf{)}\mathbf{,}\mathbf{y}\mathbf{(}\mathbf{1}\mathbf{)}\mathbf{=}\mathbf{1}$ at the points x = 1.2, 1.4, 1.6, and 1.8. (Thus, input N = 4.) Compare these approximations with those obtained using Euler’s method (see Exercises 1.4, Problem 6, page 28).
x_{n} | y_{n} |
1.2 | 1.48 |
1.4 | 2.24788 |
1.6 | 3.6518 |
1.8 | 6.88733 |
Here, $\mathrm{y}\text{'}=\frac{1}{\mathrm{x}}({\mathrm{y}}^{2}+\mathrm{y}),\mathrm{y}(1)=0$ for $1\u2a7dx\u2a7d1.8$
For h=0.2, x=1, y=1, N=4
$\mathrm{F}=\mathrm{f}(\mathrm{x},\mathrm{y})=\frac{1}{\mathrm{x}}({\mathrm{y}}^{2}+\mathrm{y})\phantom{\rule{0ex}{0ex}}\mathrm{G}=\mathrm{f}(\mathrm{x}+\mathrm{h},\mathrm{y}+\mathrm{hF})\phantom{\rule{0ex}{0ex}}=\frac{1}{\mathrm{x}+0.2}\left({\left(\mathrm{y}+\frac{0.2}{\mathrm{x}}({\mathrm{y}}^{2}+\mathrm{y})\right)}^{2}+\mathrm{y}+\frac{0.2}{\mathrm{x}}({\mathrm{y}}^{2}+\mathrm{y})\right)\phantom{\rule{0ex}{0ex}}$
Apply initial points ${\mathrm{x}}_{\mathrm{o}}=1,{\mathrm{y}}_{\mathrm{o}}=1,\mathrm{h}=0.2$
$\mathrm{F}(1,1)=2\phantom{\rule{0ex}{0ex}}\mathrm{G}(1,1)=2.8\phantom{\rule{0ex}{0ex}}$
${\mathrm{x}}_{1}=1+0.2\phantom{\rule{0ex}{0ex}}=1.2\phantom{\rule{0ex}{0ex}}{\mathrm{y}}_{1}=1+\frac{0.2}{2}(2+2.8)\phantom{\rule{0ex}{0ex}}=1.48\phantom{\rule{0ex}{0ex}}$
$\mathrm{F}(1.2,1.48)=3.05867\phantom{\rule{0ex}{0ex}}\mathrm{G}(1.2,1.48)=4.61934\phantom{\rule{0ex}{0ex}}$
${\mathrm{x}}_{2}=1.2+0.2\phantom{\rule{0ex}{0ex}}=1.4\phantom{\rule{0ex}{0ex}}{\mathrm{y}}_{2}=1.48+0.1(3.05867+4.61934)\phantom{\rule{0ex}{0ex}}=2.24788\phantom{\rule{0ex}{0ex}}$
$\mathrm{F}(1.4,2.24788)=5.21489\phantom{\rule{0ex}{0ex}}\mathrm{G}(1.4,2.2488)=8.82538\phantom{\rule{0ex}{0ex}}$
${\mathrm{x}}_{3}=1.4+0.2\phantom{\rule{0ex}{0ex}}=1.6\phantom{\rule{0ex}{0ex}}{\mathrm{y}}_{3}=2.24788+0.1(5.21489+8.82538)\phantom{\rule{0ex}{0ex}}=3.6518\phantom{\rule{0ex}{0ex}}$
$\mathrm{F}(1.6,3.6518)=10.6172\phantom{\rule{0ex}{0ex}}\mathrm{G}(1.6,3.6518)=21.7381\phantom{\rule{0ex}{0ex}}$
${\mathrm{x}}_{4}=1.6+0.2\phantom{\rule{0ex}{0ex}}=1.8\phantom{\rule{0ex}{0ex}}{\mathrm{y}}_{4}=3.6518+0.1(10.6172+21.7381)\phantom{\rule{0ex}{0ex}}=6.88733\phantom{\rule{0ex}{0ex}}$
Hence the solution is
x_{n} | y_{n} |
1.2 | 1.48 |
1.4 | 2.24788 |
1.6 | 3.6518 |
1.8 | 6.88733 |
94% of StudySmarter users get better grades.
Sign up for free