When I'm asked to find both the maxima and minima of a function on a constraint set

393 Views Asked by At

I want to find out the max min by the lagrange theorem.

Find the max min of :; $f(x,y,z)=xyz$

subject to ;

$x+y+z=5$ and $ xy+xz+yz=8$

Okay So I can set the typical lagrangian $L_1=f-\delta_1(x+y+z-5)-\delta_2(xy+xz+yz-8)$

Above, I set the lagrangian to find the max of the objective function. If I wanted to find the min, then I would have done the following :

$L_2=f+\delta_1(x+y+z-5)+\delta_2(xy+xz+yz-8)$ or $L_3=-f-\delta_1(x+y+z-5)-\delta_2(xy+xz+yz-8)$

My question is, from the lagrangian $L_1$ will we always get the max? Suppose you end up with two candidates, will both of them be local maximum? Or can it there be minimum if we end up with two candidates?

Suppose I use $L_1$ again, then is there anyway my only candidate is a min?

Would be great if you help. I don't want to use the bordered Hessian overtime I solve a lagrangian, sometimes I just want to conclude right away that that's a max!

Now, back to the question, how would you recommend me to solve this kind of a question using lagrangian theorem? Should I apply two lagranges $L_1$ and $L_2$ respectively?

Or you can also tell me what I can use besides the lagrangian.

Thanks!

2

There are 2 best solutions below

1
On BEST ANSWER

If you don't mind cooking particular solutions to specific problems, you can go about as follows. Rewrite the second restriction as

\begin{align}\tag{1}\label{eq}x(y+z)+yz=x(5-x)+yz=8\end{align}

where on the first equality we have used the first restriction $x+y+z=5$. Then:

$$x^2(5-x)+xyz=8x,$$

that is, if $(x,y,z)$ is under the two restrictions then

\begin{align}\tag{2}\label{eq2}f(x,y,z)=x^3-5x^2+8x\end{align}

which reduces the problem to min-maxing a a function of a single real variable.

Care must be taken with the domain. For which values of $x$ is there an $(x,y,z)$ that satisfies both restrictions? In other words, for which values of $x$ does the system

