[Math] lagrangian minimisation problem and Karush-Kuhn-Tucker conditions

linear algebraoptimization

A rectangular box without a lid is to be made from 50m² of cardboard. Find the maximum volume of such a box.( i know how to solve this in the conventional way, i am trying to figure out how to do it using this method, where the problem needs to be converted to a minimisation method then using the Karush-Kuhn-Tucker conditions)

objective function and constraints will be:
$\max [f(x,y,z)]=xyz$
subject to $h(x,y,z)=xy+2yz+2zx-50=0$

Now to Convert to standard Lagrangian minimisation problem
I use the fact that $\min f(x)=\max -f(x)$
then the langrangian $$L(x,y,z)=f(x,y,z)-kc(x,y,z)=
-xyz-k(xy+2yz+2zx-50)$$
and this should now be a minimisation problem

The Karush-Kuhn-Tucker conditions state that for a minimisation problem:
$\nabla L(x^*,y^*,z^*,k^*)=0$ and $c(x^*,y^*,z^*)=0$ where the values of $x^*,y^* z^*$ are the solutions for the minimum.

then if i can show that the hessian matrix for the langrangian $L(x^*,y^*,z^*,k^*)$ is positive definite then this shows that the values i have found corespond to the global minimum.

I cant actually solve the equations $\nabla L(x*,y*,z*,k*)=0$ and $c(x*,y*,z*)=0$. When i put them in matrix form i get a mess, so this is what i am stuck on and i am starting to get a bit confused.

Best Answer

Note first that since $L(x,y,z,k) = −xyz−k(xy+2z(x+y)−50) = L(y,x,z,k)$, the problem is symmetric in $x,y$.

Let's proceed with brutal arithmetic. We have 4 equations in 4 unknowns:

$$ \begin{split} 0 &= -L_x = yz + k(y + 2z)\\ 0 &= -L_y = xz + k(x + 2z)\\ 0 &= -L_z = xy + 2k(x + y)\\ 50 &= xy+2z(x+y) \quad (\text{from } c=0) \end{split} $$

Claim 1. $x \neq 0$ and $y \neq 0$ and $x + y \neq 0$.

Proof. Note first that if $x=0$, then the second constraint implies $k=0$ or $z=0$. If $x=k=0$, the first constraint implies $yz=0$ and the last constraint implies $2yz=50$, which is impossible.

Similarly, if $x=z=0$, the first constraint implies $ky = 0$. As we proved, $k=0$ is impossible, so must be $x=y=z=0$, which contradicts the last constraint.

To establish the last claim, note that if $x+y =0$, the third constraint yields $xy=0$ and the last one yields $xy=50$, which is a contradiction. QED

Now, solving the last constraint for $z$ and the $L_z$ constraint for $k$, we get

$$k = \frac{-xy}{2(x+y)} \text{ and } z = \frac{50-xy}{2(x+y)}.$$

Both of these are well-defined since $x\neq0$ and $y \neq 0$. Plug both of these into the first constraint, getting

$$0 = \frac{y(50-xy)}{2(x+y)} - \frac{xy^2}{2(x+y)} - \frac{2xy(50-xy)}{2^2(x+y)^2}$$

and now multiply both sides by $2(x+y)^2 \neq 0$ to get

$$0 = y(50-xy)(x+y) - xy^2(x+y) - xy(50-xy).$$

Divide by $y \neq 0$ and bring the last term into the first term and divide by $y$ again: $$ \begin{split} 0 &= (50-xy)(x+y) - xy(x+y) - x(50-xy)\\ 0 &= y(50-xy) - xy(x+y) \\ 0 &= 50-xy - x(x+y) = 50 - 2xy - x^2\\ 50 &= x^2 + 2xy \end{split} $$

and because the problem is symmetric, the symmetric constraint must hold (if you want, you can derive it the same way from the second constraint):

$$ \begin{split} x^2 + 2xy &= 50 \\ y^2 + 2xy &= 50 \end{split} $$

Hence subtracting them yields $x^2 = y^2$, so $x = \pm y$, but $x \neq -y$ by Claim 1, so $x = y$. Now $50 = x^2 + 2xy = 3x^2$ implies $x = \pm \sqrt{50/3} = y$, and there are two solutions: $(\sqrt{50},\sqrt{50})$ and $(-\sqrt{50},-\sqrt{50})$.

Since $x,y$ are lengths, we know only one will make sense: $x = y = \sqrt{50/3}$. Now plug this back in to find $z$ and $k$ as desired.