Section Riemann Sums and Definite Integrals
You know how to compute the areas of certain shapes (rectangles, triangles, etc.) using formulas, but what about unusual shapes like the area trapped under a curve and above the x-axis or the area trapped between two curves? If we have a function that is always above the \(x\)-axis on the interval \([a,b]\text{,}\) then Riemann sums give us a way to compute the area that is between the vertical lines \(x=a\) and \(x=b\text{,}\) above the \(x\)-axis, and under the curve.
Example 4.1.
Determine the area under the curve \(f(x) = x^2+1,\) above the x-axis, and between the vertical lines \(x=0\) and \(x=2.\)
Graph \(f\) and subdivide \([0,2]\) into 4 intervals each of width \(\frac{1}{2}\) and with bases,
Each has width \(\frac{1}{2}.\) These intervals are the bases of 4 rectangles. Make the height of each rectangle the value of \(f\) at the right end point of the base of that rectangle. Let's call the sum of the areas of these four rectangles \(U_4.\) (If you are unfamiliar with summation notation, \(\sum\text{,}\) see the appendix Summation Formulas for a review.)
The sum of these rectangles is given by:
This estimate is too large because each rectangle we chose had area larger than the portion of the curve it approximated. Therefore, we make an estimate that is too small and average the two! An estimate that would be too small would have four rectangles each with the same bases, but with height the value of \(f\) at the left endpoint of its base. Let's call the sum of the areas of these four rectangles \(L_4.\)
What you have just computed are referred to as upper and lower Riemann sums, respectively. Our estimate based on averaging the two would yield
Problem 4.2.
Let \(f(x) = x^2 + 1.\) Divide the interval \([0,2]\) into eight equal divisions,
and compute the upper and lower Riemann sums of \(f.\)
Subdividing an interval in this way is called partitioning the interval and the sub-intervals created via a partition may be of differing widths as indicated in the next definition.
Definition 4.3.
A partition of the interval [a,b] is a collection of points, \(\{ x_0, x_1, \dots, x_n \}\) satisfying, \(a = x_0 \lt x_1 \lt x_2 \lt \dots \lt x_{n-1} \lt x_n = b.\)
Definition 4.4.
If \(f\) is a function defined on the interval \([a,b]\) and \(P=\{x_0, x_1, \dots, x_n \}\) is a partition of \([a,b],\) then a Riemann sum of f over [a,b] is defined by
where \(\hat{x_i} \in [x_{i-1},x_i].\)
In the definition of Riemann sum, \(\hat{x}_i\) can be any value in the interval \([x_{i-1}, x_i].\) But look back at our example. When we computed \(U_4\) we always chose \(\hat{x}_i\) so that \(f(\hat{x}_i)\) was the maximum for \(f\) on this interval to assure that our approximation was more than the desired area. When \(\hat{x}\) is chosen in this manner, we call our sum an upper Riemann sum. When we computed \(L_4\) we always chose \(\hat{x}_i \in [x_{i-1}, x_i]\) so that \(f(\hat{x}_i)\) was the minimum for \(f\) on that interval to assure that our approximation was less than the desired area. When \(\hat{x}\) is chosen in this manner, we call our sum a lower Riemann sum.
Problem 4.5.
Compute upper and lower Riemann sums for \(g(x) = x^2 + 3x\) on \([0,1]\) using the partition, \(P = \{0,\frac{1}{3}, \frac{2}{3}, 1\}.\)
Problem 4.6.
Compute upper and lower Riemann sums for \(g(x) = -3x^3 + 3x\) over \([0,1]\) using the partition, \(P = \{0,\frac{1}{4}, \frac{1}{2}, \frac{3}{4}, 1 \}.\) The heights of our rectangles do not always occur at the endpoints of the sub-intervals of our partition.
Returning to \(f(x) = x^2+1\) on \([0,2]\text{,}\) continue to subdivide our interval into \(n\) subdivisions of equal length, letting \(n = 10, n=100, n=1000, \dots\) and labeling our partitions as \(P_{10}, P_{100}, P_{1,000}, \dots.\) If we label our lower sums corresponding to these partitions as \(L_{10}, L_{100}, L_{1,000}, \dots\) and label our upper sums as \(U_{10}, U_{100}, U_{1,000}, \dots\text{,}\) then we would have
Furthermore, \(L_{1,000}\) and \(U_{1,000}\) should be very close together and very close the area we desire to compute.
By increasing the number of rectangles and taking the limit as the number of rectangles tends to infinity, we will determine the exact area. Our notation for this area is:
For our function, these two limits are equal, but there are functions where these limits are not equal. When they are equal, we say \(f\) is integrable over the interval. If they are not equal, we say that \(f\) is not integrable. We refer to \(\int_0^2 x^2+1 \ dx\) as “the definite integral from 0 to 2 of \(x^2+1\text{.}\)”
Problem 4.7.
Give an example of a function and an interval where the function will not be integrable over that interval.
We now the consider the upper Riemann sum for \(f(x) = x^2 + 1,\) above the x-axis, and between the vertical lines \(x=0\) and \(x=2\) assuming \(n\) equal divisions of the interval \([0,2].\) Our partition of \(n\) divisions is now,
and our upper Riemann sum \(U_n\) that approximates the area is given by:
Now take the limit of the Riemann sums as the number of divisions tends to infinity to get the exact area under the curve.
Look back at your answers from Problem 4.2 (\(U_8\) and \(L_8\)) and the solutions from our Example (\(U_4\) and \(L_4\)). Just as we expect,
We denote the number \(4 \frac{2}{3}\) by \(\dsp \int_0^2 x^2 + 1 \; dx\) and call this the definite integral of \(x^2 + 1\) from \(x=0\) to \(x=2.\) What we have just done motivates the following definition of the definite integral.
Definition 4.8.
If \(f\) is a function defined on \([a,b]\) so that \(lim_{n \rightarrow \infty} L_n\) and \(lim_{n \rightarrow \infty} U_n\) both exist and are equal, then we say \(f\) is integrable on [a,b] and we define the definite integral by \(\int_a^b f(x) \; dx = \lim_{n \rightarrow \infty} L_n.\) We refer to \(a\) as the lower limit of integration and \(b\) as the upper limit of integration.
For each of the next few problems, you will require some of the summation formulas from the appendix Summation Formulas .
Problem 4.9.
Repeat this procedure, but compute the area using lower Riemann sums. That is, compute and simplify \(L_n\) (the lower Riemann sum of \(f(x) = x^2+1\) on the interval \([0,2]\) assuming \(n\) equal divisions) and then compute \(lim_{n \rightarrow \infty} L_n.\)
Problem 4.10.
Compute each integral using Definition 4.8 (Riemann sums).
\(\dsp \int_0^1 2x \; dx\)
\(\dsp \int_0^1 x^3 \; dx\)
\(\dsp \int_0^2 2x^2 - 3 \; dx\)
Problem 4.11.
Compute the area trapped between the curves \(y=x\) and \(y=x^2\) using Definition 4.8.
Which functions are integrable? That is a question better-suited for a course called Advanced Calculus or Real Analysis, but let's give the quick-and-dirty answer without proof. By Definition 4.8 a function is integrable if a certain limit exists, but this can be difficult to compute. It can be shown that every differentiable function is continuous and every continuous function is integrable. Thus,
The next two theorems state this formally.
Theorem 4.12.
A Differentiability Theorem. If \(f\) is differentiable on \([a,b],\) then \(f\) is continuous on \([a,b].\)
Theorem 4.13.
An Integrability Theorem. If \(f\) is continuous on \([a,b],\) then \(f\) is integrable on \([a,b].\)
We defined integrals in terms of Riemann sums and Riemann sums in terms of partitions of the interval. Therefore the integral \(\int_a^b f(x) \ dx\) (see Definition 4.8) is only defined when \(a \lt b.\) The following definitions define definite integrals where the lower limit of integration is larger than the upper limit of integration or the two endpoints of integration are equal.
Definition 4.14.
If \(a\) and \(b\) are numbers with \(a\lt b\) and \(f\) is integrable on \([a,b]\) then:
\(\dsp \int_b^a f(x) \; dx = - \int_a^b f(x) \; dx\) and
\(\dsp \int_a^a f(x) \; dx = 0.\)
The next theorem we discuss can be proved via Riemann sums, but we will leave that for your first course in Real Analysis as well. That's where the real fun begins.
Theorem 4.15.
Sum Rule for Definite Integrals. If \(c \in [a,b]\text{,}\) then \(\dsp \int_a^b f(x) \; dx = \int_a^c f(x) \; dx + \int_c^b f(x) \; dx\text{.}\)
Problem 4.16.
Compute each of the following integrals using Definition 4.8 (Riemann Sums). This illustrates Theorem 4.15, the Sum Rule for definite integrals.
\(\dsp \int_0^1 x^2 \; dx\)
\(\dsp \int_1^2 x^2 \; dx\)
\(\dsp \int_0^2 x^2 \; dx\)