<s>[INST] System of 5x5 non-linear equations from Lagrange multiplier problem I have a Lagrange multiplier problem, and I've got down to the system of equations, but solving these has proved to be a nightmare for me.
I have five equations:
$$x+y+z=0$$
$$x^2+y^2+z^2=24$$
$$y=\lambda_1+2x\lambda_2$$
$$x=\lambda_1+2y\lambda_2$$
$$2=\lambda_1+2z\lambda_2$$
I keep getting down to $x=y$ but I know that a local minimum occurs when $x=\frac{1-3\sqrt5}{2},y=\frac{1+3\sqrt5}{2},z=-1$ and I can't seem to get down to that one.
I can see the answers, I'm just struggling with the working.
For reference, the original problem is to find the extrema for:
$$f(x,y,z)=xy+2z$$
with the constraints of $x+y+z=0$ and $x^2+y^2+z^2=24$
Please help...
 [/INST] One method is to eliminate the constraints. We have $x+y+z=0$ so $z=-x-y$. Also $x^2+y^2+z^2=1$ so
\begin{eqnarray*}
xy+yz+zx&=&-12.  \\
f =xy+2z &=& -12+z(2-x-y)=12+z(2+z)=(z+1)^2-13
\end{eqnarray*}
So the extreme point occurs at $z=-1$. Now lets calulate $x$ & $y$
\begin{eqnarray*}
x+y&=&1  \\
xy &=& -11  \\
(x-y)^2 &=& (x+y)^2-4xy=45
\end{eqnarray*}
So $x=\frac{1+3 \sqrt{5}}{2}$ & $y=\frac{1-3 \sqrt{5}}{2}$ (or vice versa).
</s>