Second Derivatives Test - Two Variables Examples 2

# Second Derivatives Test - Two Variables Examples 2

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 then whose second partial derivatives are continuous on some disk $\mathcal D$ centered at $(a, b)$ where $(a, b)$ is a critical point of $f$ (that is $\nabla f(a, b) = (0, 0)$) and if $D$ is defined to be the function:

(1)
\begin{align} \quad 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 \end{align}

Then we can apply the following second derivatives test:

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

We will now look at some examples of finding local maximum and local minimum values of functions of two variables.

## Example 1

Find any local maximum and local minimum values of the function $f(x, y) = xy + \frac{1}{x} + \frac{1}{y}$.

We will first find the critical points of this function. We first compute the partial derivatives of $f$ to get:

(2)
\begin{align} \quad \frac{\partial f}{\partial x} = y - \frac{1}{x^2} \\ \quad \frac{\partial f}{\partial y} = x - \frac{1}{y^2} \end{align}

Now to compute the critical points of this function, we set $\nabla f (x, y) = (0, 0)$, that is find points $x$ and $y$ that satisfy the following system of equations:

(3)
\begin{align} \quad \frac{\partial f}{\partial x} = y - \frac{1}{x^2} = 0 \\ \quad \frac{\partial f}{\partial y} = x - \frac{1}{y^2} = 0 \end{align}

From the first equation we have that $y = \frac{1}{x^2} (*)$. Substituting this into the second equation gives us:

(4)
\begin{align} \quad 0 = x - \frac{1}{y^2} = x - \frac{1}{\left ( \frac{1}{x^2} \right )^2} = x - \frac{1}{\frac{1}{x^4}} = x - x^4 \end{align}

Now $0 = x - x^4 = x(1 - x^3)$. Therefore $x = 0$ or $x = 1$. Note that $x \neq 0$ though otherwise we would be dividing by zero from our original equation. So $x = 1$ and so plugging these values of $x$ into $(*)$ and we get that our sole critical point is $(1, 1)$.

Now let's set up our function $D$. We will need to compute the second partial derivatives of $f$. We have that:

(5)

Thus we have that:

(6)
\begin{align} \quad D(x, y) = \frac{\partial^2 f}{\partial x^2} \frac{\partial^2 f}{\partial y^2} - \left [ \frac{\partial f}{\partial y \partial x} \right ]^2 \\ \quad D(x, y) = \frac{4}{x^3y^3} - 1 \end{align}

Let's plug in our critical point. Plugging in $(1, 1)$ we get that $D(1, 1) = 4 -1 = 3 > 0$. We also have that $\frac{\partial^2}{\partial x^2} f(1, 1) = 2 > 0$. Therefore $f(1, 1) = 3$ is a local minimum value.

The graph below depicts this local minimum value.

## Example 2

Find any local maximum and local minimum values of the function $f(x, y) = e^yy^2 - e^yx^2$.

Let's first find the critical points of this function. We first compute the partial derivatives of $f$ and setting them equal to zero we get that:

(7)
\begin{align} \quad \frac{\partial f}{\partial x} = -2xe^y = 0\\ \quad \frac{\partial f}{\partial y} = e^y(2y + y^2 - x^2) = 0 \end{align}

From the first equation, since $e^y \neq 0$ we have that $x = 0$. Similarly, from the second equation we have that $2y + y^2 - x^2 = 2y + y^2 = 0$, so $y(2 + y) = 0$, so $y = 0$ or $y = -2$. Thus we have two critical points, namely $(0, 0)$ and $(0, -2)$.

Let's now compute the second partial derivatives of $f$:

(8)
\begin{align} \quad \frac{\partial^2 f}{\partial x^2} = -2e^y \quad , \quad \frac{\partial^2 f}{\partial y^2} = e^y( 2 + 4y + y^2 - x^2) \quad , \quad \frac{\partial^2 f}{\partial y}{\partial y \partial x} = -2xe^y \end{align}

Therefore we have that:

(9)
\begin{align} \quad D(x, y) = \frac{\partial^2 f}{\partial x^2} \frac{\partial^2 f}{\partial y^2} - \left [ \frac{\partial^2 f}{\partial y \partial x} \right ]^2 \\ \quad D(x, y) = -2e^{2y}(2 + 4y + y^2 -x^2) - 4x^2e^{2y} \end{align}

Now plugging in our critical points from earlier and we have that $D(0,0) = -4 < 0$, so $(0, 0, 0)$ is a saddle point of $f$.

Now we will plug in our second critical point. We have that $D(0, -2) = -2e^{-4}(2 -8 + 4) = -2e^{-4}(-2) = 4e^{-4} > 0$. We also have that $\frac{\partial^2}{\partial x^2} f(0, -2) = -2e^{-2} < 0$. Thus $(0, -2, 4e^{-2})$ is a local maximum for $f$.

The graph below depicts our saddle point and local maximum.