Skip to main content
Library homepage
 

Text Color

Text Size

 

Margin Size

 

Font Type

Enable Dyslexic Font
Mathematics LibreTexts

2.9: Maximum and Minimum Values

( \newcommand{\kernel}{\mathrm{null}\,}\)

One of the core topics in single variable calculus courses is finding the maxima and minima of functions of one variable. We'll now extend that discussion to functions of more than one variable 1. Rather than leaping into the deep end, we'll not be too ambitious and concentrate on functions of two variables. That being said, many of the techniques work more generally. To start, we have the following natural extensions to some familiar definitions.

Definition 2.9.1

Let the function f(x,y) be defined for all (x,y) in some subset R of R2. Let (a,b) be a point in R.

  • (a,b) is a local maximum of f(x,y) if f(x,y)f(a,b) for all (x,y) close to (a,b). More precisely, (a,b) is a local maximum of f(x,y) if there is an r>0 such that f(x,y)f(a,b) for all points (x,y) within a distance r of (a,b).
  • (a,b) is a local minimum of f(x,y) if f(x,y)f(a,b) for all (x,y) close to (a,b).
  • Local maximum and minimum values are also called extremal values.
  • (a,b) is an absolute maximum or global maximum of f(x,y) if f(x,y)f(a,b) for all (x,y) in R.
  • (a,b) is an absolute minimum or global minimum of f(x,y) if f(x,y)f(a,b) for all (x,y) in R.

Local Maxima and Minima

One of the first things you did when you were developing the techniques used to find the maximum and minimum values of f(x) was ask yourself 2 

  • Suppose that the largest value of f(x) is f(a). What does that tell us about a?

After a little thought you answered

  • If the largest value of f(x) is f(a) and f is differentiable at a, then f(a)=0.

localMaxA.svg

Let's recall why that's true. Suppose that the largest value of f(x) is f(a). Then for all h>0,

f(a+h)f(a)f(a+h)f(a)0f(a+h)f(a)h0if h>0

Taking the limit h0 tells us that f(a)0. Similarly 3, for all h<0,

f(a+h)f(a)f(a+h)f(a)0f(a+h)f(a)h0if h<0

Taking the limit h0 now tells us that f(a)0. So we have both f(a)0 and f(a)0 which forces f(a)=0.

You also observed at the time that for this argument to work, you only need f(x)f(a) for all x's close to a, not necessarily for all x's in the whole world. (In the above inequalities, we only used f(a+h) with h small.) Since we care only about f(x) for x near a, we can refine the above statement.

  • If f(a) is a local maximum for f(x) and f is differentiable at a, then f(a)=0.

Precisely the same reasoning applies to minima.

  • If f(a) is a local minimum for f(x) and f is differentiable at a, then f(a)=0.

Let's use the ideas of the above discourse to extend the study of local maxima and local minima to functions of more than one variable. Suppose that the function f(x,y) is defined for all (x,y) in some subset R of R2, that (a,b) is point of R that is not on the boundary of R, and that f has a local maximum at (a,b). See the figure below.

max.svg

Then the function f(x,y) must decrease in value as (x,y) moves away from (a,b) in any direction. No matter which direction d we choose, the directional derivative of f at (a,b) in direction d must be zero or smaller. Writing this in mathematical symbols, we get

Ddf(a,b)=f(a,b)d|d|0

And the directional derivative of f at (a,b) in the direction d also must be zero or negative.

Ddf(a,b)=f(a,b)d|d|0which implies thatf(a,b)d|d|0

As nablaf(a,b)d|d| must be both positive (or zero) and negative (or zero) at the same time, it must be zero. In particular, choosing d=ıı^ forces the x component of nablaf(a,b) to be zero, and choosing d=ȷȷ^ forces the y component of f(a,b) to be zero. We have thus shown that f(a,b)=0. The same argument shows that f(a,b)=0 when (a,b) is a local minimum too. This is an important and useful result, so let's theoremise it.

Theorem 2.9.2

Let the function f(x,y) be defined for all (x,y) in some subset R of R2. Assume that

  • (a,b) is a point of R that is not on the boundary of R and
  • (a,b) is a local maximum or local minimum of f and that
  • the partial derivatives of f exist at (a,b).

Then

f(a,b)=0.

Definition 2.9.3

Let f(x,y) be a function and let (a,b) be a point in its domain. Then

  • if f(a,b) exists and is zero we call (a,b) a critical point (or a stationary point) of the function, and
  • if f(a,b) does not exist then we call (a,b) a singular point of the function.
Warning 2.9.4

Note that some people (and texts) combine both of these cases and call (a,b) a critical point when either the gradient is zero or does not exist.

Warning 2.9.5

Theorem 2.9.2 tells us that every local maximum or minimum (in the interior of the domain of a function whose partial derivatives exist) is a critical point. Beware that it does not 4 tell us that every critical point is either a local maximum or a local minimum.

In fact, we shall see later 5, in Examples 2.9.13 and 2.9.15, critical points that are neither local maxima nor a local minima. None-the-less, Theorem 2.9.2 is very useful because often functions have only a small number of critical points. To find local maxima and minima of such functions, we only need to consider its critical and singular points. We'll return later to the question of how to tell if a critical point is a local maximum, local minimum or neither. For now, we'll just practice finding critical points.

Example 2.9.6. f(x,y)=x22xy+2y2+2x6y+12

Find all critical points of f(x,y)=x22xy+2y2+2x6y+12.

Solution

To find the critical points, we need to find the gradient. To find the gradient we need to find the first order partial derivatives. So, as a preliminary calculation, we find the two first order partial derivatives of f(x,y).

fx(x,y)=2x2y+2fy(x,y)=2x+4y6

So the critical points are the solutions of the pair of equations

2x2y+2=02x+4y6=0

or equivalently (dividing by two and moving the constants to the right hand side)

(E1)xy=1(E2)x+2y=3

This is a system of two equations in two unknowns (x and y). One strategy for a solving system like this is to

  • First use one of the equations to solve for one of the unknowns in terms of the other unknown. For example, (E1) tells us that y=x+1. This expresses y in terms of x. We say that we have solved for y in terms of x.
  • Then substitute the result, y=x+1 in our case, into the other equation, (E2). In our case, this gives

    x+2(x+1)=3x+2=3x=1

  • We have now found that x=1, y=x+1=2 is the only solution. So the only critical point is (1,2). Of course it only takes a moment to verify that f(1,2)=0,0. It is a good idea to do this as a simple check of our work.

An alternative strategy for solving a system of two equations in two unknowns, like (E1) and (E2), is to

  • add equations (E1) and (E2) together. This gives

    (E1)+(E2):  (11)x+(1+2)y=1+3y=2

    The point here is that adding equations (E1) and (E2) together eliminates the unknown x, leaving us with one equation in the unknown y, which is easily solved. For other systems of equations you might have to multiply the equations by some numbers before adding them together.
  • We now know that y=2. Substituting it into (E1) gives us

    x2=1x=1

  • Once again (thankfully) we have found that the only critical point is (1,2).

This was pretty easy because we only had to solve linear equations, which in turn was a consequence of the fact that f(x,y) was a polynomial of degree two. Here is an example with some slightly more challenging algebra.

Example 2.9.7. f(x,y)=2x36xy+y2+4y

Find all critical points of f(x,y)=2x36xy+y2+4y.

Solution

As in the last example, we need to find where the gradient is zero, and to find the gradient we need the first order partial derivatives.

fx=6x26yfy=6x+2y+4

So the critical points are the solutions of

6x26y=06x+2y+4=0

