Skip to main content

Section 14.7 Optimization in Several Variables

In single-variable calculus (MTH 251Z or MTH 251), we learned how to find the highest peaks and lowest valleys on a 2D curve. We accomplished this by using the first derivative to find critical points and the second derivative to classify them.
In MTH 254, we are taking these exact same concepts and elevating them to 3D surfaces. Instead of walking along a single path, imagine hiking across a mountainous landscape. We want to find the mountain summits (local maxima), the bottom of the basins (local minima), and the mountain passes (saddle points). We will also learn how to find the absolute highest and lowest elevation points within a specifically fenced-off area (global extrema on a closed and bounded region).
Recall back in MTH 251Z (or MTH 251) that we do optimization problems by (1) determine the critical points, (2) use the Second Derivative Test to determine whether they are local minima, local maxima, or saddle points, and (3) determine the global extreme values by comparing the local extreme values and the values of the function on the boundary of the domain. In this section, we will apply the same process to functions of two variables.

Subsection Critical Points and Local Extrema

Let’s start by finding the critical points of a two-variable function. Recall back in MTH 251Z (or MTH 251), we defined the critical points as the points where the derivative of a function is zero or undefined. This idea carries over to MTH 254. Yet we can only take the partial derivatives of a two-variable function, so we need to find the points where both partial derivatives are zero or undefined.

Definition 14.7.1. Critical Point.

A point \(P = (a,b)\) in the domain of \(f(x,y)\) is called a critical point if

Example 14.7.2.

Find the critical points of \(f(x,y) = x^2 + y^2 - xy + x\text{.}\)
Hint.
Recall that the critical points are the points where both partial derivatives are zero or undefined. So let’s start by finding the partial derivatives of \(f(x,y)\) first! How many variables do we have in the partial derivatives? Do we have enough equations to solve for the variables?
Solution.
Since \(f(x,y)\) is a polynomial, it is differentiable everywhere in \(\R^2\text{.}\) Therefore, the only critical points will occur where both partial derivatives are equal to zero.
First, we compute the partial derivatives of \(f\) with respect to \(x\) and \(y\text{:}\)
\begin{align*} f_x(x,y) \amp = 2x - y + 1 \\ f_y(x,y) \amp = 2y - x \end{align*}
Next, we set both partial derivatives equal to zero to create a system of linear equations:
\begin{align*} 2x - y + 1 \amp = 0 \\ -x + 2y \amp = 0 \end{align*}
From the second equation, we can isolate \(x\) to get \(x = 2y\text{.}\) Substituting this into the first equation yields:
\begin{align*} 2(2y) - y + 1 \amp = 0 \\ 4y - y + 1 \amp = 0 \\ 3y \amp = -1 \\ y \amp = -\frac{1}{3} \end{align*}
Now, we plug \(y = -\frac{1}{3}\) back into the equation \(x = 2y\) to find the corresponding \(x\)-coordinate:
\begin{equation*} x = 2\left(-\frac{1}{3}\right) = -\frac{2}{3} \end{equation*}
Thus, the system has exactly one solution, and the only critical point of the function is \(\left(-\frac{2}{3}, -\frac{1}{3}\right)\text{.}\)
Sometimes we may need some tricks (and even calculators) to find the critical points, especially when the first-order partial derivatives are not nice functions.

Example 14.7.3.

Find the critical points of \(f(x,y) = xy(x - 2)(y + 3)\text{.}\)
Solution.
This function is a polynomial and therefore differentiable at all points in \(\R^2\text{.}\) Thus, the critical points occur only at points where \(f_x(x,y) = 0\) and \(f_y(x,y) = 0\text{.}\)
To make differentiation easier, we can slightly group and expand the function as \(f(x,y) = (x^2 - 2x)(y^2 + 3y)\text{.}\) Now we compute the partial derivatives:
\begin{align*} f_x(x,y) \amp = (2x - 2)(y^2 + 3y) = 2(x - 1)y(y + 3) \\ f_y(x,y) \amp = (x^2 - 2x)(2y + 3) = x(x - 2)(2y + 3) \end{align*}
Setting \(f_x(x,y) = 0\) gives us \(2(x - 1)y(y + 3) = 0\text{.}\) This equation is satisfied if \(x = 1\text{,}\) \(y = 0\text{,}\) or \(y = -3\text{.}\) We can substitute each of these cases into our second equation, \(f_y(x,y) = 0\text{,}\) to find the corresponding coordinate:
  • If \(x = 1\text{,}\) then \(f_y(1,y) = (1)(-1)(2y + 3) = -(2y + 3) = 0\text{,}\) which yields \(y = -\frac{3}{2}\text{.}\) This gives the critical point \((1, -\frac{3}{2})\text{.}\)
  • If \(y = 0\text{,}\) then \(f_y(x,0) = x(x - 2)(3) = 3x(x - 2) = 0\text{,}\) which yields \(x = 0\) or \(x = 2\text{.}\) This gives the critical points \((0, 0)\) and \((2, 0)\text{.}\)
  • If \(y = -3\text{,}\) then \(f_y(x,-3) = x(x - 2)(-3) = -3x(x - 2) = 0\text{,}\) which again yields \(x = 0\) or \(x = 2\text{.}\) This gives the critical points \((0, -3)\) and \((2, -3)\text{.}\)
