Next: About this document ...
The purpose of this lab is to introduce you to Maple commands for
computing definite and indefinite integrals.
There are two main ways to think of the definite integral. The easiest
one to understand is as a means for
computing areas (and volumes). The second way the definite integral is
used is as a sum. That is, we use the definite integral to ``add
things up''. Here are some examples.
This lab is intended to introuduce you to Maple commands for computing
integrals, including applications of integrals.
- Computing net or total distance traveled by a moving object.
- Computing average values, e.g. centroids and centers of mass,
moments of inertia, and averages of probability distributions.
The basic Maple command for computing 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.
Suppose you wanted to compute the following definite
integral with Maple.
The command to use is shown below.
Notice that Maple gives an exact answer, as a fraction. If you want a
decimal approximation to an integral, you just put an evalf
command around the int command, as shown below.
To compute an indefinite integral with Maple, you just leave out the
range for the limits of integration, as shown below.
Note that Maple does not include a constant of integration.
You can also use the Maple int command with functions or
expressions you have defined in Maple.
example, suppose you wanted to find area under the curve of the
interval . Then you can define this function in Maple with
> f := x -> x*sin(x);
and then use this definition as shown below.
You can also simply give the expression corresponding to 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);
If a function is integrable over an interval , then we
define the average value of , which we'll denote as ,
on this interval to be
Note that the average value is just a number. For example, suppose you
wanted to compute the average value of the function
over the interval
. The following Maple
command would do the job.
It is also easy to use Maple to compute centroids and centers of
mass. For example, suppose you wanted to compute the coordinates of
the centroid of the region bounded above by the curve
and below by the axis over the interval
. The first thing to do is to plot the region.
> q := -3*x^2+3*x+36;
Once you have plotted the region, you can compute the area with the
following command. Note the use of a label, since we'll use the area
> area := int(q,x=-3..4);
Once we have the area, we can compute and as
> x_bar := int(x*q,x=-3..4)/area;
> y_bar := int(q^2,x=-3..4)/(2*area);
- Use Maple to compute the following definite integrals.
- Find the area of the region bounded above by
and below by . Include a plot of the region.
- Find the centroid of the region from the previous exercise.
- Suppose the velocity in feet per second of a particle moving in
one dimension is given by
where is the time in seconds.
- Find the average velocity of the particle over the interval
- Assuming that the particle was at the origin at , determine
the position of the particle at .
Next: About this document ...