The area under a curve

We will begin our discussions by considering the simple geometric problem of determining the area underneath the graph of a function. In fact, we will later see how to use the same ideas to compute the volume of many different solids. These issues were of great importance to ancient mathematicians and led to the discovery of many of the ideas we'll talk about.


The area of a triangle

Of course, we all know that the area of a triangle is equal to half the product of the base and height of the triangle. However, to illustrate our methods, we will consider this simple example from another perspective.

To be more specific, we will compute the area underneath the graph $  y =x  $ as x varies from 0 to 1.

Our method for computing this area will be first to approximate this area by the area of some rectangles which lie underneath the graph. Then we will increase the number of these rectangles so that our approximation becomes better and better. If you drag the red dot in the following figure, you can vary how many rectangles will be used in the approximation. As more rectangles are added, the area of the triangle is filled up by the rectangles. This means that the area of all the rectangles will be a good approximation to the area of the triangle.

Let's get started by building the rectangles. We will use n to denote the number of rectangles we are going to use. Since the rectangles will span the interval from x = 0 to x = 1, we will break this interval into n pieces of width $  h = \frac 1n $ as in the figure.

The points are $  x_1 = \frac 1n, x_2 = \frac 2n, \ldots, x_i = 
\frac in.  $

Let us now consider one of the rectangles as in the figure. We know that the width of the rectangle is $  \frac 1n.  $ So that the rectangle fits underneath the graph, its upper left corner should lie on the graph which is $  y =x.  $

This means that the height of the rectangle is $  x_i  $ and hence its area is $  \frac{x_i}{n} = \frac{i}{n^2} $ since $  x_i = \frac in. $

To put everything together now, the area of all the rectangles is

\[ 
A_n = \frac 0{n^2} + \frac{1}{n^2} + \frac{2}{n^2} + \ldots + 
\frac{n-1}{n^2} \]

since the first rectangle we consider has left endpoint $  x_0 
= 0  $ while the last rectangle has left endpoint $  x_{n-1} = 
\frac{n-1}{n}.  $

Notice that each term has a common factor so that we may write

\[ 
A_n = \frac{1}{n^2} (1+2+3+\ldots + n-1). 
 \]

If you remember, the sum we need to evaluate is simply that of an arithmetic sequence: in particular, the sum

\[ 
1+2+3+\ldots +k = \frac{k(k+1)}{2} 
 \]

In our case, k = n - 1 so that

\[ 
A_n = \frac{1}{n^2} (1+2+3+\ldots + n-1) = \frac{1}{n^2} 
\frac{(n-1)n}{2} = \frac{n(n-1)}{2n^2} = \frac{n-1}{2n} = \frac 
12(1-\frac 1n). \]

Now consider what happens as the number of rectangles n becomes very large. Then the term $  \frac 1n  $ becomes very small and we see that $  A_n \approx \frac 12  $ which is as we expect since we know that the area of the triangle is equal to $  \frac 12.  $

To summarize, we have computed the area of a triangle in a roundabout way. We approximated it by the area of some rectangles and observed that as the number of rectangles gets very large, the appproximation becomes more precise. We can, and will, use this method to find some areas that we do not already know.



The triangle revisited

Now we would like to go back and revisit our triangle. Instead of computing the are under the graph $  y =x  $ as x varies from 0 to 1, we would like to allow the right endpoint of the interval to vary. It might not be immediately clear to you why we want to do this, but we will see a very interesting relationship if we do.

In the following figure, you can vary the right endpoing by dragging the ball around.

We will use the notation A(x) to denote the function which measures the area under the curve $  y=x $ between 0 and x. We could, of course, determine A(x) as we did above. However, let's use the fact that this is measuring the area of a right isosceles triangle where the length of the legs is x. This means that

\[ 
A(x) = \frac{x^2}{2} 
 \]

Now we have something very interesting: we are considering the area under the graph $  y = f(x) = x  $ and we have found that this area is $  A(x) = \frac{x^2}{2}.  $ Notice that the derivative

\[ 
A^\prime(x) = x = f(x) 
 \]

In other words, the derivative of the area function is the original function which defines the graph. Is this merely a coincidence? Sorry, but you'll have to wait and see.


The area under a parabola



