Estimate the error that results from using the Trapezoidal Rule with \(n=4\) and with \(n=6\) to approximate \( \int_{1}^{2}\dfrac{e^{x}}{x}dx\). See Example 2.
A CAS can be used to find \(f{^\prime{^\prime}} (x)\).
Since \(\vert f^{\prime \prime}\vert\) is continuous on the interval \([1,2] ,\) the Extreme Value Theorem guarantees that \( \vert f^{\prime \prime}\vert\) has an absolute maximum on \([1,2]\). We find the absolute maximum of \(\vert f^{\prime \prime}\vert\) using graphing technology. As seen from Figure 17, the absolute maximum is at the left endpoint \(1.\) The absolute maximum value of \(f^{\prime \prime}\) is \(\left\vert e^{1}\left( \dfrac{1}{1}-\dfrac{ 2}{1^{2}}+\dfrac{2}{1^{3}}\right) \right\vert =e.\) So, \(M=e\).
When \(n=4,\) the error in using the Trapezoidal Rule is \[ \hbox{Error} \leq \dfrac{( b-a) ^{3}M}{12n^{2}}=\dfrac{(2-1)^{3}(e) }{(12)(4^{2})}=\dfrac{e}{192}\approx 0.014 \]
That is, \[ \begin{eqnarray*} 3.069-0.014 & \leq &\int_{1}^{2}\dfrac{e^{x}}{x}dx \leq 3.069+0.014 \\[5pt] 3.055 & \leq &\int_{1}^{2}\dfrac{e^{x}}{x}dx \leq 3.083 \end{eqnarray*} \]
513
When \(n=6,\) the error in using the Trapezoidal Rule is \[ \hbox{Error} \leq \dfrac{\left( b-a\right) ^{3}M}{12n^{2}}=\dfrac{(2-1)^{3}(e) }{(12)(6^{2})}=\dfrac{e}{432}\approx 0.006 \]
That is, \[ \begin{eqnarray*} 3.063-0.006 & \leq &\int_{1}^{2}\dfrac{e^{x}}{x}dx \leq 3.063+0.006 \nonumber \\[5pt] 3.057 & \leq &\int_{1}^{2}\dfrac{e^{x}}{x}dx \leq 3.069 \end{eqnarray*} \]