Skip to content

Critical points and the second derivative test (two variables)

6 min read

Short answer

Find critical points by solving fx=0f_x=0 and fy=0f_y=0. At each, compute D=fxxfyy−fxy2D=f_{xx}f_{yy}-f_{xy}^2. If D>0D>0 and fxx>0f_{xx}>0 it is a local minimum; if D>0D>0 and fxx<0f_{xx}<0 a local maximum; if D<0D<0 a saddle; if D=0D=0 the test is inconclusive.

Contour sketches near a minimum, a saddle point and a maximumminimumD > 0, f_xx > 0saddleD < 0maximumD > 0, f_xx < 0
Contour sketches near a minimum, a saddle and a maximum. Around a saddle the values rise in some directions and fall in others.

Why the discriminant works

Near a critical point the function looks like a quadratic form built from fxxf_{xx}, fxyf_{xy}, fyyf_{yy}. DD is the determinant of that matrix of second derivatives (the Hessian). Positive DD means curving the same way in every direction (bowl or dome, decided by the sign of fxxf_{xx}); negative DD means curving up in some directions and down in others, a saddle.

Steps

  1. Compute fxf_x and fyf_y; solve the system fx=fy=0f_x=f_y=0.
  2. Compute fxxf_{xx}, fyyf_{yy}, fxyf_{xy}.
  3. For each critical point, evaluate DD and apply the rule above.

For absolute extrema on a closed region, also check the boundary.

Worked example

Classify the critical points of f(x,y)=x3+y3−3xyf(x,y)=x^3+y^3-3xy.

fx=3x2−3y=0f_x=3x^2-3y=0 and fy=3y2−3x=0f_y=3y^2-3x=0. From the first, y=x2y=x^2; substituting, x=x4x=x^4, so x=0x=0 or x=1x=1. Critical points: (0,0)(0,0) and (1,1)(1,1).

Second derivatives: fxx=6xf_{xx}=6x, fyy=6yf_{yy}=6y, fxy=−3f_{xy}=-3, so D=36xy−9D=36xy-9.

  • At (0,0)(0,0): D=−9<0D=-9<0, a saddle.
  • At (1,1)(1,1): D=27>0D=27>0 and fxx=6>0f_{xx}=6>0, a local minimum with f(1,1)=−1f(1,1)=-1.

Try it yourself

Find and classify the critical point of f(x,y)=x2−4x+y2+2yf(x,y)=x^2-4x+y^2+2y.

Show the answer

fx=2x−4=0f_x=2x-4=0 gives x=2x=2 and fy=2y+2=0f_y=2y+2=0 gives y=−1y=-1. fxx=2f_{xx}=2, fyy=2f_{yy}=2, fxy=0f_{xy}=0, so D=4>0D=4>0 with fxx>0f_{xx}>0: a local (and global) minimum at (2,−1)(2,-1) with value 4−8+1−2=−54-8+1-2=-5.

Keep going with practice

Optimization of multivariable functions is covered in Vidi's Multivariable & Vector Calculus course, with interactive surfaces.