Just as in Calculus I, we can use derivatives to find maxima and minima for functions of two variables. Recall that the candidates for these optimal points are the critical points, where the first derivative is zero or does not exist, as shown below.
However, not all critical points correspond to extrema, like the one furthest to the right in the figure above. Thus, once we've found all the critical points, we'll have to test them to determine whether they correspond to maxima, minima, or neither. In Calculus I, we used the First Derivative Test and the Second Derivative Test, but here we'll just use the Second Derivative Test.
Maxima and minima are defined as follows: if f(x,y)≤f(a,b) at all points near (a,b), then f(a,b) is a local max. Similarly, if f(x,y)≥f(a,b) at all points near (a,b), then f(a,b) is a local min.
Critical Points
A critical point occurs at (a,b) if
fx(a,b)=0 and fy(a,b)=0
OR
at least one of the partial derivatives does not exist.
Find the critical points of f(x,y)=4+x3+y3−3xy.
Solution
Find the first derivatives:
fx(x,y)fy(x,y)=3x2−3y=3y2−3x
Since these exist everywhere, we simply need to find where they equal zero:
3x2−3y=0⟶y=x2
If y=x2, then
3y2−3x3x4−3x3x(x3−1)⟹x=0,1=0=0=0
Since y=x2, these x values correspond to y values of 0 and 1, respectively. Thus the critical points are
(0,0) and (1,1).
Just like in the two-dimensional case, not all critical points are maxima or minima, which is why we need the second derivative test.
The figure above shows a saddle point, so named because it resembles a saddle. At this point, the two partial derivatives are both zero, but it is neither a maximum or minimum.
Second Derivative Test
Suppose the second-order partial derivatives of f are continuous near (a,b) and fx(a,b)=fy(a,b)=0.
Definition
The discriminantD is
D(a,b)=fxx(a,b)fyy(a,b)−(fxy(a,b))2
Basically, if the discriminant is positive, the surface does the same thing in all directions (rises in all directions or falls in all directions); in this case, we use one of the second derivatives to determine which it does. If the discriminant is negative, the point is a saddle point. If the discriminant equals zero, the Second Derivative Test is inconclusive.
Second Derivative Test
If D(a,b)>0, then f has a local max or min at (a,b).
If fxx(a,b)<0, then it is a MAX.
If fxx(a,b)>0, then it is a MIN.
If D(a,b)<0, then f has a saddle point at (a,b).
If D(a,b)=0, then the test is inconclusive.
Find the local maxima and minima of f(x,y)=4+x3+y3−3xy.
Solution
We already found the critical points:
(0,0) and (1,1)
Next, find the discriminant and evaluate it at the critical points:
D(x,y)D(0,0)D(1,1)=fxx(x,y)fyy(x,y)−(fxy(x,y))2=36xy−9=−9⟶ Saddle Point=27 and fxx(1,1)=6>0⟶ Minimum
We conclude that there is a saddle point at (0,0) and a local minimum at (1,1).
Find the local maxima and minima of f(x,y)=3x2y+y3−3x2−3y2+2.
Solution
First, find the critical points. Note that the first partial derivatives exist everywhere, so we need to find the points where fx and fy are zero.
fxfy=6xy−6x=0⟶x(y−1)=0⟶x=0 or y=1=3x2+3y2−6y=0
If x=0:
fy=3y2−6y=0⟶3y(y−2)=0⟶y=0,2
If y=1:
fy=3x2−3=0⟶3(x+1)(x−1)=0⟶x=1,−1
Therefore, the critical points are (0,0), (0,2), (1,1), and (−1,1).
Next, find the discriminant and evaluate it at the critical points:
D(x,y)D(0,0)D(0,2)D(1,1)D(−1,1)=(6y−6)2−(6x)2=36y2−72y+36−36x2=36>0 and fxx(0,0)=−6⟶MAX=36>0 and fxx(0,2)=6⟶MIN=−36⟶Saddle Point=−3⟶Saddle Point
Find any local extrema and saddle points of f(x,y)=4+2x2+3y2.
Minimum at (0,0).
Find any local extrema and saddle points of f(x,y)=x4+2y2−4xy.
Minima at (1,1) and (−1,−1); saddle point at (0,0).
Find any local extrema and saddle points of f(x,y)=x2+y2−4x+5.
Minimum at (2,0).
Find any local extrema and saddle points of f(x,y)=1+x2+y2x.
Minimum at (−1,0); maximum at (1,0).
Find any local extrema and saddle points of f(x,y)=yex−ey.
Saddle point at (0,0).
Applications
Let x, y, and z be nonnegative numbers that add up to 200:
x+y+z=200
Find values of x, y, and z that minimize
x2+y2+z2.
Solution
Use the condition to write the quantity to be minimized as a function of two variables:
z=200−x−y⟶f(x,y)=x2+y2+(200−x−y)2
Next, take the first partial derivatives to find the critical points:
fxfy=2x−2(200−x−y)=4x+2y−400=2y−2(200−x−y)=4y+2x−400
If 4x+2y−400=0, y=200−2x. Plug this into fy:
4(200−2x)+2x−400=−6x+400=0⟶x=3200
Using this, y=200−2x=3200. Therefore, the one critical point of this function is (3200,3200).
Find the discriminant at this point:
D(x,y)=(4)(4)−(2)2=12>0 and fxx=4>0
Therefore, this quantity is minimized when
x=3200,y=3200, and z=3200.
A shipping company handles rectangular boxes if the sum of the length, width, and height of the box does not exceed 96 inches. Find the dimensions of the box that meets this condition and has the largest volume.
Solution
The condition in this problem is x+y+z=96. The volume, the quantity that we'd like to maximize, is V=xyz. To write this as a function of two variables, we'll use the condition to eliminate z:
V(x,y)=xy(96−x−y)=96xy−x2y−xy2
Take the first partial derivatives to find the critical points:
VxVy=96y−2xy−y2=y(96−2x−y)=96x−x2−2xy=x(96−x−2y)
If y(96−2x−y)=0, then either y=0 or y=96−2x. Plug each of these into Vy:
If y=0:
x(96−x)=0⟶x=0,96
This leads to two critical points: (0,0) and (96,0).
If y=96−2x:
x(−96+3x)=0⟶x=0,32
This leads to two critical points: (0,96) and (32,32).
We have four critical points, but we can save ourselves some work by noticing that only with the fourth one [(32,32)] is the volume nonzero. We can test to verify that this is a local maximum by finding the discriminant and evaluating it at (32,32):
VxxD(x,y)D(32,32)=−2y,Vyy=−2x,Vxy=96−2x−2y=(−2y)(−2x)−(96−2x−2y)2=3072>0 and Vxx(32,32)=−6<0
Therefore, the volume is maximized at
x=32,y=32, and z=32.
Build an aquarium with a volume of 200 cubic feet; if the base (made of slate) costs 5 times as much as the sides (made of glass), find the dimensions that minimize the cost of the aquarium.
Solution
The condition in this problem is xyz=200. The cost, the quantity that we'd like to minimize, is C=5xy+2xz+2yz. To write this as a function of two variables, we'll use the condition to eliminate z:
C(x,y)=5xy+y400+x400
Take the first partial derivatives to find the critical points:
CxCy=5y−x2400=0⟶y=x280=5x−y2400=0=5x−(80/x2)2400=0⟶x3=80⟶x≈4.31
We can test to verify that this is a local minimum by finding the discriminant and evaluating it at (4.31,4.31):
CxxD(x,y)D(4.31,4.31)=x3800,Cyy=y3800,Cxy=5=x3y3640,000−(5)2=75>0 and Cxx(4.31,4.31)=10>0
Therefore, the cost is minimized at
x=4.31ft,y=4.31ft, and z=10.77ft.
Suppose three houses are located at (0,0), (2,0), and (1,1). A power substation must be located at a point such that the sum of the squares of the distances between the houses and the substation is minimized.
Solution
The sum of the squares of the distances is
D=x2+y2+(x−2)2+y2+(x−1)2+(y−1)2=3x2+3y2−6x−2y+6
Take the first partial derivatives to find the critical points:
DxDy=6x−6=0⟶x=1=6y−2=0⟶y=31
We can test to verify that this is a local minimum by finding the discriminant and evaluating it at (1,31):
DxxD(x,y)=6,Dyy=6,Dxy=0=36>0 and Dxx>0
Therefore, the substation should be positioned at
(1,31).