Optimization · Definition
Second derivative test
Before you start you need to know
It answers the question the critical point leaves open: is there a valley, a peak or a saddle, without graphing the function?
Definition
The second derivative test classifies a critical point of \(f\) as a minimum, maximum or saddle according to the sign of the discriminant \(D\) and of \(f_{xx}\) at that point.
The procedure: solve \(f_x=0\), \(f_y=0\) to find the critical points and compute \(D\), the determinant of the Hessian matrix, at each one. If \(D>0\) and \(f_{xx}>0\) there is a local minimum; if \(D>0\) and \(f_{xx}<0\), a local maximum; if \(D<0\), a saddle point.
Guiding example: for \(f(x,y)=x^3+y^3-3xy\) the critical points are \((0,0)\) and \((1,1)\). At the origin \(D=-9<0\), a saddle; at \((1,1)\), \(D=27>0\) and \(f_{xx}=6>0\), a local minimum. The condition \(D>0\) forces \(f_{xx}\) and \(f_{yy}\) to have the same sign, so looking at one of them is enough.
When \(D=0\) the test says nothing: \(x^4+y^4\) has a minimum at the origin, \(-x^4-y^4\) a maximum and \(x^4-y^4\) a saddle, and all three have \(D=0\). You must study the function directly, for instance by restricting it to lines or curves through the point.
The geometric reason comes from the second-order Taylor polynomial: near a critical point \(f\) looks like its quadratic part, and \(D\) detects whether that quadratic form is definite (same sign in every direction) or indefinite. Remember the test is only local: it says nothing about absolute extrema.
Think about it
What do you conclude if \(D>0\) and \(f_{xx}=0\) at a critical point?
Nothing: that case is impossible. \(D=-f_{xy}^2\le0\) when \(f_{xx}=0\), so \(D>0\) requires \(f_{xx}\ne0\).
Why is a saddle point neither a local maximum nor a local minimum?
Because in some directions \(f\) rises as you move away from the point and in others it falls, so no neighborhood has \(f\) attaining its smallest or largest value there.
Exercises 10
- The function \(f(x,y)=x^{2} + y^{2}\) has a critical point at \((0,0)\). What does the second derivative test say?
- The function \(f(x,y)=x^{2} - y^{2}\) has a critical point at \((0,0)\). What does the second derivative test say?
- The function \(f(x,y)=- x^{2} + 4 x - y^{2}\) has a critical point at \((2,0)\). What does the second derivative test say?
- The function \(f(x,y)=x^3-3x+y^2\) has critical points at \((1,0)\) and \((-1,0)\). What does the test say at \((-1,0)\)?
- The function \(f(x,y)=x^4+y^4\) has a critical point at \((0,0)\). What does the second derivative test say?
- For \(f(x,y)=x^2+xy+y^2\), compute \(D=f_{xx}f_{yy}-f_{xy}^{2}\) at the critical point \((0,0)\).
- The function \(f(x,y)=x^{2} + 3 x y + y^{2}\) has a critical point at \((0,0)\). What does the second derivative test say?
- For \(f(x,y)=x^3+y^3-3xy\), the point \((1,1)\) is critical. What does the test say there?
- At a critical point of \(f\) we find \(D>0\) and \(f_{xx}<0\). What kind of point is it?
- At a critical point, \(D>0\) and \(f_{xx}>0\). What must be true about \(f_{yy}\)?
What comes next
References
- James Stewart, Daniel K. Clegg, Saleem Watson, Calculus: Early Transcendentals, 9th edition, Cengage, 2021. §14.7
- Joel Hass, Christopher Heil, Przemyslaw Bogacki, Maurice D. Weir, George B. Thomas Jr., Thomas' Calculus, 15th edition, Pearson, 2023. §14.7
- Jerrold E. Marsden, Anthony Tromba, Vector Calculus, 6th edition, W. H. Freeman, 2012. §3.3