We can rewrite the first equation as y=x2, which expresses y as a function of x. We can then substitute y=x2 into the second equation, giving

6x+2y+4=06x+2x2+4=0x23x+2=0(x1)(x2)=0x=1 or 2

When x=1, y=12=1 and when x=2, y=22=4. So, there are two critical points: (1,1), (2,4).

Alternatively, we could have also used the second equation to write y=3x2, and then substituted that into the first equation to get

6x26(3x2)=0x23x+2=0

just as above.

And here is an example for which the algebra requires a bit more thought.

Example 2.9.8. f(x,y)=xy(5x+y15)

Find all critical points of f(x,y)=xy(5x+y15).

Solution

The first order partial derivatives of f(x,y)=xy(5x+y15) are

fx(x,y) = y(5x+y15)+xy(5) = y(5x+y15)+y(5x) = y(10x+y15)fy(x,y) = x(5x+y15)+xy(1) = x(5x+y15)+x(y) = x(5x+2y15)

The critical points are the solutions of fx(x,y)=fy(x,y)=0. That is, we need to find all x,y that satisfy the pair of equations

(E1)y(10x+y15)=0(E2)x(5x+2y15)=0

The first equation, y(10x+y15)=0, is satisfied if at least one of the two factors y, (10x+y15) is zero. So the first equation is satisfied if at least one of the two equations

(E1a)y=0(E1b)10x+y=15

is satisfied. The second equation, x(5x+2y15)=0, is satisfied if at least one of the two factors x, (5x+2y15) is zero. So the second equation is satisfied if at least one of the two equations

(E2a)x=0(E2b)5x+2y=15

is satisfied.

So both critical point equations (E1) and (E2) are satisfied if and only if at least one of (E1a), (E1b) is satisfied and in addition at least one of (E2a), (E2b) is satisfied. So both critical point equations (E1) and (E2) are satisfied if and only if at least one of the following four possibilities hold.

  • (E1a) and (E2a) are satisfied if and only if x=y=0
  • (E1a) and (E2b) are satisfied if and only if y=0, 5x+2y=15y=0, 5x=15
  • (E1b) and (E2a) are satisfied if and only if 10x+y=15, x=0y=15, x=0
  • (E1b) and (E2b) are satisfied if and only if 10x+y=15, 5x+2y=15. We can use, for example, the second of these equations to solve for x in terms of y: x=15(152y). When we substitute this into the first equation we get 2(152y)+y=15, which we can solve for y. This gives 3y=1530 or y=5 and then x=15(152×5)=1.

In conclusion, the critical points are (0,0), (3,0), (0,15) and (1,5).

A more compact way to write what we have just done is

fx(x,y)=0andfy(x,y)=0y(10x+y15)=0andx(5x+2y15)=0{y=0 or 10x+y=15}and{x=0 or 5x+2y=15}{y=0, x=0} or {y=0, 5x+2y=15} or {10x+y=15, x=0} or {10x+y=15, 5x+2y=15}{x=y=0} or {y=0, x=3} or {x=0, y=15} or {x=1, y=5}

Let's try a more practical example — something from the real world. Well, a mathematician's “real world”. The interested reader should search-engine their way to a discussion of “idealisation”, “game theory” “Cournot models” and “Bertrand models”. But don't spend too long there. A discussion of breweries is about to take place.

Example 2.9.9

In a certain community, there are two breweries in competition 6, so that sales of each negatively affect the profits of the other. If brewery A produces x litres of beer per month and brewery B produces y litres per month, then the profits of the two breweries are given by

P=2x2x2+y2106Q=2y4y2+x22×106

respectively. Find the sum of the two profits if each brewery independently sets its own production level to maximize its own profit and assumes that its competitor does likewise. Then, assuming cartel behaviour, find the sum of the two profits if the two breweries cooperate so as to maximize that sum 7.

Solution

If A adjusts x to maximize P (for y held fixed) and B adjusts y to maximize Q (for x held fixed) then x and y are determined by the equations

(E1)Px=24x106=0(E2)Qy=28y2×106=0

Equation (E1) yields x=12106 and equation (E2) yields y=12106. Knowing x and y we can determine P, Q and the total profit

P+Q=2(x+y)1106(52x2+3y2)=106(1+15834)=58106

On the other hand if (A,B) adjust (x,y) to maximize P+Q=2(x+y)1106(52x2+3y2), then x and y are determined by

(E1)(P+Q)x=25x106=0(E2)(P+Q)y=26y106=0

Equation (E1) yields x=25106 and equation (E2) yields y=13106. Again knowing x and y we can determine the total profit

P+Q=2(x+y)1106(52x2+3y2)=106(45+232513)=1115106

So cooperating really does help their profits. Unfortunately, like a very small tea-pot, consumers will be a little poorer 8.

Moving swiftly away from the last pun, let's do something a little more geometric.

Example 2.9.10

Equal angle bends are made at equal distances from the two ends of a 100 metre long fence so the resulting three segment fence can be placed along an existing wall to make an enclosure of trapezoidal shape. What is the largest possible area for such an enclosure?

fenceA.svg

Solution

This is a very geometric problem (fenced off from pun opportunities), and as such we should start by drawing a sketch and introducing some variable names.

fence.svg                fenceB.svg

The area enclosed by the fence is the area inside the blue rectangle (in the figure on the right above) plus the area inside the two blue triangles.

A(x,θ)=(1002x)xsinθ+212xsinθxcosθ=(100x2x2)sinθ+x2sinθ cosθ

To maximize the area, we need to solve

0=Ax=(1004x)sinθ+2xsinθcosθ0=Aθ=(100x2x2)cosθ+x2{cos2θsin2θ}

Note that both terms in the first equation contain the factor sinθ and all terms in the second equation contain the factor x. If either sinθ or x are zero the area A(x,θ) will also be zero, and so will certainly not be maximal. So we may divide the first equation by sinθ and the second equation by x, giving

(E1)(1004x)+2xcosθ=0(E2)(1002x)cosθ+x{cos2θsin2θ}=0

These equations might look a little scary. But there is no need to panic. They are not as bad as they look because θ enters only through cosθ and sin2θ, which we can easily write in terms of cosθ. Furthermore we can eliminate cosθ by observing that the first equation forces cosθ=1004x2x and hence sin2θ=1cos2θ=1(1004x)24x2. Substituting these into the second equation gives

(1002x)1004x2x+x[(1004x)22x21]=0(1002x)(1004x)+(1004x)22x2=06x2200x=0x=1003cosθ=100/3200/3=12θ=60

and the maximum area enclosed is

A=(10010032100232)32 + 1210023232 = 25003

Now here is a very useful (even practical!) statistical example — finding the line that best fits a given collection of points.

Example 2.9.11. Linear regression

An experiment yields n data points  (xi,yi), i=1,2,,n. We wish to find the straight line  y=mx+b  which “best” fits the data.

regression.svg

The definition of “best” is “minimizes the root mean square error”, i.e. minimizes

E(m,b)=i=1n(mxi+byi)2

Note that

  • term number i in E(m,b) is the square of the difference between yi, which is the ith measured value of y, and [mx+b]x=xi, which is the approximation to yi given by the line y=mx+b.
  • All terms in the sum are positive, regardless of whether the points (xi,yi) are above or below the line.

Our problem is to find the m and b that minimizes E(m,b). This technique for drawing a line through a bunch of data points is called “linear regression”. It is used a lot 9  10. Even in the real world — and not just the real world that you find in mathematics problems. The actual real world that involves jobs.

Solution

We wish to choose m and b so as to minimize E(m,b). So we need to determine where the partial derivatives of E are zero.