Therefore, the function has a total of five critical points: \((0,0)\text{,}\) \((2,0)\text{,}\) \((0,-3)\text{,}\) \((2,-3)\text{,}\) and \((1, -\frac{3}{2})\text{.}\)
One of the reasons why we care about the critical points in general is because local maxima (peaks) and local minima (valleys) occur at critical points. Richard will include the technical definition of local maxima and local minima below. But he likes to call them peaks and valleys, as they look like peaks and valleys on the graphs.

Definition 14.7.4. Local Extreme Values.

A function \(f(x,y)\) has a local extremum at \(P = (a,b)\) if there exists an open disk \(D(P,r)\) such that
  • Local maximum: \(f(x,y) \leq f(a,b)\) for all \((x,y) \in D(P,r)\)
  • Local minimum: \(f(x,y) \geq f(a,b)\) for all \((x,y) \in D(P,r)\)
In other words, a local maximum is a point where the function value is greater than or equal to the function values at all nearby points, which appears as a peak on the graph, and a local minimum is a point where the function value is less than or equal to the function values at all nearby points, which appears as a valley on the graph.
Imagine if you are at a peak or valley, you will need to turn around on the graph, which means the tangent plane at that point will be horizontal. Therefore, the partial derivatives at that point will be zero, which means that the point must be a critical point. This is the Fermat’s Theorem!
Figure 14.7.5. At the peak, the tangent line/plane is horizontal.
Back in MTH 251Z (or MTH 251), we know that not all critical points are peak or valley points. It can also be an inflection point. Similarly, in MTH 254, not all critical points are peak or valley points. Some of them are saddle points, as shown in the figure below.
Figure 14.7.7. Local Maximum, Local Minimum, and Saddle Point
But how do we determine whether a critical point is a peak point, valley point, or saddle point? The second partial derivative test will tell us the answer!
The magical quantity \(f_{xx}f_{yy} - f_{xy}^2\) is also called the determinant of the Hessian matrix, \(D\text{.}\) That is,
\begin{equation*} D = \begin{vmatrix} f_{xx}(a,b) \amp f_{xy}(a,b) \\ f_{xy}(a,b) \amp f_{yy}(a,b) \end{vmatrix} = f_{xx}(a,b) f_{yy} (a,b) - f_{xy}(a,b)^2 \end{equation*}
If \(D \gt 0\text{,}\) then \(f_{xx}(a,b)f_{yy}(a,b)\) must be positive, which means \(f_{xx}(a,b)\) and \(f_{yy}(a,b)\) must have the same sign.
  1. If \(f_{xx}(a,b) \gt 0\text{,}\) then \(f_{yy}(a,b) \gt 0\text{,}\) and the graph of \(f(x,y)\) near \((a,b)\) looks like a bowl, which means that \(f(a,b)\) is a local minimum (valley point).
  2. If \(f_{xx}(a,b) \lt 0\text{,}\) then \(f_{yy}(a,b) \lt 0\text{,}\) and the graph of \(f(x,y)\) near \((a,b)\) looks like an upside-down bowl, which means that \(f(a,b)\) is a local maximum (peak point).
If \(D \lt 0\text{,}\) then \(f_{xx}(a,b)f_{yy}(a,b)\) must be negative, which means \(f_{xx}(a,b)\) and \(f_{yy}(a,b)\) must have opposite signs. The graph of \(f(x,y)\) near \((a,b)\) looks like a saddle, which means that \(f(a,b)\) is a saddle point.

Note 14.7.9. But Richard... What does the \(f_{xy}^2(a,b)\) control?

Long story short, the mixed partial derivative, \(f_{xy}(a,b)\text{,}\) controls the amount of the "twist" of the surface near the critical point. That is, rather than focusing solely on the direction along the \(x\)-axis or the \(y\)-axis, the mixed partial derivative captures how the function changes when we move in a direction not parallel to either axis (for example, the direction along \(y = x\)).
If the twist is too strong, it can change the shape of the surface near the critical point, which can lead to a saddle point even if the second partial derivatives along the \(x\) and \(y\) directions suggest a local extremum.
For example, let’s consider the function
\begin{equation*} f(x,y) = x^2 + 4xy + y^2 \end{equation*}
We obtain
\begin{equation*} f_{x}(x,y) = 2x + 4y \qquad \text{ and } \qquad f_{y}(x,y) = 4x + 2y \end{equation*}
which implies that \(x = 0\) and \(y = 0\text{,}\) and hence \((0,0)\) is the only critical point.
If we ignore the twisting effect of the mixed partial derivative, we would only look at the second partial derivatives \(f_{xx}(0,0)\) and \(f_{yy}(0,0)\text{,}\) which are both positive. This would lead us to conclude that \((0,0)\) is a local minimum.
However, the mixed partial derivative \(f_{xy}(0,0) = 4\) is large enough to make the determinant
\begin{equation*} D = f_{xx}(0,0)f_{yy}(0,0) - f_{xy}^2(0,0) = 2 \cdot 2 - 4^2 = -12 \lt 0 \end{equation*}
which indicates that \((0,0)\) is actually a saddle point.
Figure 14.7.10. The surface \(f(x,y) = x^2 + 4xy + y^2\)

Example 14.7.11.

