2. Week 1: Riemann Sums and Summation Notation
≪ 1. Week 0: Mild Review | Table of ContentsOur goal for today is to gain familiarity with the idea of a Riemann sum (if it’s unfamiliar) and with the sometimes daunting summation notation it’s written with.
Let’s begin by describing the syntax and grammar of summation notation by way of an example.
Example 1.
Let \(f(x) = x^2 + x\). Approximate the area underneath the graph of \(f\) over the interval \(\left[ 0, 2 \right]\) using \(4\) left-handed rectangles.
You should draw a picture of the following process:
- First, the widths of the four rectangles must cover \([0, 2]\) so we’ll make them all \(\frac{1}{2}\) a unit wide.
- Next, we should determine how tall each rectangle is. Since we are using left-handed rectangles, the top-left corner of each rectangle should meet the graph of \(f\). In order from left to right, the heights of the rectangles should be \(f(0)\), \(f\left( \frac{1}{2} \right)\), \(f(1)\), and \(f\left( \frac{3}{2} \right)\).
- We compute the area of each rectangle and add them up: \[ \textrm{Area} \approx \frac{1}{2}f(0) + \frac{1}{2} f\left( \frac{1}{2} \right) + \frac{1}{2} f \left( 1 \right) + \frac{1}{2} f \left( \frac{3}{2} \right) = \frac{13}{4}. \]
Gah, painful.
Now suppose some horrible person comes along and demands
Example 2.
Let \(f(x) = x^2 + x\). Approximate the area underneath the graph of \(f\) over the interval \(\left[ 0, 2 \right]\) using \(200\) left-handed rectangles.
We can still follow the same process, and I can describe quite precisely in English exactly how to do the approximation. Again, you should draw a picture of the process:
- First, the widths of the \(200\) rectangles should cover \([0, 2]\), so each rectangle should be \(0.01\) units wide.
- The first rectangle should be \(f(0) = 0\) units tall. The second rectangle should be \(f(0.01)\) units tall, since its left edge lies at \(x = 0.01\). The third rectangle should be \(f(0.02)\) units tall. In general, the \(n\)-th rectangle should be \(f(0.01(n - 1))\) units tall, where \(1 \leq n \leq 200\)! This last sentence alone describes the heights of every rectangle.
- The area of the \(n\)-th rectangle is \(0.01 \times f(0.01(n-1))\). Sum up all of these values for \(n = 1, 2, \ldots, 200\).
We have mathematical notation for this very last step: one would write
\[ \textrm{Area} \approx \sum _{n=1}^{200} 0.01 \times f(0.01(n-1)) = 4.6967. \]The giant \(\sum\) is a captial greek letter sigma, and it represents a “sum”. There are three critical components to this notation:
- The “summand”, which comes to the right of \(\sum\). We are adding together \(200\) expressions of the form \(0.01 \times f(0.01(n-1))\); in this case, it represents the area of the \(n\)-th rectangle.
- The \(n\) above changes depending on which rectangle’s area we are computing. The “starting point” lies directly below \(\sum\): \(n = 1\) signifies we “start adding” by plugging in \(n = 1\).
- We then plug in \(n = 2\), then \(n = 3\), etc., adding everything up until we reach the last rectangle at \(n = 200\). This “ending point” of \(200\) goes diretly above \(\sum\).
Some things to point out: first, the “starting” and “ending” points are *inclusive". Second, the letter \(n\) is not special, and you can use any letter in the sum, e.g.
\[ \sum _{k=1}^{200} 0.01 f(0.01(k-1)). \]I would recommend doing a quick check by plugging in the “endpoints” of the summation:
\[ \sum _{n=1}^{200} 0.01 \times f(0.01(n-1)) = 0.01 f(0) + \cdots + 0.01 f(1.99). \]This checks out: our very first rectangle is indeed \(0.01\times f(0)\), and the very last rectangle is \(0.01\times f(1.99)\).
Exercise 3.
Let \(f(x) = x^2 + x\).
- Approximate the area under the graph of \(f\) over the interval \(\left[ 3, 6 \right]\) using \(100\) left-handed and \(100\) right-handed retangles. (You may leave your answer in summation notation.)
- Are the two estimates over-estimates or under-estimates of the true area in question?
- Which estimate is closer to the true area?
- Approximate the area under the graph of \(f\) over the interval \([3, 6]\), this time using \(N\) left-handed rectangles, where \(N\) can be any positive integer. (You may leave your answer in summation notation.)
Solutions
-
In both cases, the rectangles will all be \(\frac{3}{100}\) units wide. For the left-handed sum, the first rectangle will have height \(f(3)\), the second will have height \(f\left( 3+\frac{3}{100} \right)\), the third will have height \(f \left( 3 + \frac{3}{100}\times 2 \right)\), and in general the \(n\)-th rectangle will have height \(f \left( 3 + \frac{3}{100}\times (n-1) \right)\). So, the sum of all the areas will be
\[ \sum _{n=1}^{100} \frac{3}{100}\times f \left( 3 + \frac{3}{100} \times (n-1) \right). \]For the right-handed sum, the first rectangle will have height \(f\left( 3 + \frac{3}{100} \right)\), the second will have height \(f\left( 3+\frac{3}{100}\times 2 \right)\), the third will have height \(f \left( 3 + \frac{3}{100}\times 3 \right)\), and in general the \(n\)-th rectangle will have height \(f \left( 3 + \frac{3}{100}\times n \right)\). So, the sum of all the rectangles’ areas will be
\[ \sum _{n=1}^{100} \frac{3}{100}\times f \left( 3 + \frac{3}{100}\times n \right). \] -
If you draw a picture, the rectangles in the left-handed sum always lie within the region whose area we’re approximating, hence the left-handed sum is an underestimate. Likewise, the rectangles in the right-handed sum always protrude over the graph of \(f\), hence the right-handed sum is an overestimate.
-
Draw the second rectangle from both sums in part 1 over a graph of \(f\), and notice how the graph of \(f\) connects the top-left corner of the left-handed rectangle to the top-right corner of the right-handed rectangle. But since the graph of \(f\) is curling upwards (it is convex), there is slightly more area between the graph of \(f\) and the right-handed rectangle than there is area between the graph of \(f\) and the left-handed rectangle. Draw the picture!!
-
This time, the width of each rectangle should be \(\frac{3}{N}\). The height of the first rectangle is then \(f(3)\); the height of the second is \(f \left( 3 + \frac{3}{N} \right)\), the height of the third is \(f \left( 3 + \frac{3}{N}\cdot 2 \right)\), and so on and so forth. In general, the height of the \(n\)-th rectangle is \(f \left( 3 + \frac{3}{N}\cdot (n-1) \right)\). Putting it all together, the area is approximately
\[ \sum _{n=1}^{N} \frac{3}{N} f \left( 3 + \frac{3}{N} \cdot (n-1) \right). \]
Problem 4.
Xavier was struck by divine inspiration on his calculus homework and wrote down the following Riemann sum:
\[ \sum _{j=0}^{N - 1}\frac{3}{N} \left( 3 \left( 1 + \frac{3j}{N} \right) + 6 \right). \]However Xavier was then struck by a bolt of lightning and forgot what problem he was working on.
- What area does this expression approximate, and is it a left-handed or right-handed sum?
- Determine \[ \lim _{N\to\infty} \sum _{j=0}^{N - 1}\frac{3}{N} \left( 3 \left( 1 + \frac{3j}{N} \right) + 6 \right). \]
Solution
Let’s write out a few terms to get a better idea of what’s going on. We have
\[ \begin{align*} \sum _{j=0}^{N-1} \frac{3}{N} \left( 3 \left( 1 + \frac{3j}{N} \right) + 6 \right) &=\frac{3}{N} \times \left( 3(1 + 0) + 6 \right) + \frac{3}{N} \times \left( 3 \left( 1 + \frac{3}{N} \right) + 6 \right) \\ & \quad + \frac{3}{N} \times \left( 3 \left( 1 + \frac{3}{N}\cdot 2 \right) + 6 \right) + \cdots \end{align*} \]We should interpret each of these terms as “height times width” or “width times height”; we are after all summing a bunch of areas of rectangles. Since the widths of all the rectangles should be the same, these are all \(\frac{3}{N}\) units wide.
The remaining terms are the heights, and notice that the heights look like
\[ 3 \left( 1 + j \times \textrm{width} \right) + 6. \]On the other hand, the heights should be of the form
\[ f \left( \textrm{left or right edge of rectangle} \right). \]We can therefore guess that \(1 + \frac{3j}{N}\) describes the position of the left edge of each rectangle (note it’s the left edge since it starts at exactly \(1\)), and that \(f(x) = 3x + 6\).
Thus, this uses \(N\) rectangles to approximate the area beneath the line \(f(x) = 3x + 6\) over the interval \([1, 4]\). This is just a trapezoid whose area is \(\frac{81}{2} = 40.5\) units, and this will be the limit in the second part of the problem.