# 16. Max-Min Problems

## b. Constrained Max-Min Problems

In a constrained max-min problem, we extremize or optimize a function of several variables called the extremal or optimized function subject to a constraint equation satisfied by the variables. This means we find the maximum or minimum (the extremum) of the optimized function while requiring the varibles to satisfy the constraint equation. We will look at three methods of solving constrained max-min problems: eliminate a variable, introduce a Lagrange multiplier or parametrize the constraint. We discuss these on this and subsequent pages.

## 1. Eliminate a Variable Method

The first strategy for solving a constrained max-min problem is the Eliminate a Variable Method in which we solve the constraint for one variable and eliminate that variable from the optimized function. We can then set the partial derivatives of this new function equal to zero to find the critical points and thus the maximum or minimum values. This is best understood by using an example.

Find the dimensions and volume of the largest rectangular box with base on the \(xy\)-plane and upper vertices on the elliptic paraboloid \(z=9-4x^2-y^2\).

One first needs to recognize that, in this problem, the word "largest" means to maximize the volume of the box. Since the upper \(4\) vertices are on the parabola, if one of the vertices is \((x,y,z)\) with \(x\) and \(y\) positive, then the other \(3\) are\((-x,y,z)\), \((x,-y,z)\) and \((-x,-y,z)\). So the length is \(L=2x\), the width is \(W=2y\) and the height is \(H=z\). So the volume is \[ V=LWH=(2x)(2y)(z)=4xyz \] We need to maximize this volume while requiring the point \((x,y,z)\) to lie on the paraboloid: \[ z=9-4x^2-y^2 \]

Now we need to solve the constraint for a variable and replace that variable in the optimized function by its value from the constraint. In this case, \(z\) is the easiest variable to replace, since it is already given explicitly by the constraint equation. Substituting into the volume gives \[ V=4xy(9-4x^2-y^2)=36xy-16x^3y-4xy^3 \] This is the function we need to maximize. Remember to simplify before differentiating. We set the partial derivatives equal to zero: \[ V_x=36y-48x^2y-4y^3=0 \] \[ V_y=36x-16x^3-12xy^2=0 \] and solve for \(x\) and \(y\). Normally we would factor a \(y\) out of the first equation and an \(x\) out of the second equation and then do case work, but for this problem, \(y=0\) or \(x=0\) would give \(0\) volume, which obviously is not a maximum. Therefore, we can simply divide the first equation by \(y\) and the second equation by \(x\) to get: \[\begin{aligned} 48x^2+4y^2&=36 \\ 16x^2+12y^2&=36 \end{aligned}\] To find \(x\), eliminate \(y\) by multiplying the first equation by \(3\) and subtracting the second equations: \[ (144-16)x^2=108-36 \qquad \text{or}\qquad 128x^2=72 \] \[ x^2=\dfrac{9}{16} \qquad \text{or}\qquad x=\dfrac{3}{4} \] To find \(y\), eliminate \(x\) by multiplying the second equation by \(3\) and subtracting the first equation: \[ (36-4)y^2=108-36 \qquad \text{or}\qquad 32y^2=72 \] \[ y^2=\dfrac{9}{4} \qquad \text{or}\qquad y=\dfrac{3}{2} \] (Alternatively, substitute \(x=\dfrac{3}{4}\) into either equation to find \(y=\dfrac{3}{2}\).) Before saying we are finished, we must carefully reread the problem to be sure we have found what the question asks for. We need to find the dimensions and the volume. We plug the values of \(x\) and \(y\) into the constraint to get \(z\). \[ z=9-4x^2-y^2=9-4\left(\dfrac{9}{16}\right)-\,\dfrac{9}{4}=\dfrac{9}{2} \] Caution: The dimensions are not just \(x\), \(y\) and \(z\)! They are the length, width and height: \[ L=2x=\dfrac{3}{2} \qquad W=2y=3 \qquad H=z=\dfrac{9}{2} \] So the volume is: \[ V=LWH=\dfrac{3}{2}3\dfrac{9}{2}=\dfrac{81}{4} \]

Find the dimensions and volume of the largest rectangular box inscribed in the ellipsoid \(x^2+\dfrac{y^2}{4}+\dfrac{z^2}{16}=1\).

Note: "Inscribed" means all \(8\) vertices lie on the ellipsoid. What are the length, width and height?

The length, width and height are: \[ L=\dfrac{2}{\sqrt{3}} \qquad W=\dfrac{4}{\sqrt{3}} \qquad H=\dfrac{8}{\sqrt{3}} \] So the volume is: \[ V=\dfrac{64}{3\sqrt{3}} \]

One first needs to recognize that, in this problem, the word "largest" means to maximize the volume of the box. Since all \(8\) vertices are on the ellipsoid, if one of the vertices is \((x,y,z)\) with \(x\), \(y\) and \(z\) positive, then the \(8\) are\((\pm x,\pm y,\pm z)\). So the length is \(L=2x\), the width is \(W=2y\), the height is \(H=2z\) and the volume is \[ V=LWH=(2x)(2y)(2z)=8xyz \] We need to maximize this volume while requiring the point \((x,y,z)\) to lie on the ellipsoid constraint: \[ x^2+\dfrac{y^2}{4}+\dfrac{z^2}{16}=1 \]

