The Second Derivatives Test for Functions of Several Variables

# The Second Derivatives Test for Functions of Several Variables

Recall from The Second Derivatives Test for Functions of Two Variables page that if $z = f(x, y)$ is a two variable real-valued function whose partial derivatives are continuous on some disk $\mathcal D$ centered at $(a, b)$ and if we define $D(a, b) = \frac{\partial^2}{\partial x^2} f(a, b) \frac{\partial^2}{\partial y^2} f(a, b) - \left [ \frac{\partial^2}{\partial y \partial x} f(a, b) \right ]^2$ then:

• If $D(a, b) > 0$ and $\frac{\partial^2}{\partial x^2} f(a, b) > 0$ then $f$ attains a local minimum at $(a, b)$.
• If $D(a, b) > 0$ and $\frac{\partial^2}{\partial x^2} f(a, b) < 0$ then $f$ attains a local maximum at $(a, b)$.
• If $D(a, b) < 0$ then $f$ attains a saddle point at $(a, b)$.
• If $D(a, b) = 0$ then this test is inconclusive.

We will see that this second derivatives test can be extended for a function $f$ of more than two variables. Let's now derive a general version of the second derivatives test for a real-valued function $z = f(\mathbf{x})$ of $n$ variables (where $\mathbf{x} = (x_1, x_2, ..., x_n)$). It is important to first review the Definite, Semi-Definite and Indefinite Matrices and Hessian Matrices pages first.

 Theorem 1 (Second Derivatives Test for Functions of Several Variables): Let $z = f(\mathbf{x}) = f(x_1, x_2, ..., x_n)$ be an $n$ variable real-valued function, and let $\mathbf{a} = (a_1, a_2, ..., a_n)$ be a critical point of $f$. Let $\mathcal H ( \mathbf{x} ) = \begin{bmatrix} f_{11} (\mathbf{x}) & f_{12} (\mathbf{x}) & \cdots & f_{1n} (\mathbf{x})\\ f_{21} (\mathbf{x}) & f_{22} (\mathbf{x}) & \cdots & f_{2n} (\mathbf{x})\\ \vdots & \vdots & \ddots & \vdots \\ f_{n1} (\mathbf{x}) & f_{n2} (\mathbf{x}) & \cdots & f_{nn} (\mathbf{x}) \end{bmatrix}$ be the Hessian Matrix of $f$. Suppose that all second partial derivatives of $f$ are continuous around some neighbourhood of $\mathbf{a}$. Then: a) If $\mathcal H ( \mathbf{a} )$ is positive definite, then $f$ attains a local minimum value at $\mathbf{a}$. b) If $\mathcal H ( \mathbf{a} )$ is negative definite, then $f$ attains a local maximum value at $\mathbf{a}$. c) If $\mathcal H ( \mathbf{a} )$ is indefinite, then $f$ attains a saddle point at $\mathbf{a}$. d) If $\mathcal H ( \mathbf{a} )$ is not positive definite, not negative definite, and not indefinite, then this test is inconclusive.

Note that the second derivatives test for functions of two variables is included in Theorem 1 above as the case when $n = 2$, since if $z = f(x, y)$ is a two variable function with continuous second partial derivatives in some neighbourhood of the critical point $(a, b) \in D(f)$ then the Hessian Matrix of $f$ at $(a, b)$ is $\mathcal H (a, b) = \begin{bmatrix} \frac{\partial^2}{\partial x^2} f(a, b) & \frac{\partial ^2}{\partial y \partial x} f(a, b)\\ \frac{\partial ^2}{\partial x \partial y} f(a, b) & \frac{\partial ^2}{\partial y^2} f(a, b) \end{bmatrix}$. We see that since the second partial derivatives of $f$ are continuous in some neighbourhood of $(a, b)$, then $H(a, b)$ is positive definite if both $\begin{vmatrix} \frac{\partial^2}{\partial x^2} f(a, b) & \frac{\partial ^2}{\partial y \partial x} f(a, b)\\ \frac{\partial ^2}{\partial x \partial y} f(a, b) & \frac{\partial ^2}{\partial y^2} f(a, b) \end{vmatrix} = \frac{\partial^2}{\partial x^2} f(a, b) \frac{\partial^2}{\partial y^2} f(a, b) - \left [ \frac{\partial^2}{\partial y \partial x} f(a, b) \right ]^2 > 0$ and $\frac{\partial^2}{\partial x^2} > 0$ and hence $f$ attains a local minimum. The other conclusions of the second derivatives test for a two variable function are left for the reader to verify.