In the previous example, we did not really need a new technique since we know the area of a triangle. However, in this example, we will find the area of a region which cannot be computed through conventional means. Namely, we will compute the area under the parabola $  y 
=x^2  $ as x varies from 0 to 1.

As in the example with the triangle, we will approximate this area with the area of many rectangles. Then we will let the number of rectangles increase so that we have a better approximation.

As before, we divide the interval from 0 to 1 into n pieces of width $ 
\frac 1n.  $ The endpoints of these sub-intervals are, as before, $  x_i = \frac in. $

In this case, the height of the rectangles are given by $ 
x_i^2  $ and so the area of a rectangle is $  \frac{x_i}{n} = 
\frac{i^2}{n^3}.  $ We then find that the sum of the areas of all the rectangles is

\[ 
A_n=\frac{0^2}{n^3} + \frac{1^2}{n^3} + \frac{2^2}{n^3} + \ldots + 
\frac{(n-1)^2}{n^3} = \frac 1{n^3}(1^2 + 2^2 + 3^2 + \ldots + (n-1)^2) 
= \frac{1}{n^3} \sum_{i=1}^{n-1} i^2 
 \]

In order to evaluate this, we need to be able to sum a sequence consisting of squares. We have discussed this sum earlier: recall that we found

\[ 
\sum_{i=1}^k i^2 = \frac{k(k+1)(2k+1)}{6} 
 \]

In the case we are now looking at, the sum ends at $  k = 
n-1. $

This says that

\[ 
A_n = \frac 1{n^3} \sum_{i=1}^{n-1} i^2 = \frac 13 - \frac 1{2n} + 
\frac 1{6n^2}.  
 \]

Notice that as n becomes very large, the two terms on the right become very small and $  A_n \approx \frac 
13.  $ Since the area of the rectangles $  A_n  $ provide a better and better approximation as n becomes large, we can say that the area under the parabola $  y = x^2 
 $ between $  x = 0  $ and $  x = 1  $ is equal to $ \frac 13.  $

Here we were able to compute an area which we could not have found through standard geometry. This will be a very useful technique for us throughout the course. If you are uncomfortable with any of the ways in which we have used the sigma notation above, you should write out the sums represented by the notation and verify the ways in which the notation has been manipulated.

More generally: Let us now explore an area function similar to the one we considered for the area of a triangle. In particular, $  A(x)  $ will represent the area under the parabola between 0 and x. In the following diagram, you may explore this function by dragging the ball around.

As before, we will divide the interval from 0 to x into n pieces each of width $  \frac xn.  $ The corresponding points will be denoted by $  x_i  $ where $  x_0 = 0, x_1 = \frac xn, x_2 = 
\frac{2x}n,\ldots,x_i = \frac{ix}n. $ The height of the rectangles will again be $  x_i^2  $ so that the area of a rectangle will be $  x_i^2~\frac xn = \frac{x^3i^2}{n^3}.  $

Now if we sum the area of the rectangles, we obtain


\begin{eqnarray*} 
A_n & = & \frac{x^3 0^2}{n^3} + \frac{x^3 1^2}{n^3} + \frac{x^3 
2^2}{n^3} + \frac{x^3 3^2}{n^3} + \ldots + \frac{x^3 (n-1)^2}{n^3} \\ 
& = & x^3( \frac{1^2}{n^3} + \frac{2^2}{n^3} + \frac{3^2}{n^3} + 
\ldots + \frac{(n-1)^2}{n^3}) \\ 
& = & x^3(\frac 13 - \frac 1{2n} + \frac 1{6n^2}). 
\end{eqnarray*}

As is now familiar, as n becomes very large, we find that the rectangles provide a better and better approximation for the area and hence

\[ 
A(x) = \frac{x^3}{3}. \]

Once again, we see a remarkable relationship: $  A(x)  $ measures the area under the graph of the function $  y=f(x) = 
x^2 $ and we see that

\[ 
A^\prime(x) = x^2 = f(x) 
 \]


The area under an exponential




Finally, we will consider the area under the graph of $  y = 
f(x) = e^x  $ over the interval from 0 to x. The following diagram will illustrate this function.

A large part of this computation proceeds just as in the previous example. We devide the interval into n pieces of width $  \frac xn.  $ The points defined by these sub-intervals are $  x_i = \frac{xi}n.  $ Now the height of the rectangles will be given by the value of he function at $ x_i 
 $ so that the height is $  e^{x_i} = e^{xi/n}. $ This means that the area is $  e^{xi/n} ~\frac xn.  $ If we now sum all the areas of the rectangles, we have


