<s>[INST] Using Lagrange Mult. to find maximum of $2x + y^2$ with constraints: $x^2 + y^2 + z^2 = 2$ and $x + y^2 + z = 0$ I was trying to maximize the function $2x + y^2$ with the following constraints: $x^2 + y^2 + z^2 = 2$ and $x + y^2 + z = 0$ using Lagrange multipliers. I already did all the work of proving that  the maximum does exist and showing that we can apply the technique of Lagrange multiplies. After that I arrived at the following systems of equations:
$$\begin{cases}2 = 2\alpha x + \beta  \\
2y = 2\alpha y + 2 \beta y \\
0 = 2\alpha z + \beta \\
x^2 +y^2 + z^2 =2 \\ 
x + y^2 + z = 0\end{cases}$$
Where $\alpha$ and $\beta$ are the Lagrange multipliers. The problem is that I'm having a lot of trouble solving this system for $(x,y,z)$.
My plan was trying to write $x,y,z$ in terms of $\alpha,\beta$ and then using the equations $x^2 + y^2 + z^2 = 2$ and $x + y^2 + z = 0$ find the values for $\alpha $ and $\beta$, but I wasn't able to find an expression for $y$ in terms of $\alpha$ and $\beta$.
How can this system be solved?
 [/INST] Using the two constraint-multiplier equations you wrote,
$$  2 \ - \ 2\alpha x \ - \ \beta \ \ = \ \ 0 \ \  \ , \ \ \ 2y \ - \ 2\alpha y \ - \  2 \beta y \ \ = \ \ 0 \ \ \ , \ \ \ 0 \ - \  2\alpha z \ - \ \beta \ \ = \ \ 0 \ \ ,  $$
we could eliminate $ \ \beta \ $ between the first and third equations to write $ \ 2·(1 - \alpha·x) \ = \ -2·\alpha·z $ $ \Rightarrow \ 1 - \alpha·(x - z) \ = \ 0 \ \Rightarrow \ \alpha \ = \ \frac{1}{x \ - \ z} \ \ . $  The second equation is factorable as $ \ y·(1 - \alpha - \beta) \ = \ 0 \ \ .  $
The first case from this equation is the easier one to deal with:  with $ \ y \ = \ 0 \ \ , $ the constraint equation $ \ x + y^2 + z \ = \ 0 \ \ $ requires that $ \ z \ = \ -x \ \ .  $   The constraint sphere then produces
$$ x^2 \ + \ 0^2 \ + \ (-x)^2 \ \ = \ \ 2·x^2 \ \ = \ \ 2 \ \ , $$
giving us the extremal points $ \ ( \ \pm 1 \ , \ 0 \ , \ \mp 1 \ ) \ \ $ and the function values $ \ \mathbf{f( \ 1 \ , \ 0 \ , \ -1 \ ) } \ = \ 2·1 + 0 \ \mathbf{= \ +2} \ \ $ and   $ \ \ \mathbf{f( \ -1 \ , \ 0 \ , \ 1 \ )} \ = \ 2·(-1) + 0 \ \mathbf{= \ -2} \ \ . $
With  $ \ y \ \neq \ 0 \ \ , $ we have $ \ 1 - \alpha - \beta  \ = \ 1 - \frac{1}{x \ - \ z} - \beta  \ = \ 0 \ \Rightarrow \ \beta \ = \ 1 - \frac{1}{x \ - \ z} \ \ . $  As the third equation gave us $ \ \beta \ = \ -2\alpha z  \ \  ,  $ we obtain $ \ \frac{x \ - \ z \ - \ 1}{x \ - \ z} \ = \ -\frac{2·z}{x \ - \ z}  \ \Rightarrow \ x - z \ = \ 1 - 2z \ \Rightarrow \ z \ = \ 1 - x \ \ . $  Inserting this into the constraint parabolic-cylinder equation  yields
$$ x \ + \ y^2 \ + \ ( \ 1 \ - \ x \ ) \ \ = \ \ 0 \ \  \Rightarrow \ \ y^2 \ \ = \ \ -1 \ \ . $$
As this is impermissible for coordinate values, the only two extrema are those found above. We can see this in the graph below:  the constraint sphere in orange and   the constraint skewed-parabolic cylinder $ \ x + y^2 + z \ = \ 0 \ \ $ [in yellow] intersect on a three-dimensional curve.  However, the level-surfaces   $ \ f(x,y) \ = \ x + y^2 \ = \ c \ $ are (upright) parabolic cylinders which are only tangent to this curve when the vertex of the parabolic cross-section lies at $ \ x \ = \ -1 \ , \ y \ = \ 0 \ \ [ \ c \ = \ -2 \ ] \ \ $  or  $ \ x \ = \ +1 \ , \ y \ = \ 0 \ \ [ \ c \ = \ +2 \ ] \ \ . $

</s>