Skip to main content

Lean Calculus

Section 5.4 A Full Example

Let’s do a rather full example. So, let’s avoid simple intervals starting at \(0\) and functions that have easy geometric formulas for the areas. A good starting example that isn’t too crazy is \(f(x)=x^2-1\) on \([-1,2]\text{.}\) For reference, here’s the graph.
Let’s compute the \(n\)th Riemann sum.
\begin{equation*} \begin{array}{lll} R_n \amp = \amp \frac{b-a}{n}\left[ f\left(a+\frac{b-a}{n}\right)+f\left(a+2\frac{b-a}{n}\right)+\dots+f\left(a+n\frac{b-a}{n}\right) \right] \\ \amp = \amp \frac{2-(-1)}{n}\left[ f\left(-1+\frac{2-(-1)}{n}\right)+f\left(-1+2\frac{2-(-1)}{n}\right)+\dots+f\left(-1+n\frac{2-(-1)}{n}\right) \right] \\ \amp = \amp \frac{3}{n}\left[ f\left(-1+\frac{3}{n}\right)+f\left(-1+2\frac{3}{n}\right)+\dots+f\left(-1+n\frac{3}{n}\right) \right] \\ \amp = \amp \frac{3}{n}\left[ \left(\left(-1+\frac{3}{n}\right)^2-1\right)+\left(\left(-1+2\frac{3}{n}\right)^2-1\right)+\dots+\left(\left(-1+n\frac{3}{n}\right)^2-1\right) \right] \\ \amp = \amp \frac{3}{n}\left[ \left((-1)^2-2\frac{3}{n}+(\frac{3}{n})^2-1\right)+\left((-1)^2-2(2\frac{3}{n})+(2\frac{3}{n})^2-1\right)+\right. \\ \amp \amp \quad\quad \left. \dots+\left((-1)^2-2(n\frac{3}{n})+(n\frac{3}{n})^2-1\right) \right]\\ \amp = \amp \frac{3}{n}\left[ \left(1-2\frac{3}{n}+1^2(\frac{3}{n})^2-1\right)+\left(1-2(2\frac{3}{n})+2^2(\frac{3}{n})^2-1\right)+\right. \\ \amp \amp \quad\quad \left. \dots+\left(1-n(2\frac{3}{n})+n^2(\frac{3}{n})^2-1\right) \right]\\ \amp = \amp \frac{3}{n}\left[ \left(-2\frac{3}{n}+1^2(\frac{3}{n})^2\right)+\left(2(-2\frac{3}{n})+2^2(\frac{3}{n})^2\right)+\dots+\left(n(-2\frac{3}{n})+n^2(\frac{3}{n})^2\right) \right]\\ \amp = \amp \frac{3}{n}\left[ -(2\frac{3}{n})(1+2+\dots +n) +(\frac{3}{n})^2(1^2+2^2+\dots +n^2) \right]\\ \amp = \amp \frac{3}{n}\left[ -(2\frac{3}{n})(\frac{n(n+1)}{2}) +(\frac{3}{n})^2(\frac{n(n+1)(2n+1)}{6}) \right]\\ \amp = \amp \frac{3}{n}\left[ \frac{-3}{n}n(n+1) +\frac{9}{n^2}\frac{n(n+1)(2n+1)}{6} \right]\\ \amp = \amp -9\left[\frac{n(n+1)}{n^2}\right] +\frac{9}{2}\left[\frac{n(n+1)(2n+1)}{n^3}\right]\\ \amp = \amp -9\left[\frac{n+1}{n}\right] +\frac{9}{2}\left[\frac{(n+1)(2n+1)}{n^2}\right]\\ \amp = \amp -9\left[\frac{n+1}{n}\right] +\frac{9}{2}\left[\frac{n+1}{n}\right]\left[\frac{2n+1}{n}\right]\\ \amp = \amp -9\left[1+\frac{1}{n}\right] +\frac{9}{2}\left[1+\frac{1}{n}\right]\left[2+\frac{1}{n}\right] \end{array} \end{equation*}
Now, \(\frac{1}{n} \to 0\) as \(n \to \infty\text{.}\) So we have ...
\begin{equation*} \int_{-1}^2 (x^2+1)dx = \displaystyle \lim_{n \to \infty} R_n = -9[1]+\frac{9}{2}[1][2] = -9+9 = 0 \end{equation*}
It is, perhaps, terrifying to think about the computations involved in computing integrals for more interesting functions. After all, the computations above for just the relatively simple function \(x^2-1\) are already pretty extensive. Well, the good news is that the linearity properties we discussed for integrals when the function’s graph produces familiar geometric figures *still* work for the more general continuous functions for which we use the limit of Riemann sums for computation.