Maple Lab 3 (Spring 2007 Math 251 Sections 05-07)
Background Worksheet.
It's a good idea to start every sheet with the restart command. Maple remembers everything that
you do, so the restart command gives you a fresh start without having to shutdown and restart
the program itself!
| > |
A Quick Note for Typing in Maple:
To create new text groups such as this use the button labeled "T" above. To create a new execution group
(the lines with maple commands which start with ">") you can use the button labeled "[>" or the keyboard
shortcut "Ctrl+J". To insert a group before the cursor use "Ctrl+K".
To delete a line of input or Maple output you can use the keyboard shortcut "Ctrl+Delete". To begin
another line in an execution group use "Shift+Enter". Remember that "Enter" alone will just execute
the command you've typed.
For this lab we will need the "plots" package along with the "VectorCalculus" package.
| > |
Warning, the name changecoords has been redefined
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
Warning, the assigned names `<,>` and `<|>` now have a global binding
Warning, these protected names have been redefined and unprotected: `*`, `+`, `-`, `.`, D, Vector, diff, int, limit, series
![]()
![]()
![]()
![]()
![]()
![]()
![]()
We will be exploring Chapter 15 material using Maple. Specifically, we will be looking at:
computing multiple integrals, plotting solids, and finding centroids.
We have all ready seen how to graph functions of two variables:
using the
command. Now let's
look at how we can use
to graph "parametric surfaces". To get started let's look at some 2D examples.
| > |
| > |
| > |
So we have plotted part of a parabola. Now let's parametrize this curve. Parametrization can
be very tricky in general, but in the case we are looking at a curve of the form:
it's
quite simple. Using
as our parameter, we simply choose:
and
.
Now we can graph our piece of the parabola using parametric equations.
| > |
In much the same way, we can parametrize any surface of the form:
using
two parameters (say
and
) as follows:
,
, and
.
We can plot these surfaces using
either in the "old" way or the "new" (parametric) way.
For Example:
| > |
![]()
![]()
| > |
| > |
| > |
It is also important to note that so far we have been plotting surfaces defined over a rectangle.
In the example above we are graphing over the rectangle:
.
Maple can handle plots defined over "type I" or "type II" regions. For example, let's graph
over the region
(inside
a circle centered at the origin with radius 4).
The region
is both "type I" and "type II", let's consider it as "type II". We find bounds for
in terms of
and then constant
bounds.
| > |
| > |
So we get the bounds:
and
.
| > |
Of course we can do far more with parametric plots. Consider the sphere centered at the origin with radius 5.
In rectangular coordinates it is described by
, but in spherical coordinates we have
the much simpler equation "
". Using these coordinates, we see that:
,
, and
where
and
.
Let's plot our sphere using "parametric plot3d".
| > |
Notice that this plot looks much nicer than what we got in previous labs using
!
Let's use this new tool to plot the region of integration for problem #31 in section 15.7.
In this problem we are supposed to rewrite the integral:
as equivalent iterated integrals in the 5 other orders.
We are integrating over the solid region bounded by
,
,
, and
.
[It turns out that the other bounds (the upper bounds on the outter two integrals):
and
are extraneous. If we plot them along with the bounds listed above, they will just make it harder to
"see" what's going on.]
Let's simultaneously plot all of these surfaces and then make the proper restrictions to get a plot
of our "mystery" solid.
First, the two surfaces:
and
which make up the "bottom" and "top" of our solid.
| > |
| > |
Next, the front and back. These surfaces should be of the form:
(if we wanted to
plot "sides", we should have surfaces of the form:
). This means we should plot:
(the back) and
(the front -- we got this by solving
for
).
| > |
| > |
| > |
From this we can see how to "cut off" irrelevant parts of our surfaces.
| > |
| > |
| > |
| > |
| > |
Using this graph, we can better "see" how to write down the remaining 5 iterated integrals.
Let's assume the function is
and then compute all 6 iterated integrals.
[If our answers are right, we should get the same result each time.]
Let's "squash out" the
-direction and see what region in the
-plane with which we are dealing.
| > |
We begin by computing the triple integral in the original order:
| > |
Next:
| > |
In the next two integrals we will place
first, so let's see what region of the
-plane we are dealing with when the
's are "squashed out".
| > |
Next:
| > |
Next:
| > |
In the final two integrals we will place
first, so let's see what region of the
-plane we are dealing with when the
's are "squashed out".
| > |
Next:
| > |
Next:
| > |
We have seen how Maple can help us visualize 3D (and 2D) regions of integration.
Now let's make Maple help us compute Jacobians and preform change of variables
for multiple integrals.
Let's make Maple compute the Jacobian for spherical coordinates.
[The following command spits out a "Jacobian matrix" and the "Jacobian determinant".
We just need the latter. Since the command spits out a sequence of answers, we
put a sequence of labels on the left hand side of the assignment (i.e. "
").]
| > |
![(Typesetting:-mprintslash)([M, J := Matrix([[cos(theta)*sin(phi), -rho*sin(theta)*sin(phi), rho*cos(theta)*cos(phi)], [sin(theta)*sin(phi), rho*cos(theta)*sin(phi), rho*sin(theta)*cos(phi)], [cos(phi)...](images/math251-spring2007-lab3_background_151.gif)
![]()
Don't forget to simplify the Jacobian...
| > |
Let's compute the centroid of the "bumpy sphere" which is described by the
equation
(in spherical coordinates).
| > |
| > |
Looking at the sphere we might guess that the centroid is the origin.
Let's verify this by computing some integrals.
First, the volume of the interior
of the bumpy sphere is given by:
where
is the interior of the bumpy sphere described in spherical coordinates.
Thus we have...
| > |
Next, we must compute the moments about the
,
, and
planes.
For example:
(since
and the absolute value of the Jacobian is
).
| > |
| > |
| > |
Then the centroid is:
which is...
| > |
The origin...just as we suspected!