Calculus II, Lab I

Deanna Dick

STUDENT > restart;

STUDENT > with(plots):

STUDENT > with(student):

 

Integration

Recall that Maple allows us to do many operations quickly and effeciently. One of these is integration. If we identify a function we can see its graph, and then integrate it over any given interval.

STUDENT > plot(x^3+1,x=-2..2,color=black);

 

STUDENT > Int(x^3+1,x=-1..2);

STUDENT > value(");

Note how Maple treats the following problem.

STUDENT > Int(x^3+1,x);

STUDENT > value(");

Maple does not put in the constant of integration. It also has problems integration some expressions such as the following function, even though it can give us a good approximation of the definite integral.

STUDENT > Int(sqrt(x^7+4),x);

STUDENT > Int(sqrt(x^7+4),x=1..3);

STUDENT > evalf(");

Area between two curves

We will start by finding the area between a curve and the x axis. To help us do this, we will graph the function.

 

STUDENT > f:=5*x^3-19*x^2+11*x+3;

STUDENT > plot(f,x=-2..5,color=black);

 

Since the curve crosses the x-axis several times we must find those intersection points. Then using our rules for integration, we can set up the appropriate integrals.

 

STUDENT > pt:=fsolve(f=0,x);

 

Since the graph is above the x-axis from [-1/5,1] and falls below the x-axis on the interval [1,3] we must calculate the total area by adding the area calculated by the first integral to the negative of that calculated by the second integral.

 

STUDENT > Int(f,x=pt[1]..pt[2])-Int(f,x=pt[2]..pt[3]);

STUDENT > value(");

 

We can use the same technique to find the area between two curves. Remember to graph the curves so that you always know which equation is the top curve ( or the rightmost curve).

 

STUDENT > f:=3*x^3-x^2-10*x; g:=-x^2+2*x;

STUDENT > plot({f,g},x=-4..4);

STUDENT > pt:=fsolve(f=g,x);

STUDENT > Int(f-g,x=pt[1]..pt[2])+Int(g-f,x=pt[2]..pt[3]);

STUDENT > value(");

Exercises

1. Find the area between the given curve and the x-axis. Use the graph to help you.

 

                   4        3           2

             y := x  + .63 x  - 15.456 x  + 12.853 x + 5

 

 

2. Graph the region bounded by the given curves, and use the graph and Maple to help calculate the area of the region.

 

                                       3 1/2

                         y[1] := (1 + x )

 

 

                          y[2] := 1/2 x + 2

 

 

                                x := 0

 

 

3. Find the area of the region that is bounded above by the following curves, and below by the x-axis.

 

                                       3

                          y[1] := 4 - x  - x

 

 

                           y[2] := 7 ln(x)

 

Volume

STUDENT > restart; with(plots): with(student):

Washer Method

Just like area we must get an idea how to approach a volume problem, so that we can set it up for Maple to solve. Let's first solve a problem using the washer method. To do this we will revolve the following equations about the x-axis.

STUDENT > f:=sqrt(x);g:=x^2;

STUDENT > plot({f,g},x=-1..2);

STUDENT > pt:=fsolve(f=g,x);

 

Notice that Maple failed to find the point of intersection (0,0). This is a common problem when the intersection point is the endpoint on one curve. Always check the answers Maple gives you!

 

STUDENT > Int(Pi*(f^2-g^2),x=0..pt);

STUDENT > value(");

Shell Method

Let's take the same problem and integrate using the shell method. Thanks to Maple, we have a graph that allows us to set up the problem easily. We even know the intersection points for these two curves and the position of each. However, our integration will now be with respect to y.

 

 

STUDENT > Int(2*Pi*y*(sqrt(y)-y^2),y=0..1);

STUDENT > value(");

 

Notice when we use Maple's calculated answers it gives us an approximated answer, however with exact limits of integration Maple gives an exact answer. Use evaluate to make sure our results are the same.

 

STUDENT > evalf(");

 

Exercises

Use each of the three methods used to find volume (one per problem) to calculate the volume of the solid generated by revolving the region bounded by the curves:

 

                                       3

                              y[1] := x

 

 

                              y[2] := 0

 

 

                                x := 2

 

1. about the x-axis

2. about the y-axis

3. about the line x=4

 

Click here to go back!