Next: Exercises Up: The Definite Integral - Previous: Purpose
Of course, when we use a definite integral to compute an area or a volume, we are adding up area or volume. So you might ask why make a distinction? The answer is that the notion of an integral as a means of computing an area or volume is much more concrete and is easier to understand.
We will learn in class that the definite integral is actually defined as a (complicated) limit of sums, so it makes sense that the integral should be thought of as a sum. We will also learn in class that the indefinite integral, or anti-derivative, can be used to evaluate definite integrals. Students often concentrate on techniques for evaluating integrals, and ingnore the definition of the integral as a sum. This is a mistake, for the following reasons.
The rectangular area approximations we will describe in this section depend on subdividing the interval [a,b] into subintervals of equal length. For example, dividing the interval [0,4] into four uniform pieces produces the subintervals [0,1], [1,2], [2,3], and [3,4]. The next step is to approximate the area above each subinterval with a rectangle, with the height of the rectangle being chosen according to some rule. In particular, we will consider the following rules:
The Maple student package has commands for visualizing these three rectangular area approximations. To use them, you first must load the package via the with command. Then try the three commands given below. Make sure you understand the differences between the three different rectangular approximations. Take a moment to see that the different rules choose rectangles which in each case will either underestimate or overestimate the area. Even the midpoint rule, whose rectangles usually have heights more appropriate than those for the left endpoint and right endpoint rules, will produce an approximation which is not exact.
There are also Maple commands leftsum, rightsum, and middlesum to sum the areas of the rectangles, see the examples below. Note the use of evalf to obtain numerical answers.
The Maple commands above use the short-hand summation notation. Since there are only four terms in the sums above, it isn't hard to write them out explicitly, as follows.
However, if the number of terms in the sum is large, summation notation saves a lot of time and space.
It should be clear from the graphs that adding up the areas of the rectangles only approximates the area under the curve. However, by increasing the number of subintervals the accuracy of the approximation can be increased. All of the Maple commands described so far in this lab permit a third argument to specify the number of subintervals. The default is 4 subintervals. See the example below for the area under y=x from x=0 to x=2 using the rightsum command with 4, 10, 20 and 100 subintervals. (As this region describes a right triangle with height 2 and base 2, this area can be easily calculated to be exactly 2.) Try it yourself with the leftsum and middlesum commands.
Since, in this trivial example, we knew that the area is exactly 2, it appears that, as the number of subintervals increases, the rectangular approximation becomes more accurate.
When this limit as the number of subintervals goes to infinity exists, we have special notation for this limit and write it as
We will learn later on that if the function f(x) is continuous on the interval [a,b], then this limit always exists and we can write
where A is the area under the curve y=f(x) between x=a and x=b.
The Fundamental Theorem of Calculus (FTOC) provides a connection between the definite integral and the indefinite integral we studied earlier. That is, the FTOC provides a way to evaluate definite integrals if an anti-derivative can be found for f(x). We'll spend a lot of time later in the course developing ways to do this, but for now we'll let Maple do the work and won't worry too much about how it is done.
The basic maple command for performing definite and indefinite integrals is the int command. The syntax is very similar to that of the leftsum and rightsum commands, except you don't need to specify the number of subintervals. This should make sense, if you recall that the definite integral is defined as a limit of a rectangular sum as the number of subintervals goes to infinity. In the section on rectangular approximations, we used two examples. The first was the function y=x2 on the interval [0,4] and the second was the function y=x on the interval [0,2]. We would express the areas under these two curves with our integral notation as
Using Maple, we would compute these two definite integrals as shown below.
In the exercises, we'll ask you to compare rectangular approximations to integrals. In doing so, you'll need to apply several commands to the same function. To save typing and prevent errors, you can define the function as a function or an expression in Maple first and then use it in subsequent int, leftsum, etc. commands. For example, suppose you were given the function on the interval . Then you can define this function in Maple with the command
> f := x -> x*sin(x);
You can also simply give the expression corresponding to f(x) a label in Maple, and then use that label in subsequent commands as shown below. However, notice the difference between the two methods. You are urged you to choose one or the other, so you don't mix the syntax up.
> p := x*sin(x);
William W. Farr