Find an approximation to ∫e^-x^2 dx in the interval (0-1/2) using Simpson’s Rule. Estimate the accuracy of your approximation
Simpsons Rule \[\int\limits_a^b f(x)\text dx\approx\frac{b-a}{6}\left[f(a)+4f\left(\frac{a+b}2\right)+f(b) \right]\] Using Simpsons rule \[\int\limits_0^{1/2} e^{-x^2} \text dx \approx\frac{1/2-0}{6}\left[f(0)+4f\left(\frac{0+1/2}2\right)+f(1/2)\right]\]\[=\frac 1{12}\left[e^{-0^2}+4e^{-1/4^2}+e^{-1/2^2} \right]\]\[=\frac 1{12}\left[1+4e^{-1/16}+e^{-1/4}\right]\]\[=\frac 1{12}+\frac{e^{-1/16}}3+\frac {e^{-1/4}}{12}\]\[\approx 0.461\]
Isn't the Simpson's rule: \[\int\limits_{b}^{a}f(x) \simeq \frac{n}{3} \left(f_{0}+4f_{1}+f_{2}\right) \]?
that depends on what \(n\) is, and where \(f_0, f_1, f_2\) are
Simpsons rule evaluates \[\int\limits_0^{1/2}e^{-x^2}\approx\frac 1{12}+\frac{e^{-1/16}}3+\frac {e^{-1/4}}{12}\approx0.461371\]The true value is \[\int\limits_0^{1/2}e^{-x^2}=\frac{\sqrt\pi}{2}\text{erf}(x)\approx0.461281\] The relative percentage error is \[=\frac{0.46137-0.461281}{0.461281}\approx 0.02\% \text{error}\]
@ unkle 10nk y soo much ue a life saver...
Join our real-time social learning platform and learn together with your friends!