Langrange Multiplier to Function $x^2-y^2-z^2$

69 Views Asked by At

Im Trying To Find The min and max values of function $$f(x, y, z) = x^2-y^2-z^2$$

At constraint $g(x, y, z) = x^2+y^2+z^2-1$.

My Solution :

I'm using gradient to find the partial derivatives of each variables so :

$\nabla f'(x, y, z) = <2x, -2y, -2z>$

$\nabla g'(x, y, z) = <2x, 2y, 2z>$

Set up : $$\nabla (f) = \lambda \nabla(g)$$ $$ 2x = \lambda(2x)$$ $$-2y = \lambda(2y)$$ $$-2z = \lambda(2z)$$

At $x^2+y^2+z^2-1$

Solving for $\lambda$: $$\lambda = \frac{2x}{2x} = 1$$ $$\lambda = -\frac{2y}{2y} = -1$$ $$\lambda = -\frac{2z}{2z} = -1$$

Im basically stuck at here because the lambdas are not giving any variable and only constant to sub into the constraint (which is confusing).

Anyone can tell me what i did wrong here?

Ps: i'm writing on a touch device.

1

There are 1 best solutions below

6
On BEST ANSWER

The error in this post is to divide by $x$, $y$, $z$ without considering whether they are zero or not.

If $2y\lambda=-2y$ and $2x\lambda=2x$ then there is a solution $\lambda=1$ if you put $y=0$, and similarly if $x=0$ then $\lambda=-1$ is perfectly OK.

Physically, $x,y$ and $z$ are on a sphere $x^2+y^2+z^2=1$, and then we are minimising/maximising $x^2-y^2-z^2$, so we don't need to use Lagrange multipliers. We can add the constraint to $f$ to eliminate $y$ and $z$ and get $f(x)=2x^2$ and then minimise/maximise that.

Obviously the minimum is $x=0$ and the maximum is $x=\pm1$.

But assuming that this is an exercise in practising the Lagrange multipliers, let's do it that way. $x=0$ corresponds to $\lambda=-1$ and $y^2+z^2=1$, and $x=\pm1$ corresponds to $y^2=z^2=0$ which is our $\lambda=1$ case above.