question about Lagrange multiplier I was reading about the problem of maximizing $x^2+y^2+z^2$ on the intersection of the two surfaces $xyz=1$ and $x^2 + y^2 + 2z^2  =  4$. The author wrote that $\nabla F=a \nabla g+b \nabla h$ (for $a$ and $b$ arbitrary numbers and $g$ and $h$ constraints, which are surfaces in this case) then he wrote that $$ <2x, 2y, 2z>  =  a <yz, xz, xy> + b <2x, 2y, 4z> $$
and from here he said that we have five equations: $$2x  =  ayz + 2bx$$ $$2y  =  axz + 2by$$  $$2z  =  axy + 4bz$$  $$xyz  =  1$$ $$x^2 + z  =  1$$
The first four are clear but where does the fifth equation come from? Also what is a good way to solve such problems by this method? Thanks everybody, please explain to me.
 A: Here is a (hopefully) correct solution of the original problem. Let $S\subset{\mathbb R}^3$ be the set defined by the constraints. The set $S$ consists of 4 smooth loops: The equation $x^2+y^2+2z^2=4$ defines an ellipsoid $E$ whereas $xyz=1$ defines 4 infinite "cups" which intersect $E$ in 4 curves $\gamma_i$.
I replace your fifth equation by the original constraint $x^2+y^2+2z^2=4$.
Multiplying your first equation by $y$, the second by $-x$ and adding the two gives
$$0\ =\ a(y^2-x^2) z\ .$$
Now $z\ne 0$ on $S$; furthermore if $a=0$ then the first three equations would imply $(x,y,z)=b (x, y, 2z)$. This implies $x=0$ or $b=1$, whence $z=0$,  which both are forbidden on $S$. Therefore necessarily $x=y$ or $x=-y$. For symmetry reasons it is enough to look at the first octant in $(x,y,z)$-space, i.e. at the case $x=y$. In this case the constraints reduce to
$$x^2 z=1\ ,\qquad x^2+z^2=2\ .$$
Eliminating $z$ leads to
$$x^2+{1\over x^4}=2\quad {\rm or}\quad  x^6-2x^4+1=(x^2-1)(x^4-x^2-1)=0\ .$$
The last equation has the real solutions $x_1= 1$ and $x_2=\sqrt{(1+\sqrt{5})/2}$. Therefore on $\gamma_1:=S\cap{\rm \{first\ octant}\}$ we have the two conditionally stationary points $P_1:=(1,1,1)$ and $P_2=(x_2,x_2,2-x_2^2)$ . 
The function to maximize is $f(x,y,z):=x^2+y^2+z^2$. The computation gives
$$f(P_1)= 3\ ,\qquad f(P_2)=2{1+\sqrt{5}\over2}+{7-3\sqrt{5}\over2}={9\over2}-{\sqrt{5}\over2}\doteq 3.382\ , $$
therefore the $\max$ is $3.382$, and $3$ is in fact the $\min$ (which has to exist by general principles).
