Calculus/Definite integral

Suppose we are given a function and would like to determine the area underneath its graph over an interval. We could guess, but how could we figure out the exact area? Below, using a few clever ideas, we actually define such an area and show that by using what is called the definite integral we can indeed determine the exact area underneath a curve.

Definition of the Definite Integral




The rough idea of defining the area under the graph of $$f$$ is to approximate this area with a finite number of rectangles. Since we can easily work out the area of the rectangles, we get an estimate of the area under the graph. If we use a larger number of smaller-sized rectangles we expect greater accuracy with respect to the area under the curve and hence a better approximation. Somehow, it seems that we could use our old friend from differentiation, the limit, and "approach" an infinite number of rectangles to get the exact area. Let's look at such an idea more closely.

Suppose we have a function $$f$$ that is positive on the interval $$[a,b]$$ and we want to find the area $$S$$ under $$f$$ between $$a$$ and $$b$$. Let's pick an integer $$n$$ and divide the interval into $$n$$ subintervals of equal width (see Figure 1). As the interval $$[a,b]$$ has width $$b-a$$, each subinterval has width $$\Delta x=\frac{b-a}{n}$$. We denote the endpoints of the subintervals by $$x_0,x_1,\ldots,x_n$$. This gives us
 * $$x_i=a+i\Delta x\text{ for }i=0,1,\dots,n$$



Now for each $$i=1,\ldots,n$$ pick a sample point $$x_i^*$$ in the interval $$[x_{i-1},x_i]$$ and consider the rectangle of height $$f(x_i^*)$$ and width $$\Delta x$$ (see Figure 2). The area of this rectangle is $$f(x_i^*)\Delta x$$. By adding up the area of all the rectangles for $$i=1,\ldots,n$$ we get that the area $$S$$ is approximated by
 * $$A_n=f(x_1^*)\Delta x+\dots+f(x_n^*)\Delta x$$

A more convenient way to write this is with summation notation:
 * $$A_n=\sum_{i=1}^n f(x_i^*)\Delta x$$

For each number $$n$$ we get a different approximation. As $$n$$ gets larger the width of the rectangles gets smaller which yields a better approximation (see Figure 3). In the limit of $$A_n$$ as $$n$$ tends to infinity we get the area $$S$$.

It is a fact that if $$f$$ is continuous on $$[a,b]$$ then this limit always exists and does not depend on the choice of the points $$x_i^*\in[x_{i-1},x_i]$$. For instance they may be evenly spaced, or distributed ambiguously throughout the interval. The proof of this is technical and is beyond the scope of this section.



One important feature of this definition is that we also allow functions which take negative values. If $$f(x)<0$$ for all $$x$$ then $$f(x_i^*)<0$$ so $$f(x_i^*)\Delta x<0$$. So the definite integral of $$f$$ will be strictly negative. More generally if $$f$$ takes on both positive and negative values then $$\int\limits_a^b f(x)dx$$ will be the area under the positive part of the graph of $$f$$ minus the area above the graph of the negative part of the graph (see Figure 4). For this reason we say that $$\int\limits_a^b f(x)dx$$ is the signed area under the graph.

Independence of Variable
It is important to notice that the variable $$x$$ did not play an important role in the definition of the integral. In fact we can replace it with any other letter, so the following are all equal:
 * $$\int\limits_a^b f(x)dx=\int\limits_a^b f(t)dt=\int\limits_a^b f(u)du=\int\limits_a^b f(w)dw$$

Each of these is the signed area under the graph of $$f$$ between $$a$$ and $$b$$. Such a variable is often referred to as a dummy variable or a bound variable.

Left and Right Handed Riemann Sums
The following methods are sometimes referred to as L-RAM and R-RAM, RAM standing for "Rectangular Approximation Method."

We could have decided to choose all our sample points $$x_i^*$$ to be on the right hand side of the interval $$[x_{i-1},x_i]$$ (see Figure 5). Then $$x_i^*=x_i$$ for all $$i$$ and the approximation that we called $$A_n$$ for the area becomes
 * $$A_n=\sum_{i=1}^n f(x_i)\Delta x$$

