Next: Computing definite integrals with Up: Background Previous: Background

### Rectangular approximations to definite integrals

As we stated above, definite integrals are often used to find sums. As an example, suppose that v(t) represents the velocity of an object that moves in one dimension. At any instant of t, the value of v(t) can be positive, negative, or zero. If it is zero, the object is not moving at that instant. If it is not zero, then the sign of v(t) determines the direction of motion.

Now, suppose we were given a function v(t) for , and we wanted to find the net distance traveled by the object over this time interval. If v(t) is constant, then this is easy to determine: distance is velocity times elapsed time. If the velocity is not constant, then it is more difficult to find the answer. The idea of using the integral is based on breaking the elapsed time up into subintervals. We approximate the distance traveled over each subinterval by picking an average velocity over that subinterval and using our formula distance equals velocity times elapsed time. Adding up the approximations for each subinterval gives an approximation to the net distance traveled. Intuitively, the more subintervals we use, the better the approximation will be. Note also that how we pick the average velocity over each subinterval can affect the accuracy of our approximation.

For example, suppose v(t)=3-t for and we want the approximate the net distance traveled. Suppose we use five subintervals and choose the velocity at the left endpoint of each subinterval for our average velocity. Then we can use the Maple leftsum command to calculate an approximate distance as shown below. A different approximation is obtained by using the velocity at the right endpoint of each subinterval, using the Maple rightsum command, and this is also shown below.

> v := t -> 3-t;

> plot(v(t),t=0..4);

> evalf(leftsum(v(t),t=0..4,5));

> evalf(rightsum(v(t),t=0..4,5));

Notice how different the two approximations are. However, if we increase the number of subintervals to 100, they are much closer.

> evalf(leftsum(v(t),t=0..4,100));

> evalf(rightsum(v(t),t=0..4,100));

These sums can also be interpreted geometrically, using the Maple leftbox and rightbox commands.

> leftbox(v(t),t=0..4,5);

> rightbox(v(t),t=0..4,5);

The sums we computed above with the leftbox and rightbox commands were obtained by adding up the areas of the rectangles with the following important convention: if a rectangle lies below the t axis, it appears in the sum with a minus sign. That is, we interpret a rectangle above the axis as having positive area and a rectangle below the axis as having negative area.

Next: Computing definite integrals with Up: Background Previous: Background

William W. Farr
Fri Jan 24 15:07:34 EST 1997