Next: Exercises Up: The Definite Integral - Previous: The Definite Integral -
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;
Notice how different the two approximations are. However, if we increase the number of subintervals to 100, they are much closer.
These sums can also be interpreted geometrically, using the Maple leftbox and rightbox commands.
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.
you could use the following Maple command.
Sometimes you need to compute a definite integral involving a piecewise-defined function. For example, suppose you have a function f(x) defined as follows
and you needed to compute the definite integral
The best way to do this in Maple is to split it up into two integrals and use the appropriate formula, as shown below. How you split the integral up is determined by where the formula defining the function changes.
Note that the average value is just a number. Note furthermore that we can rearrange the definition to give
If on [a,b], then the average value has the following geometrical interpretation: is the height of a rectangle of width b-a such that the area of this rectangle is equal to the area under the graph of f from a to b. The following example shows you how to compute an average. The last plot command shows the function and the top of this rectangle.
> f :=x -> x*sin(x) ;
> f_ave := int(f(x),x=0..Pi)/Pi;
William W. Farr