Determine whether the critical points of the function \(f(x,y) = xy(x - 2)(y + 3)\) are local maxima, local minima, or saddle points.
Hint.
Recall we found that the critical points for this function are: \((0,0)\text{,}\) \((2,0)\text{,}\) \(\lp 1, -\frac{3}{2} \rp\text{,}\) \((0,-3)\text{,}\) and \((2,-3)\text{.}\)
Now try classifying these points following the second partial derivative test.
Solution.
First, we expand the function and compute the partial derivatives.
\begin{align*} f(x,y) \amp = x^2 y^2 + 3 x^2 y - 2 x y^2 - 6 x y\\ f_x(x,y) \amp = 2xy^2 + 6xy - 2y^2 - 6y\\ f_y(x,y) \amp = 2x^2y + 3x^2 - 4xy - 6x \end{align*}
Taking the second partial derivatives, we find:
\begin{align*} f_{xx}(x,y) \amp = 2y^2 + 6y\\ f_{yy}(x,y) \amp = 2x^2 - 4x\\ f_{xy}(x,y) \amp = 4xy + 6x - 4y - 6 \end{align*}
Next, we evaluate the determinant \(D = f_{xx}f_{yy} - (f_{xy})^2\) and the sign of \(f_{xx}\) at each critical point to classify them following the second partial derivative test.
Critical Point \(D = f_{xx}f_{yy} - (f_{xy})^2\) \(f_{xx}\) Conclusion
\((0,0)\) \(0(0) - (-6)^2 = -36 \lt 0\) \(0\) \(\text{Saddle Point}\)
\((2,0)\) \(0(0) - (6)^2 = -36 \lt 0\) \(0\) \(\text{Saddle Point}\)
\(\lp 1, -\frac{3}{2} \rp\) \(\lp-\frac{9}{2}\rp(-2) - (0)^2 = 9 \gt 0\) \(-\frac{9}{2} \lt 0\) \(\text{Local Maximum}\)
\((0,-3)\) \(0(0) - (6)^2 = -36 \lt 0\) \(0\) \(\text{Saddle Point}\)
\((2,-3)\) \(0(0) - (-6)^2 = -36 \lt 0\) \(0\) \(\text{Saddle Point}\)
Richard also included the graph of the function below, with the critical points labeled. This matches up with our conclusions using the second partial derivative test.
Figure 14.7.12. The surface \(f(x,y) = xy(x - 2)(y + 3)\) and its critical points

Subsection Global Extrema

Now rather than looking at the local extrema, which only focuses on the behavior of the function near a critical point, we want to find the global extrema, which are the largest and smallest values of the function on the domain or a region.
Back in MTH 251Z (or MTH 251), we know that the global extrema exist for a continuous function on a closed interval. This is the famous extreme value theorem This theorem is also true in MTH 254. But instead of having a closed interval, we need to have a closed and bounded region. What it means is that the region must be fenced (bounded) and the fence must be included in the region (closed).
Figure 14.7.13. Closed and Bounded Region.
If the function is continuous on a closed and bounded region, then the global extrema must be attained. Furthermore, we know that the global extrema must occur at either a local extremum or a point on the boundary of the region.

Example 14.7.15.

