I have to find the extremas of $f(x, y, z)=x+y+z$ subject to $x^2-y^2=1$, $2x+z=1$.
I have done the following:
We will use the theorem of Lagrange multipliers.
The constraints are $$g_1(x,y,z)=x^2-y^2-1=0 \ \ , \ \ g_2(x, y, z)=2x+z-1=0$$
We are looking for $x$, $y$, $z$, $\lambda_1$ and $\lambda_2$ such that $$\nabla f(x, y, z)=\lambda_1 \nabla g_1(x, y, z)+\lambda_2 \nabla g_2(x, y, z) \tag 1$$ and $$g_1 (x, y, z)=0 \tag 2$$ $$g_2(x, y, z)=0\tag 3$$
$$(1) \Rightarrow (1, 1, 1)=\lambda_1(2x, -2y, 0)+\lambda_2(2, 0, 1)$$
So, we have that $$1=2\lambda_1 x+2\lambda_2 \\ 1=-2\lambda_1 y \\ 1=\lambda_2$$
So, we get $x=y$, right??
When we apply this at the first constraint $g_1(x, y, z)=0$ we get $-1=0$, or not??
What have I done wrong??