0=Em=i=1n2(mxi+byi)xi=m[i=1n2xi2]+b[i=1n2xi][i=1n2xiyi]0=Eb=i=1n2(mxi+byi)=m[i=1n2xi]+b[i=1n2][i=1n2yi]

There are a lot of symbols here. But remember that all of the xi's and yi's are given constants. They come from, for example, experimental data. The only unknowns are m and b. To emphasize this, and to save some writing, define the constants

Sx=i=1nxiSy=i=1nyiSx2=i=1nxi2Sxy=i=1nxiyi

The equations which determine the critical points are (after dividing by two)

(E1)Sx2m+Sxb=Sxy(E2)Sxm+nb=Sy

These are two linear equations on the unknowns m and b. They may be solved in any of the usual ways. One is to use (E2) to solve for b in terms of m

b=1n(SySxm)

and then substitute this into (E1) to get the equation

Sx2m+1nSx(SySxm)=Sxy(nSx2Sx2)m=nSxySxSy

for m. We can then solve this equation for m and substitute back into (E3) to get b. This gives

m=nSxySxSynSx2Sx2b=SynnSx2Sx2nSx2Sx2SxnnSxySxSynSx2Sx2=nSySx2nSxSxyn(nSx2Sx2)=SxSxySySx2nSx2Sx2

Another way to solve the system of equations is

n(E1)Sx(E2):[nSx2Sx2]m=nSxySxSySx(E1)+Sx2(E2):[nSx2Sx2]b=SxSxy+SySx2

which gives the same solution.

So given a bunch of data points, it only takes a quick bit of arithmetic — no calculus required — to apply the above formulae and so to find the best fitting line. Of course while you don't need any calculus to apply the formulae, you do need calculus to understand where they came from. The same technique can be extended to other types of curve fitting problems. For example, polynomial regression.

The Second Derivative Test

Now let's start thinking about how to tell if a critical point is a local minimum or maximum. Remember what happens for functions of one variable. Suppose that x=a is a critical point of the function f(x). Any (sufficiently smooth) function is well approximated, when x is close to a, by the first few terms of its Taylor expansion

f(x)=f(a)+f(a)(xa)+12f(a)(xa)2+13!f(3)(a)(xa)3+

As a is a critical point, we know that f(a)=0 and

f(x)=f(a)+12f(a)(xa)2+13!f(3)(a)(xa)3+

If f(a)0, f(x) is going to look a lot like f(a)+12f(a)(xa)2 when x is really close to a. In particular

  • if f(a)>0, then we will have f(x)>f(a) when x is close to (but not equal to) a, so that a will be a local minimum and
  • if f(a)<0, then we will have f(x)<f(a) when x is close to (but not equal to) a, so that a will be a local maximum, but
  • if f(a)=0, then we cannot draw any conclusions without more work.

A similar, but messier, analysis is possible for functions of two variables. Here are some simple quadratic examples that provide a warmup for that messier analysis.

Example 2.9.12. f(x,y)=x2+3xy+3y26x3y6

Consider f(x,y)=x2+3xy+3y26x3y6. The gradient of f is

f(x,y)=(2x+3y6)ıı^+(3x+6y3)ȷȷ^

So (x,y) is a critical point of f if and only if

(E1)2x+3y=6(E2)3x+6y=3

Multiplying the first equation by 2 and subtracting the second equation gives

x=9

Then substituting x=9 back into the first equation gives

2×9+3y=6y=4

So f(x,y) has precisely one critical point, namely (9,4).

Now let's try to determine if f(x,y) has a local minimum, or a local maximum, or neither, at (9,4). A good way to determine the behaviour of f(x,y) for (x,y) near (9,4) is to make the change of variables 11

x=9+Δxy=4+Δy

and study the behaviour of f for Δx and Δy near zero.

f(9+Δx,4+Δy)=(9+Δx)2+3(9+Δx)(4+Δy)+3(4+Δy)26(9+Δx)3(4+Δy)6=(Δx)2+3ΔxΔy+3(Δy)227

And a good way to study the sign of quadratic expressions like (Δx)2+3ΔxΔy+3(Δy)2 is to complete the square. So far you have probably just completed the square for quadratic expressions that involve only a single variable. For example

x2+3x+3=(x+32)294+3

When there are two variables around, like Δx and Δy, you can just pretend that one of them is a constant and complete the square as before. For example, if you pretend that Δy is a constant,

(Δx)2+3ΔxΔy+3(Δy)2=(Δx+32Δy)2+(394)(Δy)2=(Δx+32Δy)2+34(Δy)2

To this point, we have expressed

f(9+Δx,4+Δy)=(Δx+32Δy)2+34(Δy)227

As the smallest values of (Δx+32Δy)2 and 34(Δy)2 are both zero, we have that

f(x,y)=f(9+Δx,4+Δy)27=f(9,4)

for all (x,y) so that (9,4) is both a local minimum and a global minimum for f.

You have already encountered single variable functions that have a critical point which is neither a local max nor a local min. See Example 3.5.9 in the CLP-1 text. Here are a couple of examples which show that this can also happen for functions of two variables. We'll start with the simplest possible such example.

Example 2.9.13. f(x,y)=x2y2

The first partial derivatives of f(x,y)=x2y2 are fx(x,y)=2x and fy(x,y)=2y. So the only critical point of this function is (0,0). Is this a local minimum or maximum? Well let's start with (x,y) at (0,0) and then move (x,y) away from (0,0) and see if f(x,y) gets bigger or smaller. At the origin f(0,0)=0. Of course we can move (x,y) away from (0,0) in many different directions.

  • First consider moving (x,y) along the x-axis. Then (x,y)=(x,0) and f(x,y)=f(x,0)=x2. So when we start with x=0 and then increase x, the value of the function f increases — which means that (0,0) cannot be a local maximum for f.
  • Next let's move (x,y) away from (0,0) along the y-axis. Then (x,y)=(0,y) and f(x,y)=f(0,y)=y2. So when we start with y=0 and then increase y, the value of the function f decreases — which means that (0,0) cannot be a local minimum for f.

So moving away from (0,0) in one direction causes the value of f to increase, while moving away from (0,0) in a second direction causes the value of f to decrease. Consequently (0,0) is neither a local minimum or maximum for f. It is called a saddle point, because the graph of f looks like a saddle. (The full definition of “saddle point” is given immediately after this example.) Here are some figures showing the graph of f.

hyperbolic_paraboloid.svg            hypPara.svg

The figure below show some level curves of f. Observe from the level curves that

  • f increases as you leave (0,0) walking along the x axis
  • f decreases as you leave (0,0) walking along the y axis

hypParaLevel.svg

Approximately speaking, if a critical point (a,b) is neither a local minimum nor a local maximum, then it is a saddle point. For (a,b) to not be a local minimum, f has to take values bigger than f(a,b) at some points nearby (a,b). For (a,b) to not be a local maximum, f has to take values smaller than f(a,b) at some points nearby (a,b). Writing this more mathematically we get the following definition.

Definition 2.9.14

The critical point (a,b) is called a saddle point for the function f(x,y) if, for each r>0,

  • there is at least one point (x,y), within a distance r of (a,b), for which f(x,y)>f(a,b) and
  • there is at least one point (x,y), within a distance r of (a,b), for which f(x,y)<f(a,b).

Here is another example of a saddle point. This time we have to work a bit to see it.

Example 2.9.15. f(x,y)=x22xyy2+4y2

Consider f(x,y)=x22xyy2+4y2. The gradient of f is

f(x,y)=(2x2y)ıı^+(2x2y+4)ȷȷ^

So (x,y) is a critical point of f if and only if

