# 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)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)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)From the first equation we have that $y = \frac{1}{x^2} (*)$. Substituting this into the second equation gives us:

(4)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)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)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)Therefore we have that:

(9)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.