Now we need to solve the constraint for a variable and replace that variable in the optimal function by its value from the constraint. In this case, \(x\) is the easiest variable to replace, since it is easier to solve for: \[ x=\sqrt{1-\,\dfrac{y^2}{4}-\,\dfrac{z^2}{16}} \] Substituting into the volume gives \[ V=8yz\sqrt{1-\,\dfrac{y^2}{4}-\,\dfrac{z^2}{16}} \] This is the function we need to maximize. We set the partial derivatives equal to zero: \[\begin{aligned} V_y&=8z\sqrt{1-\,\dfrac{y^2}{4}-\,\dfrac{z^2}{16}} +\dfrac{8yz}{2\sqrt{1-\,\dfrac{y^2}{4}-\,\dfrac{z^2}{16}}} \left(\dfrac{-2y}{4}\right)=0 \qquad \text{(1)} \\ V_z&=8y\sqrt{1-\,\dfrac{y^2}{4}-\,\dfrac{z^2}{16}} +\dfrac{8yz}{2\sqrt{1-\,\dfrac{y^2}{4}-\,\dfrac{z^2}{16}}} \left(\dfrac{-2z}{16}\right)=0 \qquad \text{(2)} \end{aligned}\] and solve for \(x\) and \(y\). We start by clearing the denominators in equations (1) and (2): \[\begin{aligned} &16z\left(1-\,\dfrac{y^2}{4}-\,\dfrac{z^2}{16}\right)-4y^2z=0 \\ &16y\left(1-\,\dfrac{y^2}{4}-\,\dfrac{z^2}{16}\right)-yz^2=0 \end{aligned}\] and simplify: \[\begin{aligned} &16z-4y^2z-z^3-4y^2z=0 \\ &16y-4y^3-yz^2-yz^2=0 \end{aligned}\] or: \[\begin{aligned} &z(16-8y^2-z^2)=0 \\ &2y(8-2y^2-z^2)=0 \end{aligned}\] Notice that \(y\) and \(z\) cannot be \(0\) or else the volume would be \(0\). So the equations say: \[\begin{aligned} &8y^2+z^2=16 \qquad \text{(3)} \\ &2y^2+z^2=8 \qquad \enspace \text{(4)} \end{aligned}\] Equation (3) minus equation (4) says \(6y^2=8\). So \(y=\dfrac{2}{\sqrt{3}}\). Similarly, \(4\) times equation (4) minus equation(3) says \(3z^2=16\). So \(z=\dfrac{4}{\sqrt{3}}\). Consequently, \[ x=\sqrt{1-\,\dfrac{y^2}{4}-\,\dfrac{z^2}{16}} =\sqrt{1-\,\dfrac{1}{3}-\,\dfrac{1}{3}}=\dfrac{1}{\sqrt{3}} \] Finally, we carefully reread the problem. We need to find the dimensions and the volume. The length, width and height are: \[ L=2x=\dfrac{2}{\sqrt{3}} \qquad W=2y=\dfrac{4}{\sqrt{3}} \qquad H=2z=\dfrac{8}{\sqrt{3}} \] So the volume is: \[ V=LWH=\dfrac{64}{3\sqrt{3}} \]

Find the point on the plane \(3x-y+z=2\) that is closest to the point \((7,1,4)\).

Note: "Closest" means to minimize the distance. Equivalently, we can minimize the square of the distance.

\((x,y,z)=(1,3,2)\)

It is important to recognize that the word "closest" means that we should minimize the distance. In this case, we need to minimize the distance from the point \(P=(7,1,4)\) to a general point \(Q=(x,y,z)\) on the plane. This distance is: \[ D=\sqrt{(x-7)^2+(y-1)^2+(z-4)^2} \] Now if the distance is a minimum, then so is the square of the distance. So we will actually minimize the function: \[ f=D^2=(x-7)^2+(y-1)^2+(z-4)^2 \]

The constraint is the equation of the plane, which we solve for \(z\):
\[
z=2-3x+y
\]
Substituting into the extremal, we need to minimize
\[
f=(x-7)^2+(y-1)^2+(-3x+y-2)^2
\]
We set the partials equal to \(0\):
\[\begin{aligned}
f_x&=2(x-7)+2(-3x+y-2)(-3)=0 \\
f_y&=2(y-1)+2(-3x+y-2)=0
\end{aligned}\]
We divide these equations by \(2\) and simplify:
\[\begin{aligned}
10x-3y&=1 \\
-3x+2y&=3
\end{aligned}\]
We solve these equations to find \(x=1\) and \(y=3\) and so
\(z=2-3x+y=2-3(1)+(3)=2\).
So the point is:
\[
(x,y,z)=(1,3,2)
\]
If we were asked for the distance, it would be:
\[\begin{aligned}
D&=\sqrt{(1-7)^2+(3-1)^2+(2-4)^2} \\
&=\sqrt{(6)^2+(2)^2+(2)^2}=\sqrt{44}
\end{aligned}\]
*Don't forget the square root!*

Notice that this problem could also be solved by using projections as done previously.

## Heading

Placeholder text: Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum