startsection section10mm-.5 Discussion 19 Critical Points
In this discussion, we investigate the relative extrema of a function of two variables. In one variable calculus we began our analysis of extreme points by locating the critical points of the function, that is, points where the derivative is zero. We have an analogous definition for functions of two variables.
We have already seen in class that we can classify these critical points as relative maxima, relative minima or saddle points by considering the contour plot of f in an open set containing the critical point. In this discussion we will develop another graphical technique for classifying the critical points of f.
Recall that if f is a differentiable function defined on the open set
, the gradient vector of f,
is defined at every point
. Thus we can define
a vector field on , called the gradient vector field
of f, whose coordinate functions are the first partial derivatives
of f. That is,
The goal in this discussion is to use a classification of the critical points of the vector field to determine a classification of critical points of f.
startsection subsection10mm.5 Exercises
startsection section10mm-.5 Discussion 24 Using Maple to Find Critical Points
This is a LATEXversion of a Maple worksheet. The worksheet is available in the directory
/home/stu/courses/math141.
startsection subsection10mm.5 Introduction
In this discussion we would like to use both the graphical and numerical capabilities of Maple to locate and identify critical points of functions of two variables.
As we have seen in the text, a critical point of a differentiable
function
f = f(x,y) of two variables is a point for which the gradient
vector is equal to zero. That is, (x,y) satsifies:
fsolve
, which utilizes a modified form of the
Newton-Raphson method. Unlike newrap, fsolve
does not
give the user control of the number of iterates used to produce the
solution. In the following example, we will see how to use fsolve
and the built-in Maple plotting commands.
startsection subsection10mm.5 An Example
Let us use the Maple plotting commands and fsolve
to find and identify
the critical points of the function.
f:=(x,y)-> y^3 - 2*y -5 - 3*x^2;In order to make a preliminary guess about the number of critical points, let us examine a contour plot of f. Note that we are confining our attention to the rectangle , so that initially we will only find critical points in this region. It is possible-though it is not the case for this function-that the region we choose to graph might not contain all the critical points of a function. Thus we might have to consider the behavior on different regions in order to find all the critical points.
contourplot(f(x,y),x=-2..2,y=-2..2);
Based upon the plot, we expect that f has a critical point located
at approximately (0,-.8) that is a maximum or minimum and a critical
point located at approximately (0, .8). In order to obtain a more
accurate approximation, we can employ fsolve
. The fsolve
command will solve a system of equations for several variables in a
specific region. A convenient way to do this is first define the set
of equations and then define the set of variables. Notice that we are
using the operator D
to compute the partial derivatives of f.
For example, D[1](f)
is the partial derivative of f with
respect to the first variable in the definition of f, which is xin this case.
eqns:={D[1](f)(x,y) = 0, D[2](f)(x,y)=0}; vars:={x,y};
The following use of fsolve
does not specify a region. Let us see what happens:
fsolve(eqns,vars);
This returns a single critical point that is approximately located at (0,-.8165). (Note that the full value to 10 decimal places is still only an approximation to a solution.) Apparently, this is the critical point that we located at (0,-.8). To find the other critical point, let us specify a domain.
fsolve(eqns,vars,y=0..1);This yields the other critical point which is approximately located at (0, .8165). Note that if the region is left unspecified, the numerical values generated by
fsolve
may fail to converge. To remedy
this problem, you must specify a region.
To identify the type of these critical points, we might use
contourplot
, but display more contours and focus our attention on region containing a critical point:
contourplot(f(x,y),x=-.5 .. .5,y=.5.. 1.5,contours=25);We see that the contours appear to form a family of hyperbolas, which indicates that the critical point is a saddle. We might also plot the graph of the function on the same region.
plot3d(f(x,y),x=-.5.. .5, y= .5 .. 1.5,axes = BOXED, style=PATCHCONTOUR,view=-6.4..-5);Notice in the preceding
plot3d
command we specified several options.
We chose the axes to appear as the frame of a box; we chose the plot
to be shaded and to display horizontal slices, and we restricted the
vertical portion of the plot to the interval [-6.4,-5]. This last
option is particularly useful since it can eliminate portions of the
graph whose z-values are not close to the value at the critical point.
In a similar manner we could examine the behavior of f in a region containing the other critical point. We would find that it is a local maximum.
In this case, it is apparent from the equations that f has no other critical points, so we are done.
startsection subsection10mm.5 Exercises
For each of the following functions, use Maple to locate and identify
all the critical points. As above, you should use the contour plot to
determine the approximate location of the critical points and then use
fsolve
to locate them more precisely. If you find that a critical
point is difficult to locate or identify, explain why the behavior of
the function made it difficult to locate.
Before starting the exercises be sure to load the plots package:
with(plots):When working with a new function, enter the following definitions after defining the function and before using fsolve.
eqns:={D[1](f)(x,y) = 0, D[2](f)(x,y)=0}: vars:={x,y}:When working with a new function, enter the following definitions.
f:=(x,y)-> -x^2*(x^2 - 4) + y^4 + x^2 + y^2:
f:=(x,y)-> sech((x+.5)^2 + y^2) + 2*sech((x-1)^2 + (y-2)^2):
f:=(x,y)->1/(1 + x^2 + (y-1)^2) - 2/(1 +(x-1)^2 + (y-x)^2);
startsection section10mm-.5 Discussion 25 The Second Derivative Test
In this discussion we will apply the second derivative test to two
functions. First, let us review the hypothesis of the second
derivative test. We must have that f is a twice
differentiable function of two variables and that (x0,y0) is a
critical point of f, that is,
. Let
startsection subsection10mm.5 Exercises For each of the following functions
(i) Compute the partial derivatives and .
(ii) Find the critical points of f.
(iii) Compute the second partial derivatives of f.
(iv) Use the second derivative test to classify the non-degenerate critical points of f.
(v) If there are any degenerate critical points, use another method to determine if these critical points are local maxima, local minima or saddle points.
startsection section10mm-.5 Discussion 26 Constrained Optimization
We have so far developed geometric and symbolic methods to locate and classify relative extrema of a differentiable function f on an open set in . In this discussion, we want to extend these techniques so that we can locate extrema on a closed set consisting of an open set and its boundary curve . The extrema for f on must occur at either the relative extrema of f on or at the relative extrema of f on . Since we already have techniques for finding relative extrema on , we need only develop a technique for locating relative extrema on . Here we will consider the case where , the boundary of , is a set of points satisfying an equation of the form g(x,y) = c, where g is a differentiable function. We will call a condition of this type a constraint and speak of optimizing fsubject to a constraint.
In this discussion we will approach the problem of locating the extrema of f subject to the constraint g(x,y) = c by considering the relationship between the level sets of f and the curve g(x,y) = c. Our aim is to give a graphical characterization of the extreme points of f on this boundary curve, and to use this to produce a symbolic characterization that will lead to a symbolic solution of the problem.
startsection subsection10mm.5 Exercises
startsection section10mm-.5 Discussion 27 Lagrange Multipliers
In this discussion we will work through examples of finding the extreme values of a function on a closed set . Let f be a differentiable function defined on an open set containing . We will locate the critical points of f on , the interior of by solving the equation . We will then use the method of Lagrange multipliers to locate the extreme values of f on the boundary . Let us recall the statement of the method.
Assume is described by the equation
g(x,y) = c, where g is a differentiable
function and
on .
Then the extreme values of f on occur at
solutions to the system of equations
= | |||
= | |||
g(x,y) | = | c. |
startsection subsection10mm.5 Exercises
Attached to the discussion sheet are plots for the following three constrained optimization problems. Each plot consists of the contours of a function f and the curve which is the boundary of . For each of these problems, locate the critical points of f on , the interior of the closed set , on the plot and then solve the equation to determine these points symbolically. Then use the plot to locate the relative and absolute extreme points of f on the boundary curve and write out and solve the Lagrange multiplier system of equations in order to find the coordinates of the extreme points of f subject to the constraint. Keep in mind that while you cannot find exact values for the coordinates of the extreme points from the contour plot, you can use the plot to determine the number and type of the extreme points.