2x2y=02x2y=4

The first equation gives that x=y. Substituting y=x into the second equation gives

2y2y=4x=y=1

So f(x,y) has precisely one critical point, namely (1,1).

To determine if f(x,y) has a local minimum, or a local maximum, or neither, at (1,1), we proceed as in Example 2.9.12. We make the change of variables

x=1+Δxy=1+Δy

to give

f(1+Δx,1+Δy)=(1+Δx)22(1+Δx)(1+Δy)(1+Δy)2+4(1+Δy)2=(Δx)22ΔxΔy(Δy)2

Completing the square,

f(1+Δx,1+Δy)=(Δx)22ΔxΔy(Δy)2=(ΔxΔy)22(Δy)2

Notice that f has now been written as the difference of two squares, much like the f in the saddle point Example 2.9.13.

  • If Δx and Δy are such that the first square (ΔxΔy)2 is nonzero, but the second square (Δy)2 is zero, then f(1+Δx,1+Δy)=(ΔxΔy)2>0=f(1,1). That is, whenever Δy=0 and ΔxΔy, then f(1+Δx,1+Δy)=(ΔxΔy)2>0=f(1,1).
  • On the other hand, if Δx and Δy are such that the first square (ΔxΔy)2 is zero but the second square (Δy)2 is nonzero, then f(1+Δx,1+Δy)=2(Δy)2<0=f(1,1). That is, whenever Δx=Δy0, then f(1+Δx,1+Δy)=2(Δy)2<0=f(1,1).

saddle.svg

So

  • f(x,y)>f(1,1) at all points on the blue line in the figure above, and
  • f(x,y)<f(1,1) at all point on the red line.

We conclude that (1,1) is the only critical point for f(x,y), and furthermore that it is a saddle point.

The above three examples show that we can find all critical points of quadratic functions of two variables. We can also classify each critical point as either a minimum, a maximum or a saddle point.

Of course not every function is quadratic. But by using the quadratic approximation 2.6.12 we can apply the same ideas much more generally. Suppose that (a,b) is a critical point of some function f(x,y). For Δx and Δy small, the quadratic approximation 2.6.12 gives

f(a+Δx,b+Δy)f(a,b)+fx(a,b)Δx+fy(a,b)Δy+12{fxx(a,b)Δx2+2fxy(a,b)ΔxΔy+fyy(a,b)Δy2}=f(a,b)+12{fxx(a,b)Δx2+2fxy(a,b)ΔxΔy+fyy(a,b)Δy2}

since (a,b) is a critical point so that fx(a,b)=fy(a,b)=0. Then using the technique of Examples 2.9.12 and 2.9.15, we get 12 (details below).

Theorem 2.9.16. Second Derivative Test

Let r>0 and assume that all second order derivatives of the function f(x,y) are continuous at all points (x,y) that are within a distance r of (a,b). Assume that fx(a,b)=fy(a,b)=0. Define

D(x,y)=fxx(x,y)fyy(x,y)fxy(x,y)2

It is called the discriminant of f. Then

  • if D(a,b)>0 and fxx(a,b)>0, then f(x,y) has a local minimum at (a,b),
  • if D(a,b)>0 and fxx(a,b)<0, then f(x,y) has a local maximum at (a,b),
  • if D(a,b)<0, then f(x,y) has a saddle point at (a,b), but
  • if D(a,b)=0, then we cannot draw any conclusions without more work.
Proof

We are putting quotation marks around the word “Proof”, because we are not going to justify the fact that it suffices to analyse the quadratic approximation in equation (). Let's temporarily suppress the arguments (a,b). If fxx(a,b)0, then by completing the square we can write

fxxΔx2+2fxyΔxΔy+fyyΔy2=fxx(Δx+fxyfxxΔy)2+(fyyfxy2fxx)Δy2=1fxx{(fxxΔx+fxyΔy)2+(fxxfyyfxy2)Δy2}

Similarly, if fyy(a,b)0,

fxxΔx2+2fxyΔxΔy+fyyΔy2=1fyy{(fxyΔx+fyyΔy)2+(fxxfyyfxy2)Δx2}

Note that this algebra breaks down if fxx(a,b)=fyy(a,b)=0. We'll deal with that case shortly. More importantly, note that

  • if (fxxfyyfxy2)>0 then both fxx and fyy must be nonzero and of the same sign and furthermore, whenever Δx or Δy are nonzero,

    {(fxxΔx+fxyΔy)2+(fxxfyyfxy2)Δy2}>0and{(fxyΔx+fyyΔy)2+(fxxfyyfxy2)Δx2}>0

    so that, recalling (),

    • if fxx(a,b)>0, then (a,b) is a local minimum and
    • if fxx(a,b)<0, then (a,b) is a local maximum.
  • If (fxxfyyfxy2)<0 and fxx is nonzero then

    {(fxxΔx+fxyΔy)2+(fxxfyyfxy2)Δy2}

    is strictly positive whenever Δx0, Δy=0 and is strictly negative whenever fxxΔx+fxyΔy=0, Δy0, so that (a,b) is a saddle point. Similarly, (a,b) is also a saddle point if (fxxfyyfxy2)<0 and fyy is nonzero.
  • Finally, if fxy0 and fxx=fyy=0, then

    fxxΔx2+2fxyΔxΔy+fyyΔy2=2fxyΔxΔy

    is strictly positive for one sign of ΔxΔy and is strictly negative for the other sign of ΔxΔy. So (a,b) is again a saddle point.

You might wonder why, in the local maximum/local minimum cases of Theorem 2.9.16, fxx(a,b) appears rather than fyy(a,b). The answer is only that x is before y in the alphabet 13 . You can use fyy(a,b) just as well as fxx(a,b). The reason is that if D(a,b)>0 (as in the first two bullets of the theorem), then because D(a,b)=fxx(a,b)fyy(a,b)fxy(a,b)2>0, we necessarily have fxx(a,b)fyy(a,b)>0 so that fxx(a,b) and fyy(a,b) must have the same sign — either both are positive or both are negative.

You might also wonder why we cannot draw any conclusions when D(a,b)=0 and what happens then. The second derivative test for functions of two variables was derived in precisely the same way as the second derivative test for functions of one variable is derived — you approximate the function by a polynomial that is of degree two in (xa), (yb) and then you analyze the behaviour of the quadratic polynomial near (a,b). For this to work, the contributions to f(x,y) from terms that are of degree two in (xa), (yb) had better be bigger than the contributions to f(x,y) from terms that are of degree three and higher in (xa), (yb) when (xa), (yb) are really small. If this is not the case, for example when the terms in f(x,y) that are of degree two in (xa), (yb) all have coefficients that are exactly zero, the analysis will certainly break down. That's exactly what happens when D(a,b)=0. Here are some examples. The functions

f1(x,y)=x4+y4f2(x,y)=x4y4f3(x,y)=x3+y3f4(x,y)=x4y4

all have (0,0) as the only critical point and all have D(0,0)=0. The first, f1 has its minimum there. The second, f2, has its maximum there. The third and fourth have a saddle point there.

Here are sketches of some level curves for each of these four functions (with all renamed to simply f).

f1Level.svgf2Level.svgf3Level.svgf4Level.svg

Example 2.9.17. f(x,y)=2x36xy+y2+4y

Find and classify all critical points of f(x,y)=2x36xy+y2+4y.

Solution

Thinking a little way ahead, to find the critical points we will need the gradient and to apply the second derivative test of Theorem 2.9.16 we will need all second order partial derivatives. So we need all partial derivatives of order up to two. Here they are.

