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?

To simplify things, solve for $z$ from the second constraint, and plug it into the first constraint, as follows
From $x + y^2 + z = 0 $ you get $ z = - x -  y^2 $
Plug this into $ x^2 + y^2 + z^2 = 2$ you get $ x^2 + y^2 +(x + y^2)^2 = 2 $
which simplifies to $ 2 x^2 + y^2 (1 + 2 x) + y^4 = 2 $
The Lagrange function is
$ g = 2x +  y^2 + \lambda ( 2 x^2 + y^2 (1 + 2 x) + y^4 - 2 ) $
$g_x = 2 + \lambda ( 4 x + 2y^2 ) $
$ g_y = 2 y + \lambda ( 2 y (1 + 2 x) + 4 y^3 )$
$g_\lambda = 2 x^2 + y^2 (1 + 2 x) + y^4 - 2$
Setting these to zero, implies
$ \lambda = \dfrac{-2}{ 4 x + 2 y^2} = \dfrac{ - 2 y}{ 2 y(1+ 2x) + 4y^3 } $
Cross multiplying,
$2 y (1 + 2 x) + 4 y^3 = y ( 4 x + 2 y^2 ) $
Dividing through by $2$,
$y (1 + 2 x) + 2 y^3 = y (2 x + y^2 ) $
$ y + 2 x y + 2 y^3 = 2 x y + y ^ 3 $
$ y + y^3 = 0 $
$ y( 1 + y^2) = 0 $
Hence, $ y = 0 $
Using the third constraint,
$ 2 x^2 - 2 = 0 $
So $x = \pm 1 $
Clearly the maximum occurs at $x = 1$, hence $z = -x - y^2 = -1$
Therefore, the maximum of $2$ is achieved at $(1, 0, -1)$
