The purpose of this lab is to acquaint you with techniques for finding and classifying local and global extreme values of functions of two variables.

A crucial first step in solving such problems is being able to find and classify local extreme points of a function. What we mean by the term local extreme values is contained in the following definition.

Finding and classifying the local extreme values of a function requires several steps. First, the partial derivatives must be computed. Then the critical points must be solved for, which is not always a simple task. Finally, each critical point must be classified as a local maximum, local minimum, or neither. The following examples are intended to help you learn how to use Maple to simplify these tasks.

To compute partial derivatives in Maple, it is probably simplest to
use the `diff` command. It is possible to use the `D` command
for partial derivatives, but it is more complicated. The following
examples show how to compute (in order) the partial
derivatives , , , , and of the
function
.

> f := (x,y) -> exp(-x^2)*cos(y);

> diff(f(x,y),x);

> diff(f(x,y),y);

> diff(f(x,y),x,x);

> diff(f(x,y),x,y);

> diff(f(x,y),y,y);

Finding critical points can often be accomplished by using the

> solve({diff(f(x,y),x) =0 ,diff(f(x,y),y) = 0},{x,y});

Notice that you have to give the

The solve command doesn't always do the job. For example, it only reported two critical points above. It turns out, however, that the function has an infinite number to critical points of the form , , where is any integer. Having an infinite number of critical points often happens when trig functions are involved, so you need to watch out for it.

The `solve` command attempts to solve equations
analytically. Unfortunately, there are some
equations that just can't be solved analytically. When Maple can't
solve a set of equations analytically, it gives no output from the
`solve` command.s

If the `solve` command doesn't give the results you desire, there
are alternatives. One possibility is to try to solve one of the
equations for one of the variables in terms of the other, and then
substitute into the other equation. This can work very well if it is
easy to solve for one of the variables. Another, more general, method
is to solve the equations numerically using the `fsolve`
command. The main drawbacks are that the `fsolve` command only
finds one solution at a time and that you usually have to have an idea
of where the solution is. For example, if you attempt to use the `fsolve` command on our example without specifying where to look for
the solution, Maple can't solve the equation, as shown below.

> fsolve({diff(f(x,y),x) =0 ,diff(f(x,y),y) = 0},{x,y});

Error, (in fsolve/gensys) did not convergeOn the other hand, we can solve for the critical point at , if we specify ranges for and containing the desired critical point as follows.

> fsolve({diff(f(x,y),x) =0 ,diff(f(x,y),y) = 0},{x,y}, x=-1..1,y=3.5..7);

Locating (if you have to use `fsolve`) and classifying critical
points is probably best done with
the `plot3d` command. By changing the plot ranges and using
contours, you should be able to do this fairly easily.

The basic theorem on the existence of global maximum and minimum values is the following.

- Describe the contours of a function near a critical point that is a local extremum. How do they differ from the contours near a critical point that is a saddle point? Give an example of each type.
- Find and classify the critical points for the following
functions.
- .
- .
- .

- Consider the function

Find the absolute extrema of this function on the following domains.- The rectangle , .
- The rectangle , .
- The set of points in the plane satisfying .
Note that if you want to plot a function over a region that
is bounded by two curves and for
, the Maple
`plot3d`command is> plot3d(f(x,y),x=a..b,y=g(x)..h(x));

For more information, see the help page for`plot3d`

- What is the maximum possible volume of a rectangular box inscribed in a hemisphere of radius ? You may assume that one face of the box lies in the planar base of the hemisphere.

2000-12-01