f=2x36xy+y2+4yfx=6x26yfxx=12xfxy=6fy=6x+2y+4fyy=2fyx=6

(Of course, fxy and fyx have to be the same. It is still useful to compute both, as a way to catch some mechanical errors.)

We have already found, in Example 2.9.7, that the critical points are (1,1), (2,4). The classification is

criticalpoint fxxfyyfxy2 fxx type
(1,1) 12×2(6)2<0   saddle point
(2,4) 24×2(6)2>0 24 local min

We were able to leave the fxx entry in the top row blank, because

  • we knew that fxx(1,1)fyy(1,1)fxy2(1,1)<0, and
  • we knew, from Theorem 2.9.16, that fxx(1,1)fyy(1,1)fxy2(1,1)<0, by itself, was enough to ensure that (1,1) was a saddle point.

Here is a sketch of some level curves of our f(x,y).

fALevel.svg

They are not needed to answer this question, but can give you some idea as to what the graph of f looks like.

Example 2.9.18. f(x,y)=xy(5x+y15)

Find and classify all critical points of f(x,y)=xy(5x+y15).

Solution

We have already computed the first order partial derivatives

fx(x,y)=y(10x+y15)fy(x,y)=x(5x+2y15)

of f(x,y) in Example 2.9.8. Again, to classify the critical points we need the second order partial derivatives. They are

fxx(x,y)=10yfyy(x,y)=2xfxy(x,y)=(1)(10x+y15)+y(1)=10x+2y15fyx(x,y)=(1)(5x+2y15)+x(5)=10x+2y15

(Once again, we have computed both fxy and fyx to guard against mechanical errors.) We have already found, in Example 2.9.8, that the critical points are (0,0), (0,15), (3,0) and (1,5). The classification is

criticalpoint fxxfyyfxy2 fxx type
(0,0) 0×0(15)2<0   saddle point
(0,15) 150×0152<0   saddle point
(3,0) 0×6152<0   saddle point
(1,5) 50×252>0 75 local min

Here is a sketch of some level curves of our f(x,y). f is negative in the shaded regions and f is positive in the unshaded regions.

fBLevel.svg

Again this is not needed to answer this question, but can give you some idea as to what the graph of f looks like.

Example 2.9.19

Find and classify all of the critical points of f(x,y)=x3+xy23x24y2+4.

Solution

We know the drill now. We start by computing all of the partial derivatives of f up to order 2.

f=x3+xy23x24y2+4fx=3x2+y26xfxx=6x6fxy=2yfy=2xy8yfyy=2x8fyx=2y

The critical points are then the solutions of fx=0, fy=0. That is

(E1)fx=3x2+y26x=0(E2)fy=2y(x4)=0

The second equation, 2y(x4)=0, is satisfied if and only if at least one of the two equations y=0 and x=4 is satisfied.

  • When y=0, equation (E1) forces x to obey

    0=3x2+026x=3x(x2)

    so that x=0 or x=2.
  • When x=4, equation (E1) forces y to obey

    0=3×42+y26×4=24+y2

    which is impossible.

So, there are two critical points: (0,0), (2,0). Here is a table that classifies the critical points.

criticalpoint fxxfyyfxy2 fxx type
(0,0) (6)×(8)02>0 6<0 local max
(2,0) 6×(4)02<0   saddle point
Example 2.9.20

A manufacturer wishes to make an open rectangular box of given volume V using the least possible material. Find the design specifications.

Solution

Denote by x, y and z, the length, width and height, respectively, of the box.

box.svg

The box has two sides of area xz, two sides of area yz and a bottom of area xy. So the total surface area of material used is

S=2xz+2yz+xy

However the three dimensions x, y and z are not independent. The requirement that the box have volume V imposes the constraint

xyz=V

We can use this constraint to eliminate one variable. Since z is at the end of the alphabet (poor z), we eliminate z by substituting z=Vxy. So we have find the values of x and y that minimize the function

S(x,y)=2Vy+2Vx+xy

Let's start by finding the critical points of S. Since

Sx(x,y)=2Vx2+ySy(x,y)=2Vy2+x

(x,y) is a critical point if and only if

(E1)x2y=2V(E2)xy2=2V

Solving (E1) for y gives y=2Vx2. Substituting this into (E2) gives

x4V2x4=2Vx3=2Vx=2V3andy=2V(2V)2/3=2V3

As there is only one critical point, we would expect it to give the minimum 14 . But let's use the second derivative test to verify that at least the critical point is a local minimum. The various second partial derivatives are

Sxx(x,y)=4Vx3Sxx(2V3,2V3)=2Sxy(x,y)=1Sxy(2V3,2V3)=1Syy(x,y)=4Vy3Syy(2V3,2V3)=2

So

Sxx(2V3,2V3) Syy(2V3,2V3)Sxy(2V3,2V3)2=3>0Sxx(2V3,2V3)=2>0

and, by Theorem 2.9.16.b, (2V3,2V3) is a local minimum and the desired dimensions are

x=y=2V3z=V43

Note that our solution has x=y. That's a good thing — the function S(x,y) is symmetric in x and y. Because the box has no top, the symmetry does not extend to z.

Absolute Minima and Maxima

Of course a local maximum or minimum of a function need not be the absolute maximum of minimum. We'll now consider how to find the absolute maximum and minimum. Let's start by reviewing how one finds the absolute maximum and minimum of a function of one variable on an interval.

For concreteness, let's suppose that we want to find the extremal 15  values of a function f(x) on the interval 0x1. If an extremal value is attained at some x=a which is in the interior of the interval, i.e. if 0<a<1, then a is also a local maximum or minimum and so has to be a critical point of f. But if an extremal value is attained at a boundary point a of the interval, i.e. if a=0 or a=1, then a need not be a critical point of f. This happens, for example, when f(x)=x. The largest value of f(x) on the interval 0x1 is 1 and is attained at x=1, but f(x)=1 is never zero, so that f has no critical points.

absMaxMin.svg

So to find the maximum and minimum of the function f(x) on the interval [0,1], you

  1. build up a list of all candidate points 0a1 at which the maximum or minimum could be attained, by finding all a's for which either
    1. 0<a<1 and f(a)=0 or
    2. 0<a<1 and f(a) does not exist 16 or
    3. a is a boundary point, i.e. a=0 or a=1,
  2. and then you evaluate f(a) at each a on the list of candidates. The biggest of these candidate values of f(a) is the absolute maximum and the smallest of these candidate values is the absolute minimum.

The procedure for finding the maximum and minimum of a function of two variables, f(x,y) in a set like, for example, the unit disk x2+y21, is similar. You again

  1. build up a list of all candidate points (a,b) in the set at which the maximum or minimum could be attained, by finding all (a,b)'s for which either 17 
    1. (a,b) is in the interior of the set (for our example, a2+b2<1) and fx(a,b)=fy(a,b)=0 or
    2. (a,b) is in the interior of the set and fx(a,b) or fy(a,b) does not exist or
    3. (a,b) is a boundary 18 point, (for our example, a2+b2=1), and could give the maximum or minimum on the boundary — more about this shortly —
  2. and then you evaluate f(a,b) at each (a,b) on the list of candidates. The biggest of these candidate values of f(a,b) is the absolute maximum and the smallest of these candidate values is the absolute minimum.

The boundary of a set, like x2+y21, in R2 is a curve, like x2+y2=1. This curve is a one dimensional set, meaning that it is like a deformed x-axis. We can find the maximum and minimum of f(x,y) on this curve by converting f(x,y) into a function of one variable (on the curve) and using the standard function of one variable techniques. This is best explained by some examples.

Example 2.9.21

