Multivariable Calculus · Second partial derivative test

Second partial derivative test

At a critical point, the second partial derivatives give D = f_xx f_yy − f_xy², which tells a maximum, a minimum and a saddle point apart; when D = 0 the test says nothing. Turn the slice through the point and watch how it bends.

The second partial derivative test in this visualization

At a critical point P of a function f(x,y)f(x, y), both first partial derivatives are zero and the tangent plane is horizontal. The second partial derivative test tells what kind of point it is from the second derivatives A=fxxA = f_{xx}, B=fxyB = f_{xy} and C=fyyC = f_{yy}, through the discriminant D=AC−B2D = AC - B^2, the determinant of the Hessian matrix. If f has continuous second partial derivatives near P:

The test at a critical point
{a local minimum,D>0, fxx>0a local maximum,D>0, fxx<0a saddle point,D<0the test can’t tell,D=0\begin{cases} \text{a local minimum}, & D > 0,\ f_{xx} > 0 \\ \text{a local maximum}, & D > 0,\ f_{xx} < 0 \\ \text{a saddle point}, & D < 0 \\ \text{the test can't tell}, & D = 0 \end{cases}

The page cuts a surface with a vertical slice through a critical point P, in any direction θ. The surface is a quadratic form whose second derivatives you set, or one of several other functions. How much the cut bends at P is the second derivative along that direction, fuuf_{uu}. The compass around P is filled where the slices bend up and hatched where they bend down. The test is a statement about all these slices at once.

How much the slice bends, in every direction
fuu(θ)=Acos⁡2θ+2Bcos⁡θsin⁡θ+Csin⁡2θ=m+scos⁡2(θ−θ0)f_{uu}(\theta) = A\cos^2\theta + 2B\cos\theta\sin\theta + C\sin^2\theta = m + s\cos 2(\theta - \theta_0)

As θ turns through half a circle, the bending makes one full wave around its midline m=12(A+C)m = \tfrac12(A + C) with amplitude s, drawn in the small plot. Its highest and lowest values, λ1=m+s\lambda_1 = m + s and λ2=m−s\lambda_2 = m - s, come in two perpendicular directions, and they are the eigenvalues of the Hessian. Multiplying out gives D=m2−s2=λ1λ2D = m^2 - s^2 = \lambda_1\lambda_2. So D>0D > 0 means the wave never reaches zero. Every slice bends the same way, and P is a minimum or a maximum. Any one slice then tells which, and fxxf_{xx} is simply the bending along x. D<0D < 0 means the wave crosses zero: some slices bend up and others down, and P is a saddle point.

This is why fxx>0f_{xx} > 0 and fyy>0f_{yy} > 0 are not enough. The cross term fxyf_{xy} turns the peaks of the wave away from the axes and makes the wave taller without moving its midline. Once ∣fxy∣|f_{xy}| is large enough, a diagonal slice bends down although both axis slices bend up, and the bowl has become a saddle.

When D<0D < 0, the bending is zero in exactly two directions, where the wave crosses zero, and the compass draws them as lines across the disc. They are the tangents of the level curve through P, which crosses itself there. This is the X that a saddle point makes on a contour map.

When D=0D = 0 the wave touches zero or lies on it, so in some direction the second-order term vanishes and the test cannot tell. x2−y4x^2 - y^4 and x2+y4x^2 + y^4 have the same second derivatives at the origin, yet along y the first falls like −t4-t^4 and the second rises like t4t^4, so one is a saddle and the other a minimum. On the monkey saddle x3−3xy2x^3 - 3xy^2 every second derivative is zero at the origin, and the surface rises in three directions and falls in three. “The test can’t tell” does not mean “no extremum”.

At a critical point the first-order terms vanish, so near P the function is close to its second-order Taylor polynomial, which is f(P) plus a quadratic form. Quadratic approximation draws it over the disc. When D>0D > 0, close enough to P the quadratic term outweighs the remainder in every direction, so P is a minimum or maximum like the approximation. When D<0D < 0, it still does along the directions where it bends up or down, so f rises along some and falls along others: a saddle.

The second-order Taylor polynomial at a critical point
f(P+h)≈f(P)+12(Ahx2+2Bhxhy+Chy2)f(P + h) \approx f(P) + \tfrac12\big(A h_x^2 + 2B h_x h_y + C h_y^2\big)

Things to notice

  • A critical point is a local matter. On x3−3x+y2x^3 - 3x + y^2 the minimum at (1, 0) is not a lowest point: the function falls without bound as x decreases.

Controls

  • The slice turns from the red handle on the compass, from the direction dial, or by dragging the wave in the small plot.
  • The θ field takes degrees or a multiple of π such as π/4.

Related