Riemann Summation

1. Estimating Area of Shapes. We can consider limits of finite sums when estimating the areas of shapes in the plane. So for example, the triangle:

Note that
(1)\displaystyle  f(x) = h\left(1-\frac{x}{b}\right)
describes the triangle’s hypoteneuse.

What can we do? Well, we can pick a number of points {0=x_{0}<x_{1}<\dots<x_{n}=b}. The points are equidistant from each other, so
(2)\displaystyle  x_{j}=\frac{j(b-0)}{n}.
Then we form a number of rectangles:

We have shaded the area of the rectangles. Note there is some defecit area. What is the area of one of these rectangles? It is
(3)\displaystyle  A_{k} = f(x_{k})\Delta x_{k}
where
(4)\displaystyle  \Delta x_{k}=x_{k}-x_{k-1}.
Pop Quiz: is \Delta x_{k}\in\mathcal{O}(n^{-1})? \mathcal{O}(n^{-2})? \mathcal{O}(\mathrm{e}^{-n})? \mathcal{O}(\ln n)?

The reader may verify these {A_{k}} describe the rectangle’s area. Thus
(5)\displaystyle  \begin{array}{rl} A_{k} &= \displaystyle\left[h\left(1-\frac{x_{k}}{b}\right)\right]\cdot(x_{k}-x_{k-1})\\ &=\displaystyle h\left(1-\frac{k}{n}\right)\cdot\frac{b}{n}. \end{array}
Thus we find the area {A_{tot}} of all the rectangles by
(6)\displaystyle  A_{tot}=\sum^{n}_{k=1}A_{k}=\sum^{n}_{k=1}\frac{hb}{n}\left(1-\frac{k}{n}\right)
Factoring out {hb/n}, which is constant with respect to the dummy index {k}, we get
(7)\displaystyle  \sum^{n}_{k=1}\frac{hb}{n}\left(1-\frac{k}{n}\right)=\frac{hb}{n}\sum^{n}_{k=1}\left(1-\frac{k}{n}\right)
Using the sum rule yields
(8)\displaystyle  \frac{hb}{n}\sum^{n}_{k=1}\left(1-\frac{k}{n}\right)=\frac{hb}{n}\left(\sum^{n}_{k=1}1-\sum^{n}_{k=1}\frac{k}{n}\right)
The sum {\sum^{n}_{k}1=n} transforms our problem
(9)\displaystyle  \frac{hb}{n}\left(\sum^{n}_{k=1}1-\sum^{n}_{k=1}\frac{k}{n}\right)=\frac{hb}{n}\left(n - \frac{1}{n}\sum^{n}_{k=1}k\right)
Using Gauss’ sum we find
(10)\displaystyle  \frac{hb}{n}\left(n - \frac{1}{n}\sum^{n}_{k=1}k\right)=\frac{hb}{n}\left(n - \frac{1}{n}\frac{n(n+1)}{2}\right)
Basic arithmetic yields
(11)\displaystyle  \frac{hb}{n}\left(n - \frac{1}{n}\frac{n(n+1)}{2}\right) = \frac{hb}{n}\left(n-\frac{n+1}{2}\right) = \frac{hb}{2n}(n-1).
So we get
(12)\displaystyle  A_{tot} = \frac{hb}{2n}(n-1).
What’s the error of this approximation? It’s the unshaded regions of the triangle, which is about {hb/2n}.

We can refine the approximation, taking twice as many points. So this changes {n\mapsto 2n}. The approximation gets better, but still only approximates the area. We can take the limit
(13)\displaystyle  \lim_{n\rightarrow\infty}A_{tot}=\lim_{n\rightarrow\infty}\frac{hb}{2n}(n-1)=\frac{hb}{2}.
This gives us the area of the triangle.

2. Riemann Summation. We generalize this scheme approximating the area between the curve {f(x)} and the {x} axis. We consider a closed interval {[a,b]}. We choose an arbitrary partition of the interval, i.e., a set of points {a<x_1<x_2<\dots<x_{n-1}<b}. They don’t have to be equally spaced. Notice this consists of closed subintervals! There are {n} intervals and the width of the {k}-th interval is
(14)\displaystyle  \Delta x_{k}=x_{k}-x_{k-1}
The Riemann sum approximating the area is
(15)\displaystyle  \sum^{n}_{k=1}f(c_{k})\Delta x_{k} = \mbox{Riemann Sum}
where x_{k-1}\leq c_{k}\leq x_{k}.

How do we get the area? We take the limit {n\rightarrow\infty}. This gives us the “Riemann Integral”. This is the definite integral
(16)\displaystyle  \int^{b}_{a}f(x)\,\mathrm{d}{x} = \lim_{n\rightarrow\infty}\sum^{n}_{k=1}f(x_{k})\Delta x_{k}.
Note if {F(x)} is the antiderivative of {f(x)}, then
(17)\displaystyle  \int^{b}_{a}f(x)\,\mathrm{d}{x} = F(b)-F(a)
is the definite integral from {a} to {b}.

In a sense, what happens is our limit n\to\infty makes the following transformation
(18)\displaystyle\begin{array}{rcl}  \displaystyle\sum & \to & \displaystyle\int\\  \displaystyle f(c_{k}) & \to & \displaystyle f(x)\\  \displaystyle\Delta x & \to & \displaystyle\mathrm{d}x\end{array}
The sum \sum is transformed into a “continuous sum” (i.e., integral) \int.
So we can keep the intuition of adding up a bunch of rectangles, but now the rectangles have width \mathrm{d}x (an “infinitesimally” thin rectangle!) and height f(x).

Of course, infinitesimals do not exist. But it is a useful intuitive picture to have. The idea that \Delta x\to\mathrm{d}x invokes fond memories of the derivative. We will show in future posts (viz. the Fundamental Theorem of Calculus) this is no coincidence!

Exercise 1. Consider the Riemann sum for f(x)=x^{2} on the domain [0,1]. What is its limit as the number of intervals n\to\infty? [Hint: see exercise 1 of the finite series post.]

Exercise 2. Consider the Riemann sum for f(x)=x^{3} on the domain [0,1]. What is its limit as the number of intervals n\to\infty? [Hint: see exercise 2 of the finite series post.]

Exercise 3. Consider the Riemann sum for f(x)=x^{-1} on the domain [1,3]. What is its limit as the number of intervals n\to\infty?

Advertisements

About Alex Nelson

I like math. I like programming. Most of all, I love puzzles.
This entry was posted in Definite Integral, Integral, Riemann Integral. Bookmark the permalink.

5 Responses to Riemann Summation

  1. Pingback: Fundamental Theorem of Calculus | My Math Blog

  2. Pingback: Example Riemann Sums | My Math Blog

  3. Pingback: Integral Test for Convergence | My Math Blog

  4. Pingback: [Index] Calculus of a Single Variable | My Math Blog

  5. Pingback: [Index] Calculus in a Single Variable | My Math Blog

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s