Find the maximum and minimum of T(x,y)=(x+y)ex2y2 on the region defined by x2+y21 (i.e. on the unit disk).

Solution

Let's follow our checklist. First critical points, then points where the partial derivatives don't exist, and finally the boundary.

Interior Critical Points: If T takes its maximum or minimum value at a point in the interior, x2+y2<1, then that point must be either a critical point of T or a singular point of T. To find the critical points we compute the first order derivatives.

Tx(x,y)=(12x22xy)ex2y2Ty(x,y)=(12xy2y2)ex2y2

Because the exponential ex2y2 is never zero, the critical points are the solutions of

Tx=02x(x+y)=1Ty=02y(x+y)=1

  • As both 2x(x+y) and 2y(x+y) are nonzero, we may divide the two equations, which gives xy=1, forcing x=y.
  • Substituting this into either equation gives 2x(2x)=1 so that x=y=±12.

So the only critical points are (12,12) and (12,12). Both are in x2+y2<1.

Singular points: In this problem, there are no singular points.

Boundary: Points on the boundary satisfy x2+y2=1. That is they lie on a circle. We may use the figure below to express x=cost and y=sint, in terms of the angle t. This will make the formula for T on the boundary quite a bit easier to deal with. On the boundary,

T=(cost+sint)ecos2tsin2t=(cost+sint)e1

As all t's are allowed, this function takes its max and min at zeroes of

optExampleAa.svg

dTdt=(sint+cost)e1

That is, (cost+sint)e1 takes its max and min

  • when sint=cost,
  • that is, when x=y and x2+y2=1,
  • which forces x2+x2=1 and hence x=y=±12.

All together, we have the following candidates for max and min, with the max and min indicated.

point (12,12) (12,12) (12,12) (12,12)
value of T 1e0.61 1e 2e0.52 2e
  max min    

The following sketch shows all of the critical points. It is a good idea to make such a sketch so that you don't accidentally include a critical point that is outside of the allowed region.

optExampleA.svg

In the last example, we analyzed the behaviour of f on the boundary of the region of interest by using the parametrization x=cost, y=sint of the circle x2+y2=1. Sometimes using this parametrization is not so clean. And worse, some curves don't have such a simple parametrization. In the next problem we'll look at the boundary a little differently.

Example 2.9.22

Find the maximum and minimum values of f(x,y)=x3+xy23x24y2+4 on the disk x2+y21.

Solution

Again, we first find all critical points, then find all singular points and, finally, analyze the boundary.

Interior Critical Points: If f takes its maximum or minimum value at a point in the interior, x2+y2<1, then that point must be either a critical point of f or a singular point of f. To find the critical points 19  we compute the first order derivatives.

fx=3x2+y26xfy=2xy8y

The critical points are the solutions of

(E1)fx=3x2+y26x=0(E2)fy=2y(x4)=0

The second equation, 2y(x4)=0, is satisfied if and only if at least one of the two equations y=0 and x=4 is satisfied.

  • When y=0, equation (E1) forces x to obey

    0=3x2+026x=3x(x2)

    so that x=0 or x=2.
  • When x=4, equation (E1) forces y to obey

    0=3×42+y26×4=24+y2

    which is impossible.

So, there are only two critical points: (0,0), (2,0).

Singular points: In this problem, there are no singular points.

Boundary: On the boundary, x2+y2=1, we could again take advantage of having a circle and write x=cost and y=sint. But, for practice, we'll use another method 20. We know that (x,y) satisfies x2+y2=1, and hence y2=1x2. Examining the formula for f(x,y), we see that it contains only even 21 powers of y, so we can eliminate y by substituting y2=1x2 into the formula.

f=x3+x(1x2)3x24(1x2)+4=x+x2

The max and min of x+x2 for 1x1 must occur either

  • when x=1 ( y=f=0) or
  • when x=+1 ( y=0, f=2) or
  • when 0=ddx(x+x2)=1+2x ( x=12, y=±34, f=14).

Here is a sketch showing all of the points that we have identified.

optExampleB.svg

Note that the point (2,0) is outside the allowed region 22. So all together, we have the following candidates for max and min, with the max and min indicated.

point (0,0) (1,0) (1,0) (12,±32)
value of f 4 0 2 14
  max     min
Example 2.9.23

Find the maximum and minimum values of f(x,y)=xyx3y2 when (x,y) runs over the square 0x1, 0y1.

Solution

As usual, let's examine the critical points, singular points and boundary in turn.

Interior Critical Points: If f takes its maximum or minimum value at a point in the interior, 0<x<1, 0<y<1, then that point must be either a critical point of f or a singular point of f. To find the critical points we compute the first order derivatives.

fx(x,y)=y3x2y2fy(x,y)=x2x3y

The critical points are the solutions of

fx=0y(13x2y)=0y=0  or  3x2y=1fy=0x(12x2y)=0x=0  or  2x2y=1

  • If y=0, we cannot have 2x2y=1, so we must have x=0.
  • If 3x2y=1, we cannot have x=0, so we must have 2x2y=1. Dividing gives 1=3x2y2x2y=32 which is impossible.

So the only critical point in the square is (0,0). There f=0.

Singular points: Yet again there are no singular points in this problem.

Boundary: The region is a square, so its boundary consists of its four sides.

  • First, we look at the part of the boundary with x=0. On that entire side f=0.
  • Next, we look at the part of the boundary with y=0. On that entire side f=0.
  • Next, we look at the part of the boundary with y=1. There f=f(x,1)=xx3. To find the maximum and minimum of f(x,y) on the part of the boundary with y=1, we must find the maximum and minimum of xx3 when 0x1.

    Recall that, in general, the maximum and minimum of a function h(x) on the interval axb, must occur either at x=a or at x=b or at an x for which either h(x)=0 or h(x) does not exist. In this case, ddx(xx3)=13x2, so the max and min of xx3 for 0x1 must occur

    • either at x=0, where f=0,
    • or at x=13, where f=233,
    • or at x=1, where f=0.
  • Finally, we look at the part of the boundary with x=1. There f=f(1,y)=yy2. As ddy(yy2)=12y, the only critical point of yy2 is at y=12. So the the max and min of yy2 for 0y1 must occur
    • either at y=0, where f=0,
    • or at y=12, where f=14,
    • or at y=1, where f=0.

All together, we have the following candidates for max and min, with the max and min indicated.

optExampleC.svg

point (0,0) (0,0y1) (0x1,0) (1,0) (1,12) (1,1) (0,1) (13,1)
value of f 0 0 0 0 14 0 0 2330.385
  min min min min   min min max
Example 2.9.24

Find the maximum and minimum values of f(x,y)=xy+2x+y when (x,y) runs over the triangular region with vertices (0,0), (1,0) and (0,2). The triangular region is sketched in

optExampleCCa.svg

Solution

As usual, let's examine the critical points, singular points and boundary in turn.

Interior Critical Points: If f takes its maximum or minimum value at a point in the interior, then that point must be either a critical point of f or a singular point of f. The critical points are the solutions of

fx(x,y)=y+2=0fy(x,y)=x+1=0

So there is exactly one critical point, namely (1,2). This is well outside the triangle and so is not a candidate for the location of the max and min.

Singular points: Yet again there are no singular points for this f.