This is called the right-handed Riemann sum, and the integral is the limit
 * $$\int\limits_a^b f(x)dx=\lim_{n\to\infty}A_n=\lim_{n\to\infty}\sum_{i=1}^n f(x_i)\Delta x$$

Alternatively we could have taken each sample point on the left hand side of the interval. In this case $$x_i^*=x_{i-1}$$ (see Figure 6) and the approximation becomes
 * $$A_n=\sum_{i=1}^n f(x_{i-1})\Delta x$$

Then the integral of $$f$$ is
 * $$\int\limits_a^b f(x)dx=\lim_{n\to\infty}A_n=\lim_{n\to\infty}\sum_{i=1}^n f(x_{i-1})\Delta x$$

The key point is that, as long as $$f$$ is continuous, these two definitions give the same answer for the integral.

Examples
Example 1 In this example we will calculate the area under the curve given by the graph of $$f(x)=x$$ for $$x$$ between 0 and 1. First we fix an integer $$n$$ and divide the interval $$[0,1]$$ into $$n$$ subintervals of equal width. So each subinterval has width
 * $$\Delta x=\frac{1}{n}$$

To calculate the integral we will use the right-handed Riemann sum. (We could have used the left-handed sum instead, and this would give the same answer in the end). For the right-handed sum the sample points are
 * $$x_i^*=0+i\Delta x=\frac{i}{n}\quad i=1,\ldots,n$$

Notice that $$f(x_i^*)=x_i^*=\frac{i}{n}$$. Putting this into the formula for the approximation,
 * $$A_n=\sum_{i=1}^n f(x_{i}^*)\Delta x=\sum_{i=1}^n f\left(\frac{i}{n}\right)\Delta x=\sum_{i=1}^n \frac{i}{n}\cdot\frac{1}{n}=\frac{1}{n^2}\sum_{i=1}^n i$$

Now we use the formula
 * $$\sum_{i=1}^n i=\frac{n(n+1)}{2}$$

to get
 * $$A_n=\frac{1}{n^2}\cdot\frac{n(n+1)}{2}=\frac{n+1}{2n}$$

To calculate the integral of $$f$$ between $$0$$ and $$1$$ we take the limit as $$n$$ tends to infinity,
 * $$\int\limits_0^1 f(x)dx=\lim_{n\to\infty}\frac{n+1}{2n}=\frac{1}{2}$$

Example 2 Next we show how to find the integral of the function $$f(x)=x^2$$ between $$x=a$$ and $$x=b$$. This time the interval $$[a,b]$$ has width $$b-a$$ so
 * $$\Delta x=\frac{b-a}{n}$$

Once again we will use the right-handed Riemann sum. So the sample points we choose are
 * $$x_i^*=a+i\Delta x=a+\frac{i(b-a)}{n}$$

Thus



We have to calculate each piece on the right hand side of this equation. For the first two,
 * $$A_n$$
 * $$=\sum_{i=1}^n f(x_{i}^*)\Delta x$$
 * $$=\sum_{i=1}^n f\left(a+\frac{(b-a)i}{n}\right)\Delta x$$
 * $$=\frac{b-a}{n}\sum_{i=1}^n \left(a+\frac{(b-a)i}{n}\right)^2$$
 * $$=\frac{b-a}{n}\sum_{i=1}^n \left(a^2+\frac{2a(b-a)i}{n}+\frac{(b-a)^2i^2}{n^2}\right)$$
 * }
 * $$=\frac{b-a}{n}\sum_{i=1}^n \left(a+\frac{(b-a)i}{n}\right)^2$$
 * $$=\frac{b-a}{n}\sum_{i=1}^n \left(a^2+\frac{2a(b-a)i}{n}+\frac{(b-a)^2i^2}{n^2}\right)$$
 * }
 * $$=\frac{b-a}{n}\sum_{i=1}^n \left(a^2+\frac{2a(b-a)i}{n}+\frac{(b-a)^2i^2}{n^2}\right)$$
 * }
 * }
 * $$\sum_{i=1}^n a^2=a^2\sum_{i=1}^n 1=na^2$$
 * $$\sum_{i=1}^n \frac{2a(b-a)i}{n}=\frac{2a(b-a)}{n}\sum_{i=1}^n i=\frac{2a(b-a)}{n}\cdot\frac{n(n+1)}{2}$$

