How large should we take $n$ in order to guarantee that the Trapezoidal and Midpoint Rule approximations for $\int_1^2(1 / x) d x$ are accurate to within 0.0001 ?
We saw in the preceding calculation that $\left|f^{\prime \prime}(x)\right| \leqslant 2$ for $1 \leqslant x \leqslant 2$, so we can take $K=2$, $a=1$, and $b=2$ in 3 . Accuracy to within 0.0001 means that the size of the error should be less than 0.0001 . Therefore we choose $n$ so that
$$
\frac{2(1)^3}{12 n^2}<0.0001
$$
Solving the inequality for $n$, we get
or
$$
\begin{aligned}
& n^2>\frac{2}{12(0.0001)} \\
& n>\frac{1}{\sqrt{0.0006}} \approx 40.8
\end{aligned}
$$
Thus $n=41$ will ensure the desired accuracy.