Next: About this document ...
Up: Labs and Projects for
Previous: Labs and Projects for
In Sections 5.8 and 8.1 you are asked to find antiderivatives by substitution. This is really a ``change of variables'' technique used to better see how the integrand can be looked at as the derivative of some function. Maple has a command called changevar that can be used to practice substitution. This command has three arguments. In the first argument the quantity to be replaced is followed by an equals sign which is followed by what will be substituted. The second argument tells where the substitution will be made and the third argument gives the variable in terms of which the changed expression will be given. Note that when an integral in x is rewritten with changevar, the dx must also be changed, and in a definite integral, the limits of integration also need to the changed. Since changevar is in the student package, that package must be loaded before using changevar.
Here is an indefinite integral example of the use of changevar. We use Int instead of int because we do not want the integral evaluated immediately; we want to be able to observe the substitution process. After we have done that, we use value to get the answer. Then we use changevar one more time in order to express the answer in terms of the original variable of the problem. Keep in mind that the aim in doing a substitution is to simplify the integral to some pattern with which we can readily deal.
> with(student):
> g:=x->x*sqrt(1+x^2);
> I1:=Int(g(x),x);
> changevar(1+x^2=u,I1,u);
> value(``);
> changevar(u=1+x^2,'',x);When you run these commands, notice that the integral is much simplified after the first change of variables. By the way, can you explain why the
Next we look at the commands for a definite integral.
> I2:=Int(g(x),x=2..3);
> changevar(1+x^2=t,I2,t);
> value(``);
In this case we did not have to, in rewriting the integral, switch back to x after integrating because the limits of integration were switched from limits on x to limits on t. Make sure you understand how the limits on t were obtained.
You will find the background you need in a section of the text we have covered. Make sure that the answer you give is a reasonable one.
Here is a reminder that should be useful in this exercise. Let us say we need to find the roots of a polynomial function h(x). Of course, this can be done with fsolve. However if you name the output of fsolve, then you can have Maple give you each of the individual roots for further computation. For instance if
> root:=fsolve(h(x)=0,x);then root[1] is the value of the first listed root root[2] is the value of the second listed root, etc.
Volumes of solids of revolution are often found by using the disk/washer method. (See Section 6.2 of the text.) The Maple CalcP package has three commands that can help you in your study of this method. The command revolve gives a picture of the solid of revolution being considered. The LeftDisk command uses a regular partition with x*i chosen to be the left hand endpoint of the i-th subinterval, to give a picture of the approximating pieces, i.e. the disks or washers. For both of these commands the picture is 3-dimensional. You can click and drag on it in order to view it from different angles. Details of this will be discussed in lab.
The third command is LeftInt. This evaluates the Riemann sum associated with the picture given by LeftDisk. Note that the third argument in each of these specifies the numbers of subintervals.
Running the following code will help you see how these commands work
> with(CalcP):
> f:=x->x^2+1;
> plot(f(x),x=-2..2);
> revolve(f(x),x=-2..2);
> revolve(f(x),x=-2..2,y=-2);
> revolve({5,f(x)},x=-2..2);
> LeftDisk(f(x),x=-2..2,5);
> LeftDisk(f(x),x=-2..2,10);
> LeftInt(f(x),x=-2..2,5);
> LeftInt(f(x),x=-2..2,10);
> Pi*int((f(x))^2,x=-2..2);
> evalf(``);The fifth line shows how to revolve the given area about a horizontal line other than the x-axis. Line 6 pertains to revolving the area between two curves; hence the washer method is linked to this volume. Reposition the picture so that you can look through the hole in the center of the solid. The second last line uses the formula developed in the text to find the volume of our solid of revolution. Since, for purposes of illustration, we have used a very simple f(x), the volume can be found exactly. In practice, this will not always be the case.
What special care must be taken in this problem? What is the situation that complicates this problem? Explain.
> LeftDisk(x^2,x=0..3,6,y=10);
> LeftDisk({x^2,0},x=0..3,6,y=10);
Christine Marie Bonini