For the third sum we have to use a formula
 * $$\sum_{i=1}^n i^2=\frac{n(n+1)(2n+1)}{6}$$

to get
 * $$\sum_{i=1}^n \frac{(b-a)^2i^2}{n^2}=\frac{(b-a)^2}{n^2}\frac{n(n+1)(2n+1)}{6}$$

Putting this together
 * $$A_n=\frac{b-a}{n}\left(na^2+\frac{2a(b-a)}{n}\cdot\frac{n(n+1)}{2}+\frac{(b-a)^2}{n^2}\frac{n(n+1)(2n+1)}{6}\right)$$

Taking the limit as $$n$$ tend to infinity gives




 * $$\int\limits_a^b x^2dx$$
 * $$=(b-a)\left(a^2+a(b-a)+\frac{1}{3}(b-a)^2\right)$$
 * $$=(b-a)\left(a^2+ab-a^2+\frac{1}{3}(b^2-2ab+a^2)\right) $$
 * $$=\frac{1}{3}(b-a)(b^2+ab+a^2)$$
 * $$=\frac{1}{3}(b^3-a^3)$$
 * }
 * $$=\frac{1}{3}(b-a)(b^2+ab+a^2)$$
 * $$=\frac{1}{3}(b^3-a^3)$$
 * }
 * $$=\frac{1}{3}(b^3-a^3)$$
 * }
 * }

Basic Properties of the Integral
From the definition of the integral we can deduce some basic properties. For all the following rules, suppose that $$f$$ and $$g$$ are continuous on $$[a,b]$$.

The Constant Rule
When $$f$$ is positive, the height of the function $$c\cdot f$$ at a point $$x$$ is $$c$$ times the height of the function $$f$$. So the area under $$c\cdot f$$ between $$a$$ and $$b$$ is $$c$$ times the area under $$f$$. We can also give a proof using the definition of the integral, using the constant rule for limits,
 * $$\int\limits_a^b c\cdot f(x)dx=\lim_{n\to\infty}\sum_{i=1}^n c\cdot f(x_i^*)=c\cdot\lim_{n\to\infty}\sum_{i=1}^n f(x_i^*)=c\int\limits_a^b f(x)dx$$

Example

We saw in the previous section that
 * $$\int\limits_0^1 xdx=\frac{1}{2}$$

Using the constant rule we can use this to calculate that
 * $$\int\limits_0^1 3xdx=3\int\limits_0^1 xdx=3\cdot\frac{1}{2}=1.5$$ ,
 * $$\int\limits_0^1 -7xdx=-7\int\limits_0^1 xdx=(-7)\cdot\frac{1}{2}=-3.5$$.

Example

We saw in the previous section that
 * $$\int\limits_a^b x^2dx=\frac{b^3-a^3}{3}$$

We can use this and the constant rule to calculate that
 * $$\int\limits_1^3 2x^2 dx=2\int\limits_1^3 x^2dx=2\cdot\frac{1}{3}\cdot(3^3-1^3)=\frac{2}{3}(27-1)=\frac{52}{3}$$

There is a special case of this rule used for integrating constants:

When $$c>0$$ and $$a<b$$ this integral is the area of a rectangle of height $$c$$ and width $$b-a$$ which equals $$c(b-a)$$.

Example
 * $$\int\limits_1^3 9dx=9(3-1)=9\cdot 2=18$$
 * $$\int\limits_{-2}^6 11dx=11(6-(-2))=11\cdot 8=88$$
 * $$\int\limits_2^{17} 0dx=0\cdot(17-2)=0$$

The addition and subtraction rule
As with the constant rule, the addition rule follows from the addition rule for limits:

