Second Derivative Test in Multivariable Calculus
students, imagine trying to find the highest point on a hill or the lowest point in a bowl. In single-variable calculus, the second derivative test helps decide whether a critical point is a local maximum or minimum. In multivariable calculus, we do something similar, but now the surface can bend in more than one direction at once π. This lesson explains how the second derivative test works for functions of two variables, how to use it, and why it matters in optimization.
What the second derivative test is trying to do
In optimization, we often want to find local maxima and local minima of a function $f(x,y)$. A point where the gradient is zero, $\nabla f(x,y)=\mathbf{0}$, is called a critical point. But a critical point could be a peak, a valley, or a saddle point. A saddle point is like the shape of a horse saddle: it rises in one direction and falls in another π.
The second derivative test looks at how the function curves near a critical point. In one variable, curvature is described by $f''(x)$. In two variables, we use the second partial derivatives $f_{xx}(x,y)$, $f_{yy}(x,y)$, and $f_{xy}(x,y)$. These values are combined into a quantity called the discriminant:
$$D=f_{xx}(a,b)f_{yy}(a,b)-\bigl(f_{xy}(a,b)\bigr)^2$$
Here $(a,b)$ is a critical point. The test tells us whether the surface is shaped like a bowl, a dome, or a saddle near that point.
The rule for classifying critical points
Suppose $f$ has continuous second partial derivatives near a critical point $(a,b)$, and $\nabla f(a,b)=\mathbf{0}$. Then compute
$$D=f_{xx}(a,b)f_{yy}(a,b)-\bigl(f_{xy}(a,b)\bigr)^2$$
Now use these cases:
- If $D>0$ and $f_{xx}(a,b)>0$, then $f$ has a local minimum at $(a,b)$.
- If $D>0$ and $f_{xx}(a,b)<0$, then $f$ has a local maximum at $(a,b)$.
- If $D<0$, then $(a,b)$ is a saddle point.
- If $D=0$, the test gives no conclusion.
This is the multivariable version of the second derivative test. The sign of $D$ tells us whether the surface bends in the same direction or in opposite directions. If the curvature is positive in both main directions, the point is often a minimum. If it is negative in both main directions, the point is often a maximum. If the curvatures disagree, the point is a saddle.
Why the test works geometrically
The idea comes from the shape of the surface near the point. Near a critical point, a smooth function can be approximated by a quadratic expression, just like in single-variable calculus. The second partial derivatives describe that quadratic behavior.
Think of a flashlight shining on a surface. At a minimum, the surface curves upward in every direction, so it looks like a bowl π₯£. At a maximum, it curves downward in every direction, so it looks like an upside-down bowl. At a saddle point, one direction curves up while another curves down.
The quantity $D=f_{xx}f_{yy}-(f_{xy})^2$ comes from the Hessian matrix,
$$H=\begin{pmatrix} f_{xx} & f_{xy} \\ f_{xy} & f_{yy} \end{pmatrix}$$
At a critical point, the Hessian helps measure local curvature. When $D>0$, the Hessian has either two positive or two negative eigenvalues, which corresponds to a minimum or maximum. When $D<0$, the eigenvalues have opposite signs, which means a saddle point. When $D=0$, the curvature information is incomplete, so the test cannot decide.
Step-by-step procedure with an example
Letβs classify the critical point of the function
$$f(x,y)=x^2+xy+y^2-4x-6y$$
First, find the first partial derivatives:
$$f_x(x,y)=2x+y-4$$
$$f_y(x,y)=x+2y-6$$
Set them equal to zero:
$$2x+y-4=0$$
$$x+2y-6=0$$
Solve the system. From the first equation, $y=4-2x$. Substitute into the second:
$$x+2(4-2x)-6=0$$
$$x+8-4x-6=0$$
$$-3x+2=0$$
$$x=\frac{2}{3}$$
Then
$$y=4-2\left(\frac{2}{3}\right)=\frac{8}{3}$$
So the critical point is $\left(\frac{2}{3},\frac{8}{3}\right)$.
Now compute the second partial derivatives:
$$f_{xx}=2,\quad f_{yy}=2,\quad f_{xy}=1$$
Evaluate $D$:
$$D=(2)(2)-(1)^2=3$$
Since $D>0$ and $f_{xx}=2>0$, the function has a local minimum at $\left(\frac{2}{3},\frac{8}{3}\right)$.
This example shows the full process: find critical points, compute second partial derivatives, evaluate the discriminant, and classify the point.
Example of a saddle point
Now consider
$$g(x,y)=x^2-y^2$$
First derivatives are
$$g_x=2x,\quad g_y=-2y$$
The only critical point is $(0,0)$.
Second partial derivatives are
$$g_{xx}=2,\quad g_{yy}=-2,\quad g_{xy}=0$$
Then
$$D=(2)(-2)-(0)^2=-4$$
Because $D<0$, the point $(0,0)$ is a saddle point.
You can see this directly too. Along the $x$-axis, where $y=0$, the function becomes $g(x,0)=x^2$, which is positive near $0$. Along the $y$-axis, where $x=0$, the function becomes $g(0,y)=-y^2$, which is negative near $0$. So the function goes up in one direction and down in another. That is exactly what a saddle looks like.
What happens when $D=0$
Sometimes the second derivative test does not give an answer. This happens when
$$D=0$$
In that case, the surface may still have a minimum, maximum, or saddle point, but the test cannot tell. You need another method, such as checking values along different curves through the point or using higher-order derivatives.
For example, for
$$h(x,y)=x^4+y^4$$
the point $(0,0)$ is a local minimum, but many second derivatives at the origin are zero, so the usual second derivative test does not help. This shows an important fact: a test can be inconclusive without being wrong. It simply does not contain enough information for that case.
Connection to optimization problems
The second derivative test is a major tool in optimization because it helps turn a list of critical points into a list of actual answers. In a real problem, you may be asked to find the highest or lowest value of a function over a region. The usual process is:
- Find critical points using $\nabla f(x,y)=\mathbf{0}$.
- Use the second derivative test to classify those points.
- Check boundary points if the region has edges.
- Compare all candidate values to find global extrema.
This matters in applications like designing containers, maximizing profit, or minimizing material costs. For example, if $f(x,y)$ measures cost, a local minimum can represent a more efficient design. If $f(x,y)$ measures profit, a local maximum can represent the best operating point π‘.
The second derivative test does not by itself give the global maximum or minimum on a region. It only tells you about local behavior. But local information is often the first and most important step in a larger optimization problem.
Important details to remember
students, there are a few facts that make this topic easier to use correctly:
- A critical point is a point where $\nabla f=\mathbf{0}$ or where some first partial derivatives may fail to exist.
- The second derivative test is used after critical points are found.
- The discriminant is $D=f_{xx}f_{yy}-(f_{xy})^2$.
- The test works for functions with continuous second partial derivatives near the point.
- If $D>0$, the sign of $f_{xx}$ determines maximum or minimum.
- If $D<0$, the point is a saddle point.
- If $D=0$, the test is inconclusive.
This test is powerful because it gives a quick classification using only second derivatives. It is also connected to the geometry of curvature, which helps explain why surfaces behave the way they do near critical points.
Conclusion
The second derivative test is one of the most useful tools in multivariable optimization. It helps classify critical points of $f(x,y)$ as local maxima, local minima, or saddle points by using second partial derivatives and the discriminant $D$. In real problems, it gives structure to the search for best values and helps connect algebraic calculations with the geometric shape of a surface. When the test succeeds, it gives a clear answer. When $D=0$, it reminds us that more information is sometimes needed. Either way, it is an essential part of understanding optimization in multivariable calculus.
Study Notes
- The second derivative test classifies critical points of a function $f(x,y)$.
- First find critical points by solving $\nabla f(x,y)=\mathbf{0}$.
- Compute the second partial derivatives $f_{xx}$, $f_{yy}$, and $f_{xy}$.
- Use the discriminant $D=f_{xx}(a,b)f_{yy}(a,b)-\bigl(f_{xy}(a,b)\bigr)^2$.
- If $D>0$ and $f_{xx}(a,b)>0$, the point is a local minimum.
- If $D>0$ and $f_{xx}(a,b)<0$, the point is a local maximum.
- If $D<0$, the point is a saddle point.
- If $D=0$, the test is inconclusive.
- The test describes local behavior, not necessarily global extrema.
- It is an important step in optimization, especially after finding critical points.
