# Using Lagrange multipliers to find the extrema of a function subject to contraints

Find the extrema of the function $f(x,y,z)=x+y+z$ subject to the constraints $x^2-y^2=1$ and $2x+z=1$
So I have $G(x,y,z,\lambda_1,\lambda_2)=x+y+z-\lambda_1(x^2-y^2-1)-\lambda_2(2x+z-1)$
$1-2\lambda_1x-2\lambda_2=0$
$1+2\lambda_1y=0$
$1-\lambda_2=0$
plus the initial constraints, rearranging and substituting gives
$\frac{1}{4\lambda_1^2}-\frac{1}{4\lambda_1^2}=1$
-->$0=1$?

Have I done something wrong here or is it just not possible to find an extrema?

-
Isn't it $x^2-y^2-1$ in the 3rd line? – Nameless Dec 27 '12 at 11:58
Yep, sorry, typing error – user51327 Dec 27 '12 at 12:05
Well I don't think you did anything wrong other than that. – Nameless Dec 27 '12 at 12:06
So it's just not possible to find the extrema? Are there other methods I could use to find it? – user51327 Dec 27 '12 at 12:07
May be you do not have a maxima. Remember that the function you have is a plane. A mental or graphical visualization may help. – 007resu Dec 27 '12 at 12:08

## 1 Answer

From the last line of the conditions, we see that $\lambda_2 = 1$. Substituting, we get that $-1 - 2\lambda_1 x = 0$, or that $1 + 2\lambda_1 x = 0$. This looks the exact same as the remaining condition: $1 + 2\lambda_1 y = 0$. Setting them equal, we see that $x = y$.

This is problematic since we want to use the constraint that $x^2 - y^2 = 1$, which is not held when $x=y$.

Thus there are no maxima or minima.

-