The subtraction rule can be proved in a similar way.
 * $$\int\limits_a^b \bigl(f(x)+g(x)\bigr)dx$$
 * $$=\lim_{n\to\infty}\sum_{i=1}^n \Big(f(x_i^*)+g(x_i^*)\Big)$$
 * $$=\lim_{n\to\infty}\sum_{i=1}^n f(x_i^*)+\lim_{n\to\infty}\sum_{i=1}^n g(x_i^*)$$
 * $$=\int\limits_a^b f(x)dx+\int\limits_a^b g(x)dx$$
 * }
 * $$=\int\limits_a^b f(x)dx+\int\limits_a^b g(x)dx$$
 * }
 * $$=\int\limits_a^b f(x)dx+\int\limits_a^b g(x)dx$$
 * }

Example

From above $$\int\limits_1^3 9dx=18$$ and $$\int\limits_1^3 2x^2dx=\frac{52}{3}$$ so
 * $$\int\limits_1^3 (2x^2+9)dx=\int\limits_1^3 2x^2dx+\int\limits_1^3 9dx=\frac{52}{3}+18=\frac{106}{3}$$
 * $$\int\limits_1^3 (2x^2-9)dx=\int\limits_1^3 2x^2dx-\int\limits_1^3 9dx=\frac{52}{3}-18=-\frac{2}{3}$$

Example
 * $$\int\limits_0^2 (4x^2+14)dx=4\int\limits_0^2 x^2dx+\int\limits_0^2 14dx=4\cdot\frac{1}{3}(2^3-0^3)+2\cdot 14=\frac{32}{3}+28=\frac{116}{3}$$

The Comparison Rule


If $$f(x)\ge 0$$ then each of the rectangles in the Riemann sum to calculate the integral of $$f$$ will be above the $$y$$ axis, so the area will be non-negative. If $$f(x)\ge g(x)$$ then $$f(x)-g(x)\ge 0$$ and by the first property we get the second property. Finally if $$M\ge f(x)\ge m$$ then the area under the graph of $$f$$ will be greater than the area of rectangle with height $$m$$ and less than the area of the rectangle with height $$M$$ (see Figure 7). So
 * $$M(b-a)=\int\limits_a^b M\ge\int\limits_a^b f(x)dx\ge\int\limits_a^b m=m(b-a)$$

Linearity with respect to endpoints
Again suppose that $$f$$ is positive. Then this property should be interpreted as saying that the area under the graph of $$f$$ between $$a$$ and $$b$$ is the area between $$a$$ and $$c$$ plus the area between $$c$$ and $$b$$ (see Figure 8).

Even and odd functions
Recall that a function $$f$$ is called odd if it satisfies $$f(-x)=-f(x)$$ and is called even if $$f(-x)=f(x)$$.

Suppose $$f$$ is an odd function and consider first just the integral from $$-a$$ to $$0$$. We make the substitution $$u=-x$$ so $$du=-dx$$. Notice that if $$x=-a$$ then $$u=a$$ and if $$x=0$$ then $$u=0$$. Hence
 * $$\int\limits_{-a}^0 f(x)dx=-\int\limits_a^0 f(-u)du=\int\limits_0^a f(-u)du$$.

Now as $$f$$ is odd, $$ f(-u)=-f(u)$$ so the integral becomes
 * $$\int\limits_{-a}^0 f(x)dx=-\int\limits_0^a f(u) du$$.

Now we can replace the dummy variable $$u$$ with any other variable. So we can replace it with the letter $$x$$ to give
 * $$\int\limits_{-a}^0 f(x)dx=-\int\limits_0^a f(u)du=-\int\limits_0^a f(x)dx$$.

Now we split the integral into two pieces
 * $$\int\limits_{-a}^a f(x)dx=\int\limits_{-a}^0 f(x)dx+\int\limits_0^a f(x)dx=-\int\limits_0^a f(x)dx+\int\limits_0^a f(x)dx=0$$.

The proof of the formula for even functions is similar.