Boundary: The region is a triangle, so its boundary consists of its three sides.

  • First, we look at the side that runs from (0,0) to (0,2). On that entire side x=0, so that f(0,y)=y. The smallest value of f on that side is f=0 at (0,0) and the largest value of f on that side is f=2 at (0,2).
  • Next, we look at the side that runs from (0,0) to (1,0). On that entire side y=0, so that f(x,0)=2x. The smallest value of f on that side is f=0 at (0,0) and the largest value of f on that side is f=2 at (1,0).
  • Finally, we look at the side that runs from (0,2) to (1,0). Or first job is to find the equation of the line that contains (0,2) and (1,0). By way of review, we'll find the equation using three different methods.
    • Method 1: You (probably) learned in high school that any line in the xy-plane 23  has equation y=mx+b where b is the y intercept and m is the slope. In this case, the line crosses the y axis at y=2 and so has y intercept b=2. The line passes through (0,2) and (1,0) and so, as we see in the figure below, has slope m=ΔyΔx=0210=2. Thus the side of the triangle that runs from (0,2) to (1,0) is y=22x with 0x1.
      optExampleCCc.svg
  • Method 2: Every line in the xy-plane has an equation of the form ax+by=c. In this case (0,0) is not on the line so that c0 and we can divide the equation by c, giving acx+bcy=1. Rename ac=A and bc=B. Thus, because the line does not pass through the origin, it has an equation of the form Ax+By=1, for some constants A and B. In order for (0,2) to lie on the line, x=0, y=2 has to be a solution of Ax+By=1. That is, Ax|x=0+By|y=2=1, so that B=12. In order for (1,0) to lie on the line, x=1, y=0 has to be a solution of Ax+By=1. That is Ax|x=1+By|y=0=1, so that A=1. Thus the line has equation x+12y=1, or equivalently, y=22x.
  • Method 3: The vector from (0,2) to (1,0) is 10,02=1,2. As we see from the figure above, it is a direction vector for the line. One point on the line is (0,2). So a parametric equation for the line (see Equation 1.3.1) is

    x0,y2=t1,2orx=t, y=22t

By any of these three methods 24 , we have that the side of the triangle that runs from (0,2) to (1,0) is y=22x with 0x1. On that side of the triangle

f(x,22x)=x(22x)+2x+(22x)=2x2+2x+2

Write g(x)=2x2+2x+2. The maximum and minimum of g(x) for 0x1, and hence the maximum and minimum values of f on the hypotenuse of the triangle, must be achieved either at

  • x=0, where f(0,2)=g(0)=2, or at
  • x=1, where f(1,0)=g(1)=2, or when
  • 0=g(x)=4x+2 so that x=12, y=222=1 and

    f(12,1)=g(12)=24+22+2=52

All together, we have the following candidates for max and min, with the max and min indicated.

point (0,0) (0,2) (1,0) (12,1)
value of f 0 2 2 52
  min     max

optExampleCCb.svg

Example 2.9.25

Find the high and low points of the surface  z=x2+y2  with (x,y) varying over the square  |x|1, |y|1 .

Solution

The function  f(x,y)=x2+y2  has a particularly simple geometric interpretation — it is the distance from the point (x,y) to the origin. So

  • the minimum of f(x,y) is achieved at the point in the square that is nearest the origin — namely the origin itself. So (0,0,0) is the lowest point on the surface and is at height 0.
  • The maximum of f(x,y) is achieved at the points in the square that are farthest from the origin — namely the four corners of the square (±1,±1). At those four points z=2. So the highest points on the surface are (±1,±1,2).

Even though we have already answered this question, it will be instructive to see what we would have found if we had followed our usual protocol. The partial derivatives of f(x,y)=x2+y2 are defined for (x,y)(0,0) and are

fx(x,y)=xx2+y2fy(x,y)=yx2+y2

  • There are no critical points because
    • fx=0 only for x=0, and
    • fy=0 only for y=0, but
    • (0,0) is not a critical point because fx and fy are not defined there.
  • There is one singular point — namely (0,0). The minimum value of f is achieved at the singular point.
  • The boundary of the square consists of its four sides. One side is

    {(x,y)|x=1, 1y1}

    On this side f=1+y2. As 1+y2 increases with |y|, the smallest value of f on that side is 1 (when y=0) and the largest value of f is 2 (when y=±1). The same thing happens on the other three sides. The maximum value of f is achieved at the four corners. Note that fx and fy are both nonzero at all four corners.

Exercises

Stage 1

a. Some level curves of a function f(x,y) are plotted in the xy--plane below.

OE16D_2a.svg

For each of the four statements below, circle the letters of all points in the diagram where the situation applies. For example, if the statement were “These points are on the y--axis”, you would circle both P and U, but none of the other letters. You may assume that a local maximum occurs at point T.

(i) nablaf is zeroP R S T U(ii) f has a saddle pointP R S T U(iii)  the partial derivative fy is positiveP R S T U(iv)  the directional derivative of f in the direction 0,1 isP R S T U negative

