



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




Math 108, Lab 10: Functions of Several Variables
Today’s lab is designed to illustrate how Maple can handle graphs of several variable functions and locate their
max and min points using the derivative tests we studied in class.
Defining multi-variable formulas.
There is nothing special about defining formulas that use several different variables at the same time. For
example, the volume of a vertical cylinder with height
and base radius is given by the formula
which we can enter in MAPLE as
;
To evaluate that formula when and
we enter
;
and that gives us ./+. To get a decimal value for that answer, we enter
;
and we get 37.69911185.
Graphing Multi-variable Functions
The graph of a formula that depends on two variables 4 and 5 is a surface floating in space. Above each point
of the (x,y) plane we plot a dot in space, with height above or below the (x,y) plane computed from the given
formula. Whether the variables are called and
rather than 4 and 5 does not matter to MAPLE. Let’s start with
the volume formula
that we already entered above. Enter
;
and what you see looks like a piece of bent screen, slightly colored, hanging in space. Move your mouse pointer
to the white space near the graph and click. A black edge appears around the graph. Now touch the graph with
your mouse pointer and grab it, moving the pointer as if you wanted to rotate the drawing. The figure will rotate
before your eyes, allowing you to change perspectives at will. That is pretty amazing.
There are many, many options that you can invoke with the <
?J@ command. For example, enter
What you see is a more brightly colored figure, where the darker hues correspond to lower points on the graph,
and the lighter hues correspond to higher points. In other words, the z-value controls the hue, with higher z-values
giving lighter hues. (Think of the temperature maps that you see on television weather forecasts.) You also see a
family of black lines on the graph. These black lines are contour lines, and all points on a given black contour line
have the same z-height above the xy base plane. The normal axes in this graph are replaced by a boxed coordinate
system. Origin is not necessarily at a corner of the box. To find origin, you need to find the point where r = 0 and
h = 0, and the vertical height z = 0. What you see below is a printout of the graph we are working with, rotated
significantly from the position that you first saw. Origin lies at the bottom left corner of the boxed axes.
In the following figure, you will notice one other thing about the plot command that appears just before the
graph: it included the option “color = yellow” which had the effect of making the graph monochromatic. That is
a worthwhile trick to remember when you are printing on a black and white printer – three dimensional figures
print much better when the printer is not confused by having to deal with many colors, which it renders as various
shades of grey with the result that the print out usually ends up far too dark. On the next page you can see the
printout when the surface above is printed on a black and white printer.
A surface printed by MAPLE
5
.JDEDG.J'B5
.JDEDG.J'K!L;M
–0. 0
1
x
0
1
y
0
1
Now shift the graph by rotating it, until you can understand the graph in your mind and until you can see where
origin is.
Partial Derivatives
Let’s continue using the formula
(^5)
from the previous section. Begin by entering
and we get +46$?.
5
. From class, we know that what MAPLE just did was to find the partial derivative of
with respect to 4. If we wanted the partial derivative with respect to 5 , we would write
;
and we would get
+4 5.
Just as in single variable calculus, there are second derivatives. Unfortunately there are four possibilities: for
example, do you want the partial derivative with respect to y of the partial derivative with respect to x, or do you
want the partial derivative with respect to y of the partial derivative with respect to y? To keep the four possibilities
straight, you need a rational way of naming them.
The last two, <
5 and <
%4 , are called “mixed second partials”. In this case, they turned out to be
the same formula, even though they came from quite different first partials. If you make up examples at random
(subject only to the constraint that every formula must be continuous), you will see that happen over and over. To
and that looks pretty much like a hilltop. But the other candidate (2,3) is trickier. Enter
The resulting graph looks like it might have a low point directly above the candidate (2,3), but it’s a little hard
to tell. One approach is to expand the plotting intervals to 4 .JD (DGD D' 5 (DDGD (D
. Now it looks more like a
saddle point.
Luckily there is another way. Imagine a vertical plane through the candidate (2,3), say the plane 4 . That
plane slices through the surface, and the intersection of the slicing plane and the surface is a curve. To see the
details of that curve, we graph one of its cousins in the plane. Enter
and we get a formula whose only variable is 5. Let’s see what the formula
does for values of 5 near 3. Enter
and we see a parabolic curve opening downward. Let’s try another slice: enter
and we get a formula that has 4 as its only variable. Let’s see what the formula
does for values of 4 near 2.
Enter
What we see is a curve opening upward. But that is very bad. If the candidate (2,3) really did give us a low
point on the graph of
, then we would expect all slices of the graph through the candidate to be concave up. We
conclude that the candidate (2,3) does not give a low point (and it does not give a high point either).
There is an even better way using our second derivative test from class. When we enter
1 % )@%
$@Q
and then
(1% -,IH
we get -24. Because this is less than zero, we know from class that the candidate (2,3) does not give a max or a
min.
For the sake of completeness, let’s see what the second derivative test says about the candidate (-2,3). We
enter
('B5 7*'
1 % -,IH
and we get a value of +24. Therefore we do have a max or min at 4 8('B5 and to see which we compute
('B5 7*' @Q
which gives a value of -12. We now know from class that we have a maximum value at 4
('B5
Let’s consider one final example. Enter
We use these two partial derivatives to find candidates for where
might have maximum or minimum values.
and we get three candidate points, namely $C*' C
and $?.A'
.
. We do not yet know which, if any, give
maximum or minimum values for the function
. We use the Dval test. First find the Dval formula and then
evaluate Dval at each candidate.
1 % )@%
$@Q
(1% -,IH
Because this value is positive, we know that $&4 ' 5
gives either a maximum or a minimum for the function
R
. To determine which it is, we enter
which is negative, so our Dval test promises that we will get a maximum at $M.J'0.
.
By way of contrast, try to test the candidate $-C*' C
using Dval. Because
(1% -,IH
gives a value of zero, the Dval test in inconclusive.
To see the graph of
, we enter
(DGD ('B5
(DGD ('K!L;M
and we see a graph with hilltops above $M.J'0.
and $?.J'
.
and a saddle point above $C*'BC
.
Do not conclude that “Dval inconclusive” means “saddle point.” For example, if you examine
you will find that $C*'BC
is a candidate for maximum/minimum, that
1 % $ -C*' C
C (so the Dval test is
inconclusive), and yet the graph of
shows that
has a minimum point above $C(' C
.
There is no homework associated with this lab that you need to turn in, but if you want to explore more of
what Maple can do for you, find and classify all candidates for max/min of the functions.
(a)
5
.
(b)