At a critical point where a surface is flat (fx=0 and fy=0), we need a way to tell whether we are standing at a local minimum, a local maximum, or a saddle point.
1
Why Checking Only the x and y Slices Fails
In single-variable calculus, once we find a flat spot on a curve where f′(x)=0, the sign of the second derivative f′′(x) tells us which way the curve bends: f′′(x)>0 bends upward for a local minimum, and f′′(x)<0 bends downward for a local maximum.
f(x):f′(x)=0
local minimum
local maximum
f(x,y):fx=0,fy=0
local minimum
local maximum
saddle point
On a surface f(x,y), slicing along the x- and y-axes gives two second partial derivatives, fxx and fyy. Are those two axis curvatures enough to tell what kind of flat spot we have?
Why Checking Only the x and y Slices Fails
Multiplying the two axis curvatures together compares their signs:
x-slice curvaturefxx⋅y-slice curvaturefyy
When fxx⋅fyy<0, one axis slice curves up and the other curves down, so we definitely have a saddle point. When fxx⋅fyy>0, both axis slices curve the same way (up if fxx>0, down if fxx<0), but the surface can still do something different in between the axes.
2
Diagonal Slices and the Mixed Derivative fxy
To see how a surface can curve upward along both axes and still not have a local minimum, let's check what happens along the diagonal of f(x,y)=x2+y2−4xy at (0,0).
Diagonal Slices and the Mixed Derivative fₓᵧ
Along the axes (y=0 and x=0), the −4xy term becomes zero, leaving upward parabolas f(x,0)=x2 and f(0,y)=y2 with fxx=2 and fyy=2. Along the diagonal y=x, however, x and y change together and the −4xy term outweighs x2+y2:
f(x,x)=x2+x2−4(x)(x)=2x2−4x2=−2x2
Because the slice along y=x bends downward as −2x2, the origin (0,0) is a saddle point, not a local minimum.
The mixed partial derivative fxy measures this diagonal twist. Because changing the sign of xy only swaps which diagonal curves up and which curves down, any nonzero fxy pulls the surface toward a saddle.
On f(x,y)=x2+y2−4xy, a vertical slice through the origin curves upward along both the x-axis and the y-axis, but flattens and bends downward as the slice turns toward the diagonal y=x.
This surface curves upward along both the x-axis and the y-axis, yet a slice turned halfway between them bends downward along the diagonal.
3
The Tug-of-War and the Hessian Determinant
To classify any critical point, we need a single number that weighs the axis agreement fxx⋅fyy against the diagonal twist fxy.
In algebra, a perfect square factors as
x2+2xy+y2=(x+y)2
Because a square is never negative, z=(x+y)2 sits at the exact tipping point between an upward bowl and a saddle: it curves up everywhere except along the diagonal y=−x, where (x−x)2=0 stays flat at height 0.
The Tug-of-War and the Hessian Determinant
On this tipping-point surface f(x,y)=x2+2xy+y2, the power rule brings down a 2 on fxx=2 and fyy=2, so their product matches the square of the mixed derivative fxy=2:
fxx⋅fyy(fxy)2=2⋅2=4,=22=4
We put all four second partial derivatives into a 2×2 matrix and take its determinant (det[acbd]=ad−bc):
For the smooth functions we work with, the order of differentiation does not matter (fxy=fyx), so the product of the other diagonal is always (fxy)2. Plugging a critical point (a,b) where fx=0 and fy=0 into D gives the Second Derivative Test:
D>0 and fxx>0⟹Local minimum (curves upward in every direction)D>0 and fxx<0⟹Local maximum (curves downward in every direction)D<0⟹Saddle point (curves upward in some directions and downward in others)D=0⟹Inconclusive (flattens in at least one direction; check f(x,y) directly)
Notice that when D>0, we only need to check the sign of fxx. Since (fxy)2 is never negative, fxxfyy−(fxy)2>0 means fxxfyy>0, so fxx and fyy automatically have the same sign.
If we keep the same upward-curving parabola fixed along the x-axis and the y-axis, as in x2+y2, the origin stays a local minimum as long as the diagonal slice curves upward (D>0), reaches the flat-bottomed tipping point D=0 when the diagonal flattens into a line, and turns into a saddle point (D<0) as soon as the diagonal bends downward.
Even when the x and y slices curve up, a strong enough diagonal twist can flatten the diagonal and bend the bowl into a saddle.
4
Worked Example: Finding and Classifying Critical Points
Let's use the Second Derivative Test to find and classify all critical points of f(x,y)=x3+y3−3xy.
Worked Example: Finding and Classifying Critical Points
f(x,y)=x3+y3−3xy
critical points=?
local minimum,
local maximum
or saddle point?
Text solution
1. Set fx and fy to zero and substitute to find the critical pointsSetting both first partial derivatives to zero gives the relationship between x and y at every flat spot:
fxfy=3x2−3y=0⟹y=x2=3y2−3x=0⟹x=y2
Substituting y=x2 into x=y2 gives x=(x2)2=x4, so x=0 or x=1. Plugging these back into y=x2 gives the critical points (0,0) and (1,1).
2. Build the Hessian matrix from the second partial derivativesTaking the derivatives of fx=3x2−3y and fy=3y2−3x a second time gives the entries of the Hessian matrix:
fxx=6x,fyy=6y,fxy=fyx=−3⟹H(x,y)=[6x−3−36y]
3. Evaluate D at (0,0)Plugging x=0 and y=0 into the Hessian gives zero axis curvature and a nonzero diagonal twist:
H(0,0)⟹D=[0−3−30]=(0)(0)−(−3)2=−9<0
4. Evaluate D and fxx at (1,1)Plugging x=1 and y=1 into the Hessian shows that the upward curvature along the axes is stronger than the diagonal twist:
So (0,0) is a saddle point, and (1,1) is a local minimum.
5
When D=0: Checking the Function Directly
When D=0, the surface is so flat in at least one direction at the critical point that second derivatives cannot pick up the bend. To classify the critical point of f(x,y)=x4+y4 or g(x,y)=x4−y4, we look directly at how the height of the function behaves around (0,0).
When D = 0: Inspecting the Function Directly
f(x,y)=x4+y4
D=0 at (0,0)
local minimum,
local maximum
or saddle point?
f(x,y)=x4+y4
Local minimum at (0,0)
g(x,y)=x4−y4
Saddle point at (0,0)
Text solution
1. Find the critical point and evaluate D for both functionsSetting the first derivatives to zero (4x3=0 and ±4y3=0) gives the critical point (0,0), where all the second partial derivatives (fxx=12x2,fyy=±12y2,fxy=0) are zero for both functions:
H(0,0)⟹D=[0000]=(0)(0)−02=0
2. Check the height around (0,0) for f(x,y)=x4+y4At the origin f(0,0)=0, and because even powers are never negative, moving to any nearby point (x,y)=(0,0) makes at least one term positive:
f(x,y)=≥0x4+≥0y4>0for all (x,y)=(0,0)
3. Check the axis slices through (0,0) for g(x,y)=x4−y4At the origin g(0,0)=0, but moving out along the x-axis (y=0) and the y-axis (x=0) changes the height in opposite directions:
g(x,0)g(0,y)=x4>0(x=0),=−y4<0(y=0)
So (0,0) is a local minimum for f(x,y)=x4+y4, and a saddle point for g(x,y)=x4−y4.
Local minimums and maximums only describe the surface right around an interior flat spot; to find the overall highest and lowest points on a closed region, we also have to check its boundary.
Summary
At any critical point (a,b) where fx=0 and fy=0, classifying the flat spot comes down to the tug-of-war in the Hessian determinant:
D=det[fxxfyxfxyfyy]=fxxfyy−(fxy)2
Axis agreement wins (D>0)
The surface bends the same way in every direction, so the sign of fxx decides whether it is a local minimum (fxx>0, as at (1,1) for x3+y3−3xy where D=6⋅6−(−3)2=27>0 and fxx=6>0) or a local maximum (fxx<0).
Saddle wins (D<0)
Either the axes already curve in opposite directions (fxxfyy<0), or the diagonal twist (fxy)2 is stronger than the axis curvatures (as at (0,0) for x2+y2−4xy, where fxx=2 and fyy=2 curve up but D=2⋅2−(−4)2=−12<0 makes it a saddle point). In particular, if fxx=0 or fyy=0 while fxy=0, you don't need any further work: D=−(fxy)2<0 is immediately a saddle point.
When the test gives no conclusion (D=0), or when you can see the signs directly
Do not rely on second derivatives when D=0 (such as (x+y)2,x4+y4, or x4−y4 at (0,0)). Instead, compare f(x,y) directly with f(a,b) around the critical point: if f(x,y)>f(a,b) for all nearby points (like x4+y4>0), it is a local minimum; if one slice through (a,b) goes up and another goes down (like g(x,0)=x4>0 and g(0,y)=−y4<0 on x4−y4), it is a saddle point.
6
Practice
1
Find and classify the critical point of f(x,y)=4x+2y−x2−xy−y2.
Set fx=0 and fy=0 to solve the system of two linear equations for (x,y), then check both D and the sign of fxx.
Setting the first partial derivatives to zero gives
fxfy=4−2x−y=0⟹y=4−2x=2−x−2y=0
Substituting y=4−2x into fy=0 gives 2−x−2(4−2x)=3x−6=0, so x=2 and y=0, giving the critical point (2,0). The second partial derivatives are fxx=−2,fyy=−2, and fxy=−1, so
D=(−2)(−2)−(−1)2=4−1=3>0
(Watch the signs here: (−1)2=1 is subtracted from 4 to give D=3, not added to give D=5.) Because D>0, the surface curves the same way in all directions; checking fxx=−2<0(stopping at D=3>0 without checking fxx<0 is a common mistake that misclassifies this point as a local minimum) shows that (2,0) is a local maximum.
2
Find and classify all critical points of f(x,y)=x3+3y2−6xy.
Solve fy=0 for y first, substitute into fx=0, and factor the resulting equation rather than dividing by x.
Setting the first partial derivatives to zero gives
fxfy=3x2−6y=0⟹y=2x2,=6y−6x=0⟹y=x
Setting the two expressions for y equal gives 2x2=x, or x(x−2)=0(dividing both sides of 2x2=x by x loses the x=0 solution and misses the critical point (0,0)), giving critical points (0,0) and (2,2).
With fxx=6x,fyy=6, and fxy=−6:
At (0,0),D=(0)(6)−(−6)2=−36<0(remember that (−6)2=36 is subtracted, so D=−36, not +36), so (0,0) is a saddle point.
At (2,2),D=(12)(6)−(−6)2=72−36=36>0 and fxx=12>0, so (2,2) is a local minimum.
3
For f(x,y)=x2+kxy+4y2,(0,0) is a critical point with fxx>0 and fyy>0 for every constant k. For which values of k does the Second Derivative Test classify (0,0) as a local minimum, a saddle point, or give no conclusion?
Differentiate twice to find fxx,fyy, and fxy in terms of k, then find where D=fxxfyy−(fxy)2 is positive, negative, or zero.
Differentiating twice gives fxx=2,fyy=8, and fxy=k(reading the coefficients 1 and 4 directly off x2 and 4y2 without differentiating twice forgets the 2 from the power rule and gives D=4−k2 with the wrong cutoffs k=±2), so the determinant is
D=(2)(8)−k2=16−k2
Because fxx=2>0 and 16−k2=(4−k)(4+k)(don't forget the negative root −4 when solving k2<16):
(0,0) is a local minimum when −4<k<4 (D>0),
a saddle point when k<−4 or k>4 (D<0),
and the test is inconclusive when k=−4 or k=4 (D=0).
4
Show that the Second Derivative Test is inconclusive at the critical point of f(x,y)=x2−y4, then classify the critical point by checking f(x,y) directly.
After checking that D=0 at the critical point, compare the height along the x-axis (y=0) with the height along the y-axis (x=0).
Setting fx=2x=0 and fy=−4y3=0 gives the critical point (0,0). At (0,0), the second partials are fxx=2,fyy=−12(0)2=0, and fxy=0, so
D=(2)(0)−02=0
and the test is inconclusive (do not conclude (0,0) is a local minimum just because fxx(0,0)=2>0 or because both exponents are even; fxx>0 only guarantees a local minimum when D>0).
Checking f(x,y)=x2−y4 around (0,0), where f(0,0)=0: moving along the x-axis (y=0) gives f(x,0)=x2>0 for x=0, while moving along the y-axis (x=0) gives f(0,y)=−y4<0 for y=0. Since the surface goes up in one direction and down in another, (0,0) is a saddle point.