\begin{eqnarray*} 
A_n & = & e^{x\cdot 0/n}\frac xn + e^{x\cdot 1/n} \frac xn + 
e^{x\cdot 2/n} \frac xn + e^{x\cdot 3/n} \frac xn  + \ldots 
+ e^{x\cdot (n-1)/n} \frac xn  \\ 
& = & \frac xn(1 + e^{x/n} + e^{2x/n} + e^{3x/n} + \ldots + 
e^{(n-1)x/n}) \\ 
& = & \frac xn(1 + e^{x/n} + (e^{x/n})^2 + (e^{x/n})^3 + \ldots + 
(e^{x/n})^{n-1} ) 
\end{eqnarray*}

You may recognize this last sum: it is a geometric series (meaning that the ratio of one term to its predecessor is constant) and it may be easily evaluated. For instance, suppose we want to add

\[ 
S=a+ar+ar^2 + ar^3 + \ldots ar^k 
 \]

The trick is to multiply the sum by the ratio r:

\[ 
\begin{array}{ll} 
S  =  a + & ar+ar^2 + ar^3 + \ldots ar^k \\ 
rS  = &  ar+ar^2 + ar^3 + \ldots ar^k + ar^{k+1} 
\end{array} 
 \]

If we subtract the second expression from the first, we find that

\[ 
(1-r)S = a - ar^{k+1} = a(1-r^{k+1}) 
 \]

which means that the sum

\[ 
S = a \frac{1-r^{k+1}}{1-r} 
 \]

If we apply this to our example, we have


\begin{eqnarray*} 
A_n & = & \frac xn(1 + e^{x/n} + (e^{x/n})^2 + (e^{x/n})^3 + 
\ldots + (e^{x/n})^{n-1}) \\ 
& = & \frac xn \frac{1-(e^{x/n})^n}{1-e^{x/n}} \\ 
& = & \frac xn ~ \frac {1-e^{x}}{1-e^{x/n}} \\ 
& = & (1-e^x) ~\frac{x}{n(1-e^{x/n})} 
\end{eqnarray*}

Now let's consider what happens when we have a lot of rectangles. This means that n is very large or rather that $  \frac xn  $ is very close to 0.

To study this situation, we will consider the linear approximation of the functoin $  f(t) = e^t  $ at the point $  t_0 = 
0.  $ Since we have $  f^\prime(t) = e^t,  $ it follows that both $  f(0) = 1  $ and $  f^\prime(0) = 1.  $ This means that the linear approximation is $  l(t) = 1 + 1(t-0) = 
1+t $ and that this approximation is good when $  t  $ is close to 0. In other words, $  e^t \approx 1+t 
 $ when t is close to 0.

Now when n becomes very large, we have that $  \frac xn  $ is very close to 0. This means that $  e^{x/n} \approx 1 +\frac xn.  $ In other words,

\[  \frac{x}{n(1-e^{x/n})} \approx \frac{x}{n(1-(1+\frac xn))} = -1 
 \]
and so $  A(x) = e^x - 1. $

Once again, we have found that the area function $  A(x) = e^x 
- 1  $ has the original function $  f(x) = e^x $ as its derivative. This is still more evidence for the Fundamental Theorem of Calculus which we will soon meet.


Summary

Let's summarize what we have done. To find the area under the graph of a function $  y= f(x)  $ between $  x = a  $ and $  x =b  $ , we divide the interval into n pieces. These pieces each have width $  \Delta x = 
\frac{b-a}n  $ and we call the left endpoint of these subintervals $  x_i = a + i\Delta x.  $

Now we form a rectangle whose height is $  f(x_i)  $ and whose area is $  f(x_i)\Delta x.  $ If we sum all the areas of these rectangles, we have

\[ 
A_n = \sum_{i=0}^{n-1} f(x_i)\Delta x 
 \]

Finally, as we consider more and more rectangles, the quantity $  A_n  $ gives a better and better approximation so that we may write the area as

\[ 
A = \lim_{n\to\infty} \sum_{i=0}^{n-1} f(x_i)\Delta x 
 \]

We will see many expressions like this throughout the term.