Obtaining a Desired Accuracy Using Simpson’s Rule

Find the number of subintervals needed to guarantee that Simpson’s Rule approximates \(\int_{\pi }^{2\pi }\frac{\sin x}{x}\, dx\) correct to within 0.0001.

Solution To be sure that the approximation of \(\int_{\pi }^{2\pi } \frac{\sin x}{x}dx\) is correct to within 0.0001, we require the error be less than \(0.0001.\) That is, \[ \begin{eqnarray*} \hbox{Error} & \leq &\dfrac{(b-a)^{5}M}{180n^{4}}=\dfrac{(2\pi -\pi )^{5}M}{180n^{4}} &&\underset{\underset{\color{#0066A7}{M=0.176}}{\color{#0066A7}{{\uparrow }}}}{=} \dfrac{( \pi ^{5}) (0.176) }{180n^{4}} \lt 0.0001 \\[-8pt] n^{4} &>&\dfrac{0.176\pi ^{5}}{(0.0001) \left( 180\right) } \\[6pt] n &>&\sqrt[4]{2992.192}\approx 7.396 \end{eqnarray*} \]

Since Simpson's Rule requires \(n\) to be even, eight subintervals are needed to guarantee that Simpson's Rule approximates \(\int_{\pi }^{2\pi }\frac{\sin x }{x} dx\) correct to within 0.0001.