b. The diagram below shows three “y traces” of a graph z=F(x,y) plotted on xz--axes. (Namely the intersections of the surface z=F(x,y) with the three planes ( y=1.9, y=2, y=2.1). For each statement below, circle the correct word.

(i)  the first order partial derivative Fx(1,2) ispositive/negative/zero(ii) F has a critical point at (2,2)true/false(iii)  the second order partial derivative Fxy(1,2) ispositive/negative/zero

OE16D_2b.svg

2

Find the high and low points of the surface  z=x2+y2  with (x,y) varying over the square  |x|1, |y|1 . Discuss the values of  zx, zy  there. Do not evaluate any derivatives in answering this question.

3

If t0 is a local minimum or maximum of the smooth function  f(t)  of one variable (t runs over all real numbers) then  f(t0)=0. Derive an analogous necessary condition for x0 to be a local minimum or maximium of the smooth function  g(x)  restricted to points on the line  x=a+td . The test should involve the gradient of g(x).

Stage 2

Let z=f(x,y)=(y2x2)2.

  1. Make a reasonably accurate sketch of the level curves in the xy--plane of z=f(x,y) for z=0, 1 and 16. Be sure to show the units on the coordinate axes.
  2. Verify that (0,0) is a critical point for z=f(x,y), and determine from part (a) or directly from the formula for f(x,y) whether (0,0) is a local minimum, a local maximum or a saddle point.
  3. Can you use the Second Derivative Test to determine whether the critical point (0,0) is a local minimum, a local maximum or a saddle point? Give reasons for your answer.

Use the Second Derivative Test to find all values of the constant c for which the function z=x2+cxy+y2 has a saddle point at (0,0).

Find and classify all critical points of the function

f(x,y)=x3y32xy+6.

Find all critical points for f(x,y)=x(x2+xy+y29). Also find out which of these points give local maximum values for f(x,y), which give local minimum values, and which give saddle points.

Find the largest and smallest values of x2y2z in the part of the plane 2x+y+z=5 where x0, y0 and z0. Also find all points where those extreme values occur.

9

Find and classify all the critical points of f(x,y)=x2+y2+x2y+4.

10 

Find all saddle points, local minima and local maxima of the function

f(x,y)=x3+x22xy+y2x.

11 

For the surface

z=f(x,y)=x3+xy23x24y2+4

Find and classify [as local maxima, local minima, or saddle points] all critical points of f(x,y).

12

Find the maximum and minimum values of f(x,y)=xyx3y2 when (x,y) runs over the square 0x1, 0y1.

13

The temperature at all points in the disc x2+y21 is given by T(x,y)=(x+y)ex2y2. Find the maximum and minimum temperatures at points of the disc.

14 
  1. For the function z=f(x,y)=x3+3xy+3y26x3y6. Find and classify as [local maxima, local minima, or saddle points] all critical points of f(x,y).
  2. The images below depict level sets f(x,y)=c of the functions in the list at heights c=0,0.1,0.2,,1.9,2. Label the pictures with the corresponding function and mark the critical points in each picture. (Note that in some cases, the critical points might not be drawn on the images already. In those cases you should add them to the picture.)
    1. f(x,y)=(x2+y21)(xy)+1
    2. f(x,y)=x2+y2
    3. f(x,y)=y(x+y)(xy)+1
    4. f(x,y)=x2+y2

level3.svg    level1.svg    level4.svg    level2.svg

15 

Let the function

f(x,y)=x3+3xy+3y26x3y6

Classify as [local maxima, minima or saddle points] all critical points of f(x,y).

16 

Let h(x,y)=y(4x2y2).

  1. Find and classify the critical points of h(x,y) as local maxima, local minima or saddle points.
  2. Find the maximum and minimum values of h(x,y) on the disk x2+y21.
17 

Find the absolute maximum and minimum values of the function f(x,y)=5+2xx24y2 on the rectangular region

R={(x,y)|1x3, 1y1}

18 

Find the minimum of the function h(x,y)=4x2y+6 on the closed bounded domain defined by x2+y21.

19 

Let f(x,y)=xy(x+y3).

  1. Find all critical points of f, and classify each one as a local maximum, a local minimum, or saddle point.
  2. Find the location and value of the absolute maximum and minimum of f on the triangular region x0, y0, x+y8.
20 

Find and classify the critical points of f(x,y)=3x2y+y33x23y2+4.

21 

Consider the function

f(x,y)=2x36xy+y2+4y

  1. Find and classify all of the critical points of f(x,y).
  2. Find the maximum and minimum values of f(x,y) in the triangle with vertices (1,0), (0,1) and (1,1).
22 

Find all critical points of the function f(x,y)=x4+y44xy+2, and for each determine whether it is a local minimum, maximum or saddle point.

23 

Let

f(x,y)=xy(x+2y6)

  1. Find every critical point of f(x,y) and classify each one.
  2. Let D be the region in the plane between the hyperbola xy=4 and the line x+2y6=0. Find the maximum and minimum values of f(x,y) on D.
24 

Find all the critical points of the function

f(x,y)=x4+y44xy

defined in the xy-plane. Classify each critical point as a local minimum, maximum or saddle point.

25 

A metal plate is in the form of a semi-circular disc bounded by the x-axis and the upper half of x2+y2=4. The temperature at the point (x,y) is given by T(x,y)=ln(1+x2+y2)y. Find the coldest point on the plate, explaining your steps carefully. (Note: ln20.693, ln51.609)

26 

Find all the critical points of the function

f(x,y)=x3+xy2x

defined in the xy-plane. Classify each critical point as a local minimum, maximum or saddle point. Explain your reasoning.

27 

Consider the function g(x,y)=x210yy2.

  1. Find and classify all critical points of g.
  2. Find the absolute extrema of g on the bounded region given by

    x2+4y216, y0

28 

Find and classify all critical points of

f(x,y)=x33xy23x23y2

29 

Find the maximum value of

f(x,y)=xye(x2+y2)/2

on the quarter-circle D={(x,y)|x2+y24, x0, y0}.

30

Equal angle bends are made at equal distances from the two ends of a 100 metre long fence, so that the resulting three segment fence can be placed along an existing wall to make an enclosure of trapezoidal shape. What is the largest possible area for such an enclosure?

31

Find the most economical shape of a rectangular box that has a fixed volume V and that has no top.

Stage 3

32 

The temperature T(x,y) at a point of the xy--plane is given by

T(x,y)=204x2y2

  1. Find the maximum and minimum values of T(x,y) on the disk D defined by x2+y24.
  2. Suppose an ant lives on the disk D. If the ant is initially at point (1,1), in which direction should it move so as to increase its temperature as quickly as possible?
  3. Suppose that the ant moves at a velocity v=2,1. What is its rate of increase of temperature as it passes through (1,1)?
  4. Suppose the ant is constrained to stay on the curve y=2x2. Where should the ant go if it wants to be as warm as possible?
33 

Consider the function

f(x,y)=3kx2y+y33x23y2+4

where k>0 is a constant. Find and classify all critical points of f(x,y) as local minima, local maxima, saddle points or points of indeterminate type. Carefully distinguish the cases k<12, k=12 and k>12.

34 
  1. Show that the function f(x,y)=2x+4y+1xy has exactly one critical point in the first quadrant x>0, y>0, and find its value at that point.
  2. Use the second derivative test to classify the critical point in part (a).
  3. Hence explain why the inequality 2x+4y+1xy6 is valid for all positive real numbers x and y.
35

An experiment yields data points  (xi,yi), i=1,2,,n. We wish to find the straight line  y=mx+b  which “best” fits the data. The definition of “best” is “minimizes the root mean square error”, i.e. minimizes  i=1n(mxi+byi)2. Find m and b.

  1. Life is not (always) one-dimensional and sometimes we have to embrace it.
  2. Or perhaps your instructor asked you.
  3. Recall that if h<0 and AB, then hAhB. This is because the product of any two negative numbers is positive, so that h<0, ABAB0h(AB)0hAhB.
  4. A very common error of logic that people make is “Affirming the consequent”. “If P then Q” is true, does not imply that “If Q then P” is true . The statement “If he is Shakespeare then he is dead” is true. But concluding from “That man is dead” that “He must be Shakespeare” is just silly.
  5. And you also saw, for example in Example 3.6.4 of the CLP-1 text, that critical points that are also inflection points are neither local maxima nor local minima.
  6. We have both types of music here — country and western.
  7. This sort of thing is generally illegal.
  8. Sorry about the pun.
  9. Proof by search engine.
  10. And has been used for a long time. It was introduced by the French mathematician Adrien-Marie Legendre, 1752--1833, in 1805, and by the German mathematician and physicist Carl Friedrich Gauss, 1777--1855, in 1809.
  11. This is equivalent to translating the graph so that the critical point lies at (0,0).
  12. There are analogous results in higher dimensions that are accessible to people who have learned some linear algebra. They are derived by diagonalizing the matrix of second derivatives, which is called the Hessian matrix.
  13. The shackles of convention are not limited to mathematics. Election ballots often have the candidates listed in alphabetic order.
  14. Indeed one can use the facts that 0<x<, that 0<y<, and that S as x0 and as y0 and as x and as y to prove that the single critical point gives the global minimum.
  15. Recall that “extremal value” means “either maximum value or minimum value”.
  16. Recall that if f(a) does not exist, then a is called a singular point of f.
  17. This is probably a good time to review the statement of Theorem 2.9.2.
  18. It should intuitively obvious from a sketch that the boundary of the disk x2+y21 is the circle x2+y2=1. But if you really need a formal definition, here it is. A point (a,b) is on the boundary of a set S if there is a sequence of points in S that converges to (a,b) and there is also a sequence of points in the complement of S that converges to (a,b).
  19. We actually found the critical points in Example 2.9.19. But, for the convenience of the reader, we'll repeat that here.
  20. Even if you don't believe that “you can't have too many tools”, it is pretty dangerous to have to rely on just one tool.
  21. If it contained odd powers too, we could consider the cases y0 and y0 separately and substitute y=1x2 in the former case and y=1x2 in the latter case.
  22. We found (2,0) as a solution to the critical point equations (E1), (E2). That's because, in the course of solving those equations, we ignored the constraint that x2+y21.
  23. To be picky, any line the xy-plane that is not parallel to the y axis.
  24. In the third method, x has just be renamed to t.
 

This page titled 2.9: Maximum and Minimum Values is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or curated by Joel Feldman, Andrew Rechnitzer and Elyse Yeager via source content that was edited to the style and standards of the LibreTexts platform.

Support Center

How can we help?