Find the absolute maximum and minimum values of the function
\begin{equation*} f(x,y) = xy - 8x - y^2 + 12y + 160 \end{equation*}
on the rectangular region \(\c{R} = \left\{(x,y) \in \R^2 : 0 \leq x \leq 15, 0 \leq y \leq 15 - x\right\}\text{.}\)
Hint.
Richard coded the graph of the function as well as the region \(\c{R}\) below. Your job is to find the highest and lowest points on the graph of \(f(x,y)\) that are also in the region \(\c{R}\text{.}\)
Figure 14.7.16. The surface \(f(x,y) = xy - 8x - y^2 + 12y + 160\) over the triangular region \(0 \leq x \leq 15, 0 \leq y \leq 15-x\)
Solution.
Step 1: Examine the critical points
First, we find the partial derivatives of \(f(x,y)\text{:}\)
\begin{align*} f_x(x,y) \amp = y - 8\\ f_y(x,y) \amp = x - 2y + 12 \end{align*}
Setting both partial derivatives to zero yields the following system of equations:
\begin{align*} y - 8 \amp = 0 \qquad \implies \qquad y = 8\\ x - 2y + 12 \amp = 0 \end{align*}
Substituting \(y = 8\) into the second equation gives \(x - 16 + 12 = 0\text{,}\) which means \(x = 4\text{.}\) The only critical point is \((4, 8)\text{.}\) We confirm that \((4, 8)\) lies within the interior of the region \(\c{R}\) since \(0 \leq 4 \leq 15\) and \(0 \leq 8 \leq 15 - 4 = 11\text{.}\)
Step 2: Check the boundary
The boundary of the triangular region \(\c{R}\) consists of three line segments. We check for critical points on each segment, and we will also include the corner points of the triangle: \((0,0)\text{,}\) \((15,0)\text{,}\) and \((0,15)\text{.}\)
  • Bottom edge (\(y = 0, 0 \leq x \leq 15\)): The function becomes
    \begin{equation*} g_1(x) = f(x,0) = -8x + 160 \end{equation*}
    Since \(g_1'(x) = -8 \lt 0\text{,}\) the function is decreasing on \(0 \leq x \leq 15\text{,}\) which means that the maximum value on this edge occurs at \((0, 0)\) and the minimum value occurs at \((15, 0)\text{.}\)
  • Left edge (\(x = 0, 0 \leq y \leq 15\)): The function becomes
    \begin{equation*} g_2(y) = f(0,y) = -y^2 + 12y + 160 \end{equation*}
    Taking the derivative gives \(g_2'(y) = -2y + 12\text{.}\) Setting this to zero yields \(y = 6\text{.}\) This gives us a boundary candidate point at \((0, 6)\text{.}\)
  • Hypotenuse (\(y = 15 - x, 0 \leq x \leq 15\)): Substituting \(y = 15 - x\) into \(f(x,y)\text{,}\) we get:
    \begin{align*} g_3(x) \amp = x(15-x) - 8x - (15-x)^2 + 12(15-x) + 160\\ \amp = 15x - x^2 - 8x - (225 - 30x + x^2) + 180 - 12x + 160\\ \amp = -2x^2 + 25x + 115 \end{align*}
    Taking the derivative gives \(g_3'(x) = -4x + 25\text{.}\) Setting this to zero yields \(x = \frac{25}{4}\text{.}\) The corresponding \(y\)-value is \(y = 15 - \frac{25}{4} = \frac{35}{4}\text{.}\) This gives us another boundary candidate point at \(\left(\frac{25}{4}, \frac{35}{4}\right)\text{.}\)
Step 3: Compare
We organize the interior critical point, the boundary critical points, and the corners of the region into a table to compare the values of \(f(x,y)\text{:}\)
Point \((x, y)\) Value \(f(x,y)\)
\((4, 8)\) \(192\)
\((0, 0)\) \(160\)
\((15, 0)\) \(40\)
\((0, 15)\) \(115\)
\((0, 6)\) \(196\)
\(\left(\frac{25}{4}, \frac{35}{4}\right)\) \(\frac{1545}{8} = 193.125\)
Comparing the values in the table, the absolute maximum value is \(196\text{,}\) which occurs at \((0, 6)\text{,}\) and the absolute minimum value is \(40\text{,}\) which occurs at \((15, 0)\text{.}\)

Worksheet Assigned Problems for Section 14.7

The problems listed below are assigned to be included in your problem set portfolio. Note that a specific selection of these problems will also form the written homework assignments. I recommend working through all of them to ensure a solid grasp of the material. Reach out to Richard for help if you get stuck or have any questions.
The solutions will be posted after the written homework due dates. If you have any questions about your work, talk to Richard and he is happy to discuss the process with you.

14.7.3.

Find the critical points of
\begin{equation*} f(x,y) = 8y^4 + x^2 + xy - 3y^2 - y^3 \end{equation*}
Use the contour map below to determine their nature (local minimum, local maximum, or saddle point).
Figure 14.7.17.
Solution.
First, we find the partial derivatives and set them to zero:
\begin{align*} f_x \amp= 2x + y = 0 \implies y = -2x \implies x = -\frac{y}{2} \\ f_y \amp= 32y^3 + x - 6y - 3y^2 = 0 \end{align*}
Substituting \(x = -\frac{y}{2}\) into the second equation:
\begin{align*} 32y^3 - \frac{y}{2} - 6y - 3y^2 \amp= 0 \\ 32y^3 - 3y^2 - \frac{13}{2}y \amp= 0 \\ y(64y^2 - 6y - 13) \amp= 0 \end{align*}
This gives \(y = 0\) or \(64y^2 - 6y - 13 = 0\text{.}\) Using the quadratic formula, we find \(y = \frac{6 \pm \sqrt{36 - 4(64)(-13)}}{128} = \frac{6 \pm 58}{128}\text{.}\) Thus, the \(y\)-values are \(0\text{,}\) \(\frac{1}{2}\text{,}\) and \(-\frac{13}{32}\text{.}\)
Using \(x = -\frac{y}{2}\text{,}\) our three critical points are \((0,0)\text{,}\) \(\left(-\frac{1}{4}, \frac{1}{2}\right)\text{,}\) and \(\left(\frac{13}{64}, -\frac{13}{32}\right)\text{.}\)
Now, instead of using the Second Partial Derivative Test, we can just look at the provided contour map to classify these points:
  • At the origin \((0,0)\text{,}\) we see the level curve for \(z = 0\) crossing itself in an "X" shape. The function increases if we move along the \(x\)-axis (towards \(0.1, 0.2\)), but decreases if we move along the \(y\)-axis (towards \(-0.1, -0.2\)). This is the hallmark of a saddle point.
  • At \(\left(-\frac{1}{4}, \frac{1}{2}\right) = (-0.25, 0.5)\text{,}\) we see concentric closed loops with values decreasing inward (from \(0\) down to \(-0.3\)). This "valley" indicates a local minimum.
  • At \(\left(\frac{13}{64}, -\frac{13}{32}\right) \approx (0.2, -0.4)\text{,}\) we see another set of concentric closed loops with values decreasing inward (from \(0\) down to \(-0.2\)). This second "valley" is also a local minimum.

Exercise Group.

In the following exercises, find the critical points of the function. Then use the Second Derivative Test to determine whether they are local minima, local maxima, or saddle points (or state that the test fails).
14.7.9.
\(f(x,y) = x^3 + 2xy - 2y^2 - 10x\)
Solution.
First, find the partial derivatives and set them to zero:
\begin{align*} f_x \amp= 3x^2 + 2y - 10 = 0 \\ f_y \amp= 2x - 4y = 0 \implies 2x = 4y \implies y = \frac{1}{2}x \end{align*}
Substitute \(y = \frac{1}{2}x\) into the first equation:
\begin{align*} 3x^2 + 2\lp \frac{1}{2}x \rp - 10 \amp= 0 \\ 3x^2 + x - 10 \amp= 0 \\ (3x - 5)(x + 2) \amp= 0 \end{align*}
So, \(x = \frac{5}{3}\) or \(x = -2\text{.}\) The corresponding \(y\)-values are \(y = \frac{5}{6}\) and \(y = -1\text{.}\) The critical points are \(\lp \frac{5}{3}, \frac{5}{6} \rp\) and \((-2, -1)\text{.}\)
Now, compute the second partial derivatives:
\begin{align*} f_{xx} \amp= 6x \\ f_{yy} \amp= -4 \\ f_{xy} \amp= 2 \end{align*}
The discriminant is \(D(x,y) = f_{xx}f_{yy} - (f_{xy})^2 = (6x)(-4) - (2)^2 = -24x - 4\text{.}\)
Evaluate at each critical point:
  • At \(\lp \frac{5}{3}, \frac{5}{6} \rp\text{:}\) \(D = -24\lp\frac{5}{3}\rp - 4 = -40 - 4 = -44 \lt 0\text{.}\) This is a saddle point.
  • At \((-2, -1)\text{:}\) \(D = -24(-2) - 4 = 48 - 4 = 44 \gt 0\text{.}\) Check \(f_{xx}(-2, -1) = 6(-2) = -12 \lt 0\text{.}\) This is a local maximum.
14.7.15.
\(f(x,y) = xye^{-x^2-y^2}\)
Solution.
First, find the partial derivatives using the product and chain rules, and set them to zero:
\begin{align*} f_x \amp= y \cdot e^{-x^2-y^2} + xy \cdot (-2x)e^{-x^2-y^2} = ye^{-x^2-y^2}(1 - 2x^2) = 0 \\ f_y \amp= x \cdot e^{-x^2-y^2} + xy \cdot (-2y)e^{-x^2-y^2} = xe^{-x^2-y^2}(1 - 2y^2) = 0 \end{align*}
Since \(e^{-x^2-y^2}\) is never zero, we have the system:
\begin{align*} y(1 - 2x^2) \amp= 0 \\ x(1 - 2y^2) \amp= 0 \end{align*}
From the first equation, either \(y = 0\) or \(1 - 2x^2 = 0 \implies x = \pm \frac{1}{\sqrt{2}}\text{.}\)
  • If \(y = 0\text{,}\) the second equation becomes \(x(1 - 0) = 0 \implies x = 0\text{.}\) Critical point: \((0,0)\text{.}\)
  • If \(x = \pm \frac{1}{\sqrt{2}}\text{,}\) the second equation gives \(\pm \frac{1}{\sqrt{2}}(1 - 2y^2) = 0 \implies 1 - 2y^2 = 0 \implies y = \pm \frac{1}{\sqrt{2}}\text{.}\)
This gives four more critical points: \(\lp \frac{1}{\sqrt{2}}, \frac{1}{\sqrt{2}} \rp, \lp \frac{1}{\sqrt{2}}, -\frac{1}{\sqrt{2}} \rp, \lp -\frac{1}{\sqrt{2}}, \frac{1}{\sqrt{2}} \rp, \lp -\frac{1}{\sqrt{2}}, -\frac{1}{\sqrt{2}} \rp\text{.}\)
Now compute the second partial derivatives (factoring out the exponential for simplicity):
\begin{align*} f_{xx} \amp= -2xy(3 - 2x^2)e^{-x^2-y^2} \\ f_{yy} \amp= -2xy(3 - 2y^2)e^{-x^2-y^2} \\ f_{xy} \amp= (1 - 2x^2)(1 - 2y^2)e^{-x^2-y^2} \end{align*}
We evaluate \(D = f_{xx}f_{yy} - (f_{xy})^2\) at each point. Note that the \(e^{-x^2-y^2}\) terms will be squared in \(D\) and always positive, so we can focus on the algebraic signs.
  • At \((0,0)\text{:}\) \(f_{xx} = 0\text{,}\) \(f_{yy} = 0\text{,}\) \(f_{xy} = (1)(1)(1) = 1\text{.}\) \(D = 0 - 1^2 = -1 \lt 0 \implies \) Saddle point.
  • At \(\lp \pm\frac{1}{\sqrt{2}}, \pm\frac{1}{\sqrt{2}} \rp\) (same signs): \(x^2 = y^2 = 1/2\text{,}\) so \(e^{-x^2-y^2} = e^{-1}\text{.}\) \(f_{xy} = (1 - 1)(1 - 1)e^{-1} = 0\text{.}\) \(f_{xx} = -2(1/2)(3 - 1)e^{-1} = -2e^{-1} \lt 0\text{.}\) \(f_{yy} = -2e^{-1} \lt 0\text{.}\) \(D = (-2e^{-1})(-2e^{-1}) - 0 = 4e^{-2} \gt 0\text{.}\) Since \(f_{xx} \lt 0\text{,}\) these are Local maxima.
  • At \(\lp \pm\frac{1}{\sqrt{2}}, \mp\frac{1}{\sqrt{2}} \rp\) (opposite signs): \(x^2 = y^2 = 1/2\text{,}\) so \(e^{-x^2-y^2} = e^{-1}\text{.}\) \(f_{xy} = 0\) (same as above). \(f_{xx} = -2(-1/2)(3 - 1)e^{-1} = 2e^{-1} \gt 0\text{.}\) \(f_{yy} = 2e^{-1} \gt 0\text{.}\) \(D = (2e^{-1})(2e^{-1}) - 0 = 4e^{-2} \gt 0\text{.}\) Since \(f_{xx} \gt 0\text{,}\) these are Local minima.
14.7.21.
\(f(x,y) = x - y^2 - \ln \lp x + y \rp\)
Solution.
First, find the partial derivatives and set them to zero:
\begin{align*} f_x \amp= 1 - \frac{1}{x+y} = 0 \implies \frac{1}{x+y} = 1 \implies x + y = 1 \implies x = 1 - y \\ f_y \amp= -2y - \frac{1}{x+y} = 0 \end{align*}
Substitute \(x + y = 1\) into the second equation:
\begin{align*} -2y - \frac{1}{1} \amp= 0 \\ -2y \amp= 1 \implies y = -\frac{1}{2} \end{align*}
If \(y = -\frac{1}{2}\text{,}\) then \(x = 1 - \lp-\frac{1}{2}\rp = \frac{3}{2}\text{.}\) The only critical point is \(\lp \frac{3}{2}, -\frac{1}{2} \rp\text{.}\) (Note: \(x+y = 1 > 0\text{,}\) so it is in the domain of the natural log).
Now, compute the second partial derivatives:
\begin{align*} f_{xx} \amp= (x+y)^{-2} = \frac{1}{(x+y)^2} \\ f_{yy} \amp= -2 + (x+y)^{-2} = -2 + \frac{1}{(x+y)^2} \\ f_{xy} \amp= (x+y)^{-2} = \frac{1}{(x+y)^2} \end{align*}
Evaluate at the critical point \(\lp \frac{3}{2}, -\frac{1}{2} \rp\text{,}\) where \(x+y=1\text{:}\)
\begin{align*} f_{xx} \amp= \frac{1}{1^2} = 1 \\ f_{yy} \amp= -2 + \frac{1}{1^2} = -1 \\ f_{xy} \amp= \frac{1}{1^2} = 1 \end{align*}
The discriminant is \(D = f_{xx}f_{yy} - (f_{xy})^2 = (1)(-1) - (1)^2 = -1 - 1 = -2\text{.}\)
Since \(D \lt 0\text{,}\) the point \(\lp \frac{3}{2}, -\frac{1}{2} \rp\) is a saddle point.

14.7.31.

Determine the global extreme values of the function
\begin{equation*} f(x,y) = \lp x^2 + y^2 + 1 \rp^{-1} \end{equation*}
on the set where \(0 \leq x \leq 3\) and \(0 \leq y \leq 5\) without using calculus.
Solution.
We can rewrite the function as \(f(x,y) = \frac{1}{x^2 + y^2 + 1}\text{.}\)
To find the global maximum, we need to make the denominator as small as possible. Since \(x^2 \geq 0\) and \(y^2 \geq 0\) for all real numbers, the smallest the denominator can be is when \(x=0\) and \(y=0\text{.}\) The point \((0,0)\) is in our domain.
\begin{equation*} f(0,0) = \frac{1}{0^2 + 0^2 + 1} = 1 \end{equation*}
The global maximum is 1.
To find the global minimum, we need to make the denominator as large as possible. Within our given domain \([0,3] \times [0,5]\text{,}\) \(x^2\) is maximized when \(x=3\) and \(y^2\) is maximized when \(y=5\text{.}\) The point \((3,5)\) maximizes the denominator.
\begin{equation*} f(3,5) = \frac{1}{3^2 + 5^2 + 1} = \frac{1}{9 + 25 + 1} = \frac{1}{35} \end{equation*}
The global minimum is \(\frac{1}{35}\text{.}\)

14.7.35.

A linear function \(f(x,y) = ax + by + c\) has no critical points. Therefore, the global minimum and maximum values of \(f(x,y)\) on a closed and bounded domain must occur on the boundary of the domain. Furthermore, it is not difficult to see that if the domain is a polygon, then the global minimum and maximum values of \(f\) must occur at a vertex of the polygon.
Find the global minimum and maximum values of \(f(x,y) = 12 + 5y - 20x\) on the following polygon, and indicate where on the polygon they occur.
Figure 14.7.18.
Solution.
Since \(f(x,y) = 12 + 5y - 20x\) is a linear function, its partial derivatives are constant (\(f_x = -20\) and \(f_y = 5\)) and never zero. Therefore, there are no interior critical points.
By the Extreme Value Theorem, the absolute maximum and minimum must occur on the boundary. Because the boundary is a polygon and the function is linear, the extreme values will occur exactly at the vertices of the polygon.
From the diagram, we can identify the four vertices of the polygon: \((-3, 0)\text{,}\) \((0, 2)\text{,}\) \((1, 0)\text{,}\) and \((0, -4)\text{.}\)
Now we evaluate \(f(x,y)\) at each vertex:
Comparing these values, the global maximum is \(72\text{,}\) which occurs at the vertex \((-3, 0)\text{.}\)
The global minimum is \(-8\text{,}\) which occurs at the vertices \((1, 0)\) and \((0, -4)\text{.}\) (Note: Because it occurs at two adjacent vertices, the function actually maintains this minimum value of -8 everywhere along the edge connecting those two points!).

Exercise Group.

In the following exercises, determine the global extreme values of the function on the given domain.
14.7.45.
\(f(x,y) = x^2 + xy^2 + y^2\, , \quad x,y \geq 0\, , \quad x y \leq 1\)
Solution.
The domain is a closed, bounded region in the first quadrant, bounded by the axes and the hyperbola \(xy = 1\text{.}\) However, \(x\) and \(y\) can technically extend infinitely along the axes. Wait, if \(xy \le 1\) and \(x,y \ge 0\text{,}\) the region is unbounded (it stretches along the axes). But let’s look for critical points and boundary behavior.
1. Interior Critical Points:
\begin{align*} f_x \amp= 2x + y^2 = 0 \implies 2x = -y^2 \\ f_y \amp= 2xy + 2y = 2y(x + 1) = 0 \end{align*}
From the second equation, either \(y = 0\) or \(x = -1\text{.}\) Since \(x \geq 0\text{,}\) \(x=-1\) is outside the domain. If \(y = 0\text{,}\) then \(2x = -0 \implies x = 0\text{.}\) The only critical point is \((0,0)\text{.}\)
2. Boundary \(x = 0\) (\(y \geq 0\)): \(f(0,y) = y^2\text{.}\) As \(y \to \infty\text{,}\) \(f \to \infty\text{.}\) Minimum at \(y=0\) is \(f(0,0)=0\text{.}\)
3. Boundary \(y = 0\) (\(x \geq 0\)): \(f(x,0) = x^2\text{.}\) As \(x \to \infty\text{,}\) \(f \to \infty\text{.}\) Minimum at \(x=0\) is \(f(0,0)=0\text{.}\)
4. Boundary \(xy = 1\) (\(x \gt 0\)): Substitute \(y = \frac{1}{x}\) into \(f\text{:}\)
\begin{align*} g(x) \amp= x^2 + x\lp\frac{1}{x}\rp^2 + \lp\frac{1}{x}\rp^2 = x^2 + \frac{1}{x} + \frac{1}{x^2} \end{align*}
Find critical points on this boundary:
\begin{align*} g'(x) \amp= 2x - x^{-2} - 2x^{-3} = \frac{2x^4 - x - 2}{x^3} = 0 \end{align*}
This polynomial \(2x^4 - x - 2 = 0\) has exactly one positive real root. Let’s approximate it or observe the behavior. It has a root near \(x \approx 1.08\text{.}\) This will be a local minimum on the boundary curve.
Conclusion: The absolute minimum is \(0\) at \((0,0)\text{.}\) Because the region is unbounded and \(f(x,0) = x^2\) approaches infinity as \(x \to \infty\text{,}\) there is no global maximum.
14.7.49.
\(f(x,y) = x^2 + 2xy^2\, , \quad x^2 + y^2 \leq 1\)
Solution.
The region is the closed unit disk.
1. Interior Critical Points:
\begin{align*} f_x \amp= 2x + 2y^2 = 0 \implies x = -y^2 \\ f_y \amp= 4xy = 0 \implies x = 0 \text{ or } y = 0 \end{align*}
If \(x = 0\text{,}\) then \(-y^2 = 0 \implies y = 0\text{.}\) If \(y = 0\text{,}\) then \(x = -0^2 = 0\text{.}\) The only critical point is \((0,0)\text{,}\) and \(f(0,0) = 0\text{.}\)
2. Boundary (\(x^2 + y^2 = 1\)): Substitute \(y^2 = 1 - x^2\) into the function to reduce it to one variable. Since \(x^2 + y^2 = 1\text{,}\) \(x\) must be in the interval \([-1, 1]\text{.}\)
\begin{align*} g(x) \amp= x^2 + 2x(1 - x^2) = x^2 + 2x - 2x^3 \qquad \text{for } x \in [-1, 1] \end{align*}
Find the critical points of \(g(x)\text{:}\)
\begin{align*} g'(x) \amp= 2x + 2 - 6x^2 = 0 \\ -6x^2 + 2x + 2 \amp= 0 \implies 3x^2 - x - 1 = 0 \end{align*}
Using the quadratic formula:
\begin{equation*} x = \frac{1 \pm \sqrt{(-1)^2 - 4(3)(-1)}}{6} = \frac{1 \pm \sqrt{13}}{6} \end{equation*}
Both \(x \approx 0.768\) and \(x \approx -0.434\) are within the interval \([-1, 1]\text{.}\)
Evaluate \(g(x)\) at these critical points and the endpoints \(x = \pm 1\text{:}\)
  • \(\displaystyle g(-1) = (-1)^2 + 2(-1) - 2(-1)^3 = 1 - 2 + 2 = 1\)
  • \(\displaystyle g(1) = 1^2 + 2(1) - 2(1)^3 = 1 + 2 - 2 = 1\)
  • \(x = \frac{1 + \sqrt{13}}{6}\text{:}\)
    \begin{equation*} g\lp\frac{1 + \sqrt{13}}{6}\rp \approx g(0.768) \approx (0.768)^2 + 2(0.768) - 2(0.768)^3 \approx 1.22 \end{equation*}
  • \(x = \frac{1 - \sqrt{13}}{6}\text{:}\)
    \begin{equation*} g\lp\frac{1 - \sqrt{13}}{6}\rp \approx g(-0.434) \approx (-0.434)^2 + 2(-0.434) - 2(-0.434)^3 \approx -0.52 \end{equation*}
Comparing all evaluated points (including the interior origin \(f(0,0)=0\)): The global maximum occurs at the boundary where \(x = \frac{1 + \sqrt{13}}{6}\) (approximately 1.22). The global minimum occurs at the boundary where \(x = \frac{1 - \sqrt{13}}{6}\) (approximately -0.52).

14.7.51.

Find the volume of the largest box of the type shown in the figure below, with one corner at the origin and the opposite corner at a point \(P = (x,y,z)\) on the paraboloid
\begin{equation*} z = 1 - \frac{x^2}{4} - \frac{y^2}{9} \qquad \text{ with } x,y,z \geq 0 \end{equation*}
Figure 14.7.19.
Solution.
To maximize the volume of a rectangular box, start with the relation \(V = xyz\) and using the paraboloid equation we see
\begin{gather*} z = 1 - \frac{x^2}{4} - \frac{y^2}{9} \quad \implies \quad V(x,y) = xy\left(1 - \frac{x^2}{4} - \frac{y^2}{9}\right) \end{gather*}
Therefore we will consider
\begin{gather*} V(x,y) = xy - \frac{1}{4}x^3y - \frac{1}{9}xy^3 \end{gather*}
First to find the critical points, we take the first-order partial derivatives and set them equal to zero, and solve:
\begin{gather*} V_x(x,y) = y - \frac{3}{4}x^2y - \frac{1}{9}y^3, \quad V_y(x,y) = x - \frac{1}{4}x^3 - \frac{1}{3}xy^2 \end{gather*}
Using the equation \(V_y = 0\) we see
\begin{gather*} x - \frac{1}{4}x^3 - \frac{1}{3}xy^2 = 0 \quad \implies \quad x = 0, \quad y^2 = 3 - \frac{3}{4}x^2 \quad \implies \quad y = \sqrt{3 - \frac{3}{4}x^2} \end{gather*}
(Note here, we can ignore the value \(x = 0\text{,}\) since it produces a box having zero volume.)
Using this relation in the first equation, \(V_x = 0\text{,}\) we see:
\begin{gather*} \sqrt{3 - \frac{3}{4}x^2} - \frac{3}{4}x^2\sqrt{3 - \frac{3}{4}x^2} - \frac{1}{9}\left(3 - \frac{3}{4}x^2\right)^{3/2} = 0 \end{gather*}
Factoring we see:
\begin{gather*} \sqrt{3 - \frac{3}{4}x^2}\left[1 - \frac{3}{4}x^2 - \frac{1}{9}\left(3 - \frac{3}{4}x^2\right)\right] = 0 \end{gather*}
and thus
\begin{gather*} 3 - \frac{3}{4}x^2 = 0 \quad \implies \quad x^2 = 4 \quad \implies \quad x = \pm 2 \end{gather*}
or
\begin{gather*} 1 - \frac{3}{4}x^2 - \frac{1}{3} + \frac{1}{12}x^2 = 0 \quad \implies \quad \frac{2}{3} - \frac{2}{3}x^2 = 0 \quad \implies \quad x = \pm 1 \end{gather*}
Since the governing equation \(f(x,y)\) is a paraboloid, that is symmetric about the \(z\)-axis, we need only consider the point when \(x = 2\) or \(x = 1\text{.}\)
Therefore, since \(y = \sqrt{3 - \frac{3}{4}x^2}\) and \(z = 1 - \frac{1}{4}x^2 - \frac{1}{9}y^2\text{,}\) we have, if \(x = 2\)
\begin{gather*} y = \sqrt{3 - \frac{3}{4} \cdot 4} = 0 \quad \implies \quad z = 1 - \frac{1}{4} \cdot 4 - \frac{1}{9} \cdot 0 = 0 \end{gather*}
This will give a box having zero volume - not a maximum volume at all.
Using \(x = 1\text{,}\) and \(y = \sqrt{3 - \frac{3}{4}x^2}\text{,}\) \(z = 1 - \frac{1}{4}x^2 - \frac{1}{9}y^2\text{,}\) we have
\begin{gather*} y = \sqrt{3 - \frac{3}{4}} = \frac{3}{2}, \quad z = 1 - \frac{1}{4} \cdot 1^2 - \frac{1}{9} \cdot \frac{9}{4} = \frac{1}{2} \end{gather*}
Therefore, the box having maximum volume has dimensions, \(x = 1\text{,}\) \(y = 3/2\text{,}\) and \(z = 1/2\) and maximum value for the volume:
\begin{gather*} V = xyz = 1 \cdot \frac{3}{2} \cdot \frac{1}{2} = \frac{3}{4} \end{gather*}

14.7.59.

Find the maximum volume of a cylindrical can such that the sum of its height and its circumference is 120 cm.
Solution.
The volume of a cylinder is \(V = \pi r^2 h\text{.}\) The constraint is that the height plus the circumference is 120 cm:
\begin{equation*} h + 2\pi r = 120 \implies h = 120 - 2\pi r \end{equation*}
Substitute \(h\) into the volume equation to get a function of a single variable \(r\text{:}\)
\begin{equation*} V(r) = \pi r^2 (120 - 2\pi r) = 120\pi r^2 - 2\pi^2 r^3 \end{equation*}
To find the maximum, take the derivative and set it to zero:
\begin{align*} V'(r) \amp= 240\pi r - 6\pi^2 r^2 = 0 \\ 6\pi r (40 - \pi r) \amp= 0 \end{align*}
Since a radius of 0 gives a minimum volume of 0, the maximum must occur when:
\begin{equation*} 40 - \pi r = 0 \implies r = \frac{40}{\pi} \text{ cm} \end{equation*}
Find the corresponding height \(h\text{:}\)
\begin{equation*} h = 120 - 2\pi\lp \frac{40}{\pi} \rp = 120 - 80 = 40 \text{ cm} \end{equation*}
Calculate the maximum volume:
\begin{align*} V \amp= \pi \lp \frac{40}{\pi} \rp^2 (40) \\ V \amp= \pi \lp \frac{1600}{\pi^2} \rp (40) = \frac{64000}{\pi} \text{ cm}^3 \end{align*}