be partition of \([a,b]\) into \(n\) subintervals of equal length \(\Delta x=\frac{b-a}{n}\text{.}\)
Right/left Riemann sums.
Let \(R_n\) be either the right or left Riemann sum for this partition. If \(f'\) is continuous and \(\vert f'(x)\vert \leq M\) for all \(x\) in \([a,b]\text{,}\) then
Let \(M_n\) be the midpoint Riemann sum for this partition. If \(f''\) is continuous and \(\vert f''(x)\vert \leq M\) for all \(x\) in \([a,b]\text{,}\) then
Let \(T_n\) be the \(n\)-th trapezoidal estimate of \(\int_a^b f(x)\, dx\text{.}\) If \(f''\) is continuous and \(\vert f''(x)\vert\leq M\) for all \(x\) in \([a,b]\text{,}\) then
Suppose \(n\) is even, and let \(S_n\) be the \(n\)-th Simpson’s rule estimate of \(\int_a^bf(x)\, dx\text{.}\) If \(f^{(4)}\) is continuous and \(\vert f^{(4)}(x)\vert\leq M\) for all \(x\) in \([a,b]\text{,}\) then
Let \(f(x)=\frac{1}{x}\text{.}\) Recall that \(\ln 4=\int_1^4 f(x)\, dx\text{.}\)
Compute bounds for the errors in (a) the \(n=10\) trapezoidal estimate of \(\ln 4\) and (b) the \(n=10\) Simpson’s rule estimate of \(\ln 4\text{.}\)
Solution.
Throughout, let \(I=\int_1^4\frac{1}{x}\, dx\text{,}\) let \(T_n\) be the \(n\)-th trapezoidal estimate of \(I\text{,}\) and let \(S_n\) be the \(n\)-th Simpson’s rule estimate of \(I\text{.}\)
To bound the error estimate \(\abs{T_{10}-I}\) we first must find an upper bound of \(\abs{f''(x)}=\abs{\frac{2}{x^3}}\) on \([1,4]\text{.}\) Since \(\abs{\frac{2}{x^3}}=\frac{2}{x^3}\) is decreasing and positive on \([1,4]\text{,}\) it attains its largest value at \(x=1\text{,}\) the left endpoint of the interval. We conclude that
\begin{equation*}
\abs{f''(x)}\leq 2 \text{ for all } x\in [1,4]
\end{equation*}
and thus we may take \(M=2\) in the error bound formula (1.23.3). Thus
We conclude that \(T_{10}\) is at most\(0.045\) off of the true value of \(I\text{.}\) Using the computational cell in Interactive example 1.22.1 you can see that in fact we have \(\abs{T_{10}-I}\approx .0069\text{.}\) We are of course not bothered by the fact that the true error is significantly less than the error bound provided by Theorem 1.23.1. The theorem says simply the error can be no worse than \(0.045\text{.}\)
To bound the error \(\abs{S_{10}-I}\) we must first find a bound of \(\abs{f^{(4)}(x)=\frac{24}{x^5}}\) on \([1,4]\text{.}\) The logic is similar to the above: on \([1,4]\) we have \(\abs{f^{(4)}(x)}=\frac{24}{x^5}\text{,}\) which is a positive decreasing function. Thus
\begin{equation*}
\abs{f^{(4)}(x)}\leq \abs{f^{(4)}(1)}=24 \text{ for all } x\in [1,4]
\end{equation*}
and we may take \(M=24\) in the error bound (1.23.4). We now have
Again, using Interactive example 1.22.1, we can see that the actual error in our estimate is \(\abs{S_{10}-I}\leq 0.0003\text{:}\) significantly smaller than the error bound provided by Theorem 1.23.1.
Recall that \(\pi=\int_0^1 f(x)\, dx\text{.}\) Compute bounds for the errors in estimating \(\pi\) using (a) the \(n=10\) trapezoidal rule, and (b) the \(n=10\) Simpson’s rule.
Find (a) an \(n\) such that the \(n\)-th trapezoidal estimate of \(\pi\) is within \(10^{-9}\) of the actual value, and (b) an \(n\) such that the \(n\)-th Simpson’s rule estimate of \(\pi\) is within \(10^{-9}\) of the actual value.
Solution.
Throughout, let \(I=\int_0^1 f(x)\, dx\text{,}\) let \(T_n\) be the \(n\)-th trapezoidal estimate of \(I\text{,}\) and let \(S_n\) be the \(n\)-th Simpson’s rule estimate of \(I\text{.}\)
For the error bound for \(T_{10}\) we first compute
Note: the inequality \(\abs{3x^2-1}\leq 2\) was derived simply by graphing the quadratic function \(y=3x^2-1\) on \([0,1]\text{.}\) Taking \(M=16\) in (1.23.3), we compute