Given 𝑑𝑦
𝑑𝑥
= 𝑥 𝑥
2 + 𝑦
2
𝑒
−𝑥
and 𝑦(0) = 1, 𝑦(0.1) = 1.005, find
i) 𝑦 0.2 by Euler’s method
ii) 𝑦 0.3 by Modified Euler’s method
iii) 𝑦(0.4) by Milne’s predictor - corrector method.
"\\frac{dy}{dx}=x^2+y^2e^{-x}=f(x,y)\\\\"
i)
By Euler's method,
"y_{n+1}=y_n+hf(x_n,y_n)\\\\\ny_2=y_1+0.1\u00d7[x_1^2+y_1^2e^{-x_1}]\\\\\n=1.005+0.1\u00d7[0.1^2+1.005^2e^{-0.1}]\\\\\n=1.005+0.1\u00d70.9239\n=1.0973"
ii)
By Euler's method,
"y_{n+1}=y_n+hf(x_n,y_n)\\\\\ny_3=y_2+0.1\u00d7[x_2^2+y_2^2e^{-x_2}]\\\\\n=1.0973+0.1\u00d7[0.2^2+1.0973^2e^{-0.2}]\\\\\n=1.0973+0.1\u00d70.9858\n=1.1958"
iii)
By Milne’s predictor method,
"y_{n+1,p}=y_{n-3}+\\frac{4h}{3}(2f_{n-2}-f_{n-1}+2f_n)\\\\\ny_{4,p}=y_{0}+\\frac{4\u00d70.1}{3}(2f_{1}-f_{2}+2f_3)\\\\\n=1+\\frac{0.4}{3}(2\u00d71.005-1.0973+2\u00d71.1958)\\\\\n=1+0.4405\\\\\n=1.4405"
By Milne’s corrector method,
"y_{n+1,c}=y_{n-1}+\\frac{h}{3}(f_{n+1}+f_{n-1}+4f_n)\\\\\ny_{4,p}=y_{2}+\\frac{0.1}{3}(f_{4}+f_{2}+4f_3)\\\\\n=1.0973+\\frac{0.1}{3}(1.4405+1.0973+4\u00d71.1958)\\\\\n=1.0973+2.1963\\\\\n=3.2936"
Comments
Leave a comment