[Math] Lagrange multipliers with multiple constraints

lagrange multiplier

I want to maximize $f(x,y,z)=x+y+z$, according to the constraints
$g_1(x,y,z)=x^2-y^2-1=0$ and $g_2(x,y,z)=2x+z-1=0$ . So I get $5$ equations using lagrange multipliers solving $\nabla f = \lambda_1 \nabla g_1 + \lambda_2 \nabla g_2$

$1=2 \lambda_1x + 2 \lambda_2$

$1=-2 \lambda_1 y$

$1= \lambda_2$

$x^2-y^2-1=0$

$2x+z-1=0$

The problem I am having is that subbing in $\lambda_2=1$, then I seem to get
$\frac {-1}{2 \lambda_1} = x = y$ which is a problem since if $x=y$, then
$x^2-y^2-1=x^2-x^2-1=0$. Where have I gone wrong?

Best Answer

You've found that there's no critical point. That's because there is no maximum or minimum. Since $2x+z-1=0,$ the function you're trying to maximize is say $h(x,y)=y-x+1.$ Now the other condition is $x^2 - y^2 = 1.$ Clearly we can make $h$ as large as we want, by taking $y$ very large and positive, and taking $x\approx-y.$ In a similar manner, we can make $h$ as small as we want (that is, large in absolute value and negative.)