$$\left\{\begin{array}{l} y+z=(5-x)\\ x(y+z)+yz=8\end{array}\right.$$

have a solution? This system is equivalent to

$$\left\{\begin{array}{l} y+z=(5-x)\\ yz=8-x(5-x)\end{array}\right.$$

and a simple substitution $y=(5-x)-z$ yields that $z$ must satisfy a quadratic equation

$$z^2-(5-x)z+(8-x(5-x))=0$$

so that $\Delta \geq0$ can be written as

$$-3x^2+10x-7\geq0$$

The solution is $x \in \left[1,\frac73\right]$, so that the min-max in $\eqref{eq2}$ is over this range.


A second interesting cooked solution takes advantage of the fact that $f$ and both restrictions are symmetric polynomials in $x,y,z$. We have the identity:

$$(\lambda-x)(\lambda-y)(\lambda-z)={\lambda}^3-(x+y+z){\lambda}^2+(xy+yz+xz)\lambda-xyz$$

Hence, if $(x,y,z)$ satisfy the restrictions we have that for all $\lambda$

$$f(x,y,z)={\lambda}^3-5{\lambda}^2+8\lambda-(\lambda-x)(\lambda-y)(\lambda-z)$$

In particular, taking $\lambda =x$ produces

$$f(x,y,z)=x^3-5x^2+8x,$$

and we may proceed as in $\eqref{eq2}$.

0
On

If the constraint set is compact (i.e., closed and bounded), the global maximum and minimum values will be attained, and those points will be constrained critical points. There must be at least two. You need only check the value of the function at those points to determine which is which.

If the constraint set is not compact, you may not have a maximum or a minimum. The bordered Hessian will work, or you can use a geometric argument to classify the critical points.

In your problem, the constraint set is compact. It is closed because it is the intersection of the zero sets of two polynomials, which are continuous functions. It is bounded because: \begin{align*} x^2 + y^2 + z^2 = (x+y+z)^2 - 2(xy + yz + xz) = 25 - 2\cdot 8 = 9 \end{align*} So the constraint set is in fact contained in the sphere of radius $3$ centered at the origin. (Intersecting with the plane $x+y+z=5$, we see it's actually a circle.)

Let $g(x,y,z) = x+y+z)$ and $h(x,y,z) = xy + yz + xz$. The problem is to maximize $f(x,y,z) = xyz$ subject to the constraints that $g=5$ and $h=8$. You only need a single lagrangian $L=f-\lambda (g-5) -\mu(h-8)$. The system of Lagrange equations is: \begin{align*} yz &= \lambda + \mu(y+z) \tag{1}\label{eqn-1} \\ xz &= \lambda + \mu(x+z) \tag{2}\label{eqn-2} \\ xy &= \lambda + \mu(x+y) \tag{3}\label{eqn-3} \end{align*} \begin{gather} x + y + z = 5\tag{4}\label{eqn-4} \\ xy + yz + xz = 8\tag{5}\label{eqn-5} \\ \end{gather} With nonlinear systems like these, I like to use combinations and involve the constraint equations. Adding both sides of \eqref{eqn-1}, \eqref{eqn-2}, and \eqref{eqn-3} together and substituting \eqref{eqn-4} and \eqref{eqn-5} gives $$ 8 = 3\lambda + 10\mu \tag{6}\label{eqn-6} $$ Subtracting \eqref{eqn-1} and \eqref{eqn-2} gives $$ (y-x)z = \mu(y-x) \tag{7}\label{eqn-7} $$ Canceling $y-x$ from each side may eliminate possible solutions here. We can only conclude that either $x=y$ or $\mu=z$ (or both).

First suppose that $\mu =z$. Then substituting into \eqref{eqn-1} we get $$ yz = \lambda + yz + z^2 \implies \lambda = -z^2 $$ Substituting this into \eqref{eqn-6}, \begin{gather} 8 = -3z^2 + 10z \implies 3z^2-10z+8=0 \end{gather} The solutions are $z=2$ and $z=\frac{4}{3}$. Again, we proceed casewise.

Suppose that $z=2$. Then \eqref{eqn-4} and \eqref{eqn-5} become \begin{align*} x+y+2 &=5 &\implies x+y &= 3 \\ xy + 2x + 2y &= 8 &\implies xy &=2 \end{align*} Isolating $y$ in the second gives $y= \frac{2}{x}$, which, after substituting in the first gives $$ x + \frac{2}{x} = 3 \implies x^2 + 2 = 3x \implies x^2 -3x + 2 =0 $$ The solutions are $x=2$ or $x=1$. So we have two critical points: $(2,1,2)$ and $(1,2,2)$.

Now suppose $z=\frac{4}{3}$. Then \begin{align*} x+y+\frac{4}{3} &=5 &\implies x+y &= \frac{11}{3} \\ xy + \frac{4}{3}x + \frac{4}{3}y &= 8 &\implies xy &=8 - \frac{4}{3}\cdot \frac{11}{3} = \frac{28}{9} \end{align*} The solutions here are $x=\frac{7}{3}$ and $y=\frac{4}{3}$ or vice versa. So we have two more critical points: $\left(\frac{7}{3},\frac{4}{3},\frac{4}{3}\right)$ and $\left(\frac{4}{3},\frac{7}{3},\frac{4}{3}\right)$.

Now go back to \eqref{eqn-7} and suppose $x=y$. Then \eqref{eqn-4} and \eqref{eqn-5} become \begin{align} 2x+z &= 5 \\ x^2 + 2xz &= 8 \end{align} Isolating $z=5-2x$ from the first and substituting it into the second gives $$ x^2 + 2x(5-2x) =8 \implies -3x^2 + 10x = 8 \implies 3x^2 - 10x+8=0 $$ This is the same equation we saw above with the variable $z$. The solutions are $x=2$ or $x = \frac{4}{3}$. We have two more critical points: $(2,2,1)$ and $\left(\frac{4}{3},\frac{4}{3},\frac{7}{3}\right)$.

So there are six critical points in all: $$ \begin{array}{rrr|rr||r} x & y & z & \lambda & \mu & f \\\hline 2 & 2 & 1 & -4 & 2 & 4 \\ 2 & 1 & 2 & -4 & 2 & 4 \\ 1 & 2 & 2 & -4 & 2 & 4 \\ \frac{4}{3} & \frac{4}{3} &\frac{7}{3} & -\frac{8}{9} & \frac{4}{3} & \frac{112}{27} \\ \frac{4}{3} & \frac{7}{3} &\frac{4}{3} & -\frac{8}{9} & \frac{4}{3} & \frac{112}{27} \\ \frac{7}{3} & \frac{4}{3} &\frac{4}{3} & -\frac{8}{9} & \frac{4}{3} & \frac{112}{27} \\ \end{array} $$ $\frac{112}{27}$ is just a bit more than $4$, so that is the maximum value, and $4$ is the minimum value.