next up previous
Next: About this document ... Up: lab_template Previous: lab_template


The Definite Integral


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.

Definite and indefinite integrals with Maple

The basic Maple command for computing definite and indefinite integrals is the int command.

To compute the indefinite integral

\begin{displaymath}\int x^2 \, dx \end{displaymath}

with Maple:
> int(x^2,x);
Note that Maple does not include a constant of integration. Suppose you wanted to compute the following definite integral with Maple.

\begin{displaymath}\int_{0}^{4} x^2 \, dx \end{displaymath}

The command to use is:
> int(x^2,x=0..4);

Finding area

If you want to find the area bounded by the graph of two functions, you should first plot both functions on the same graph. You can then find the intersection points using either the solve or fsolve command. Once this is done, you can calculate the definite integral in Maple. An example below illustrates how this can be done in Maple by finding the area bounded by the graphs of $f(x)=-x^2+4x+6$ and $g(x)=x/3+2$:
> f := x-> -x^2+4*x+6; 
> g := x-> x/3+2;
> plot({f(x),g(x)},x=-2..6);
> a := fsolve(f(x)=g(x),x=-2..0);
> b := fsolve(f(x)=g(x),x=4..6);
> int(f(x)-g(x),x=a..b);

Average value of a function

If a function $f$ is integrable over a closed interval $[a,b]$, then the average value of $f$, denoted $\bar{f}$, on this interval is:

\begin{displaymath}\bar{f} = \frac{1}{b-a} \int_{a}^{b} f(x) \, dx \end{displaymath}

Note that the average value is just a number. For example, suppose you wanted to compute the average value of the function $s(t) =
-16t^2+100t$ over the interval $1 \leq t \leq 5$. The following Maple command would do the job.
> int(-16*t^2+100*t,t=1..5)/(5-1);


  1. Use Maple to compute the each of the following definite integrals:
    $\displaystyle \int_{-1.5}^{1.5} e^(-x^2-1) \, dx$ (Note the syntax for the $e^x$ function is $exp(x)$.)
    $\displaystyle \int_{\frac{-\pi}{2}}^{\frac{\pi}{4}} \frac{1}{\sin^2(x)+2} \, dx$ (Note: to square a trig function put the ^2 after the angle in parentheses)

  2. Find the area of the region bounded by the curves $\displaystyle f(x)=\frac{x}{x^2+2}$ and $\displaystyle g(x)=\frac{\sqrt{x+0.01}}{9}$.
    Plot the functions experimenting with domain values to clearly show the bounded area.
    Find the $x$ values of the intersection points using the solve or textttfsolve commands.
    Find the bounded area stating your answer in a text sentence.
  3. Find the area of the region bounded by the curves $\displaystyle h(x)=\frac{x}{2}-4$ and $\displaystyle j(x)=\ln(\sqrt{x+1}-2)$.
  4. Find the average velocity of a particle moving in one dimension with velocity $v(t)=98.5-3\cos(2t)+t$ given in feet per second from $2$ to $9$ seconds.

next up previous
Next: About this document ... Up: lab_template Previous: lab_template
Jane E Bouchard