# System of equations in Lagrange multiplier problem

Continuing from Confounding Lagrange multiplier problem:

I'm having trouble solving the system of equations below arisen from a Lagrange multiplier problem where we are to optimize $f(x,y,z) = 4x^2 + 3y^2 + 5z^2$ over $g(x,y,z) = xy + 2yz + 3xz = 6$.

$$\begin{cases} 8x = \lambda (y + 3z) \\ 6y = \lambda (x + 2z) \\ 10 z = \lambda (2y + 3x) \\ xy + 2yz + 3xz = 6 \end{cases}$$

One suggestion I have got is to eliminate the terms $xy$, $yz$ and $xz$, however I have been unable to figure out how to do so. Help much appreciated!

Adding the equations $8x=\lambda(y+3z)$, $6y=\lambda(x+2z)$, and $10z=\lambda(2y+3x)$ gives

$\lambda(4x+3y+5z)=8x+6y+10z$, so either $\lambda=2$ or $4x+3y+5z=0$.

$\textbf{1)}$ If $\lambda=2$, we have $8x=y+6z$ and $6y=2x+4z$, so $4x-y-3z=0$ and $x-3y+2z=0$.

Then $3(4x-y-3z)-(x-3y+2z)=0\implies 11x-11z=0\implies z=x$, and then

$x-3y+2z=0\implies y=x$.

Substituting into the constraint gives $6x^2=6$, so $x^2=1$ and $x=\pm1$.

Thus points where extrema can occur are $(1,1,1)$ and $(-1,-1,-1)$.

$\textbf{2)}$ If $4x+3y+5z=0$, then $z=-\frac{1}{5}(4x+3y)\implies xy-\frac{2}{5}y(4x+3y)-\frac{3}{5}x(4x+3y)=6$ $\implies 5xy-8xy-6y^2-12x^2-9xy=30\implies -12x^2-12xy-6y^2=30\implies$ $2x^2+2xy+y^2=-5\implies(y+x)^2+x^2=-5,$ so there is no solution in this case.

• that's much simpler. I was carried away with the procedure for similar problems, such as "the volume of a box..." – cjferes Aug 14 '14 at 16:28
• @cjferes Thanks - but your procedure is the one that is generally used for this type of problem. – user84413 Aug 14 '14 at 16:33
• This is brilliant! – thelionkingrafiki Aug 14 '14 at 21:57
• @thelionkingrafiki Thanks! It was more a matter of floundering around until I found something that worked, though. – user84413 Aug 14 '14 at 22:00

This kind of systems can be tipically done with multipliyng by "convenient ones": $$\begin{array}{rl} (1)&8x=\lambda (y+3z)\,\,\,\,/\cdot x\\ (2)&6y=\lambda (x+2z)\,\,\,\,/\cdot y\\ (3)&10z=\lambda (2y+3x)\,\,\,\,/\cdot z\\ (4)&xy+2yz+3xz=6\\ \end{array}$$ I've selected these "convenient ones" because they'll lead into terms with $xy$, $xz$ and $yz$ on the RHS of equations $(1)$, $(2)$ and $(3)$. Then $$\begin{array}{rl} (1)\Rightarrow& \frac{8x^2}{\lambda}=xy+3xz\,\,\,(5)\\ (2)\Rightarrow& \frac{6y^2}{\lambda}=xy+2yz\,\,\,(6)\\ (3)\Rightarrow& \frac{10z^2}{\lambda}=2yz+3xz\,\,\,(7)\\ \end{array}$$

Summing $(5)+(6)+(7)$, $$\begin{array}{rcl} \frac{8x^2}{\lambda}+\frac{6y^2}{\lambda}+\frac{10z^2}{\lambda}&=&2xy+4yz+6xz\\ \Rightarrow\frac{1}{\lambda}(4x^2+3y^2+5y^2)&=&(xy+2yz+3xz)\,\,\,(8) \end{array}$$

Replacing $(4)$ in $(8)$, $$(4x^2+3y^2+5y^2)=6\lambda\,\,\,(9)$$

EDIT:

This yields an expression that we will use later.

Now, let's replace $(1)$, $(2)$ and $(3)$ in $(4)$, simplifying their LHS for $x$, $y$ and $z$, respectively: $$\frac{\lambda(y+3z)}{8} \frac{\lambda(x+2z)}{6}+2 \frac{\lambda(x+2z)}{6} \frac{\lambda(2y+3x)}{10} +3\frac{\lambda(y+3z)}{8}\frac{\lambda(2y+3x)}{10}=6$$

After a bit of simplifying (and using $(4)$ a couple of times and $(9)$ once) you'll get a cubic equation for $\lambda$: $$\lambda^2(\lambda+8)=40$$

The only real root for this equation is $\lambda=2$.

Now you can find $x$, $y$ and $z$.

Good luck!!

• This would still lead to a system of 4 cubic equations in $x,y$ and $z$ right? Not really that easy to solve. I would imagine it makes more sense to eliminate the bilinear terms rather than lambda. – wonko Aug 13 '14 at 21:02
• Now it's been resolved. My initial advice was misleading, but I've corrected it and guided even more to the answer. Hope it helps! – cjferes Aug 13 '14 at 23:16
• @cjferes: Whoa, more complicated problem than one may think. Thanks a heap! – thelionkingrafiki Aug 14 '14 at 15:16
• @cjferes cool. upvoted :) – wonko Aug 14 '14 at 15:35
• the other answer is much simpler. i got carried away by th idea of multiplicating to eliminate terms $xy$, $xz$,$yz$... – cjferes Aug 14 '14 at 16:29