Calculus – Finding Min and Max of $u=xyz$ Using Lagrange Multipliers

calculuslagrange multiplier

I'm trying to solve this task:

Find min and max of function $u=xyz$ subject to $x^2+y^2+z^2=1$ and $x+y+z=0$ using Lagrange multipliers.

My teacher advised to replace $xyz$ with $ln(xyz)$ so it would be easier to calculate derivatives. So I have this system of equations:

$L = ln(xyz) + \alpha_1(x^2+y^2+z^2-1) + \alpha_2(x+y+z)$

$L'_x = \frac{1}{x}+2x\alpha_1+\alpha_2=0$

$L'_y = \frac{1}{y}+2y\alpha_1+\alpha_2=0$

$L'_z = \frac{1}{z}+2z\alpha_1+\alpha_2=0$

I can easily find that $\alpha_1=-\frac{3}{2}$ using two extra equations.

So the system becomes this:

$L'_x = \frac{1}{x}-3x+\alpha_2=0$

$L'_y = \frac{1}{y}-3y+\alpha_2=0$

$L'_z = \frac{1}{z}-3z+\alpha_2=0$

Then $\alpha_2 = \frac{3x^2-1}{x}=\frac{3y^2-1}{y}=\frac{3z^2-1}{z}$

I can suppose that $x = y$ then $x=y=+-\frac{1}{\sqrt(6)}$ and $z=-+\frac{2}{\sqrt(6)}$

$dL = (\frac{1}{x}-3x+\alpha_2)dx + (\frac{1}{y}-3y+\alpha_2)dy + (\frac{1}{z}-3z+\alpha_2)dz$

Then $d^2L = (-\frac{1}{x^2}-3)dx^2 + (-\frac{1}{y^2}-3)dy^2 + (-\frac{1}{z^2}-3)dz^2$

But it seems like it's always negative so the point is always maximum.

According to the answers point $(\frac{1}{\sqrt(6)}, \frac{1}{\sqrt(6)}, -\frac{2}{\sqrt(6)})$ should be minimum and point $(-\frac{1}{\sqrt(6)}, -\frac{1}{\sqrt(6)}, \frac{2}{\sqrt(6)})$ should be maximum.

Could somebody please explain what I am doing wrong?

Thanks in advance.

Best Answer

When you switch from optimizing $xyz$ to optimizing $\ln xyz$, you lose all the minimizers. That's because $\ln xyz$:

  1. Is not defined when $xyz<0$;
  2. Can be made arbitrarily negative - for example, by taking $(x,y,z)$ approaching $(\frac1{\sqrt2}, -\frac1{\sqrt 2}, 0)$ from the direction where $x>0$ and $y,z<0$.

So when we replace $xyz$ by $\ln xyz$, we are solving a slightly different problem, and it's only worth trying to find the points $(x,y,z)$ that maximize $\ln xyz$.

We can then recover the minimizers by observing that $(x,y,z)$ and $(-x,-y,-z)$ both satisfy the constraints if one does, but $(-x)(-y)(-z) = -(xyz)$. Therefore $(x,y,z)$ is a minimizer exactly when $(-x,-y,-z)$ is a maximizer.