How to find extrema with an intersection between two surfaces as a restriction?

287 Views Asked by At

I'm trying to find extrema of $f(x,y,z)=x^2+y^2-2z^2$ restricted to the curve that is the intersection of $z=x+y$; $x^2+y^2=4$.

I got the intersection by getting $|x|=\sqrt{4-y^2}$ and then replacing in $z$ to get $g(x,y,z)=\pm\sqrt{4-y^2}+y-z$.

However, when I try to say that $\nabla f= \lambda \nabla g$ I get the problem that I have two different values of g (one positive, one negative) when I try to get the gradient vector. What can I do about it?

2

There are 2 best solutions below

2
On BEST ANSWER

You can use the method of Lagrange multipliers with two constraints given by $g_1=0$ and $g_2=0$; introduce a second Lagrange multiplier: $$\nabla f= \lambda \nabla g_1 +\mu \nabla g_2$$ In your case, you can take $g_1 = z-x-y$ and $g_2 = x^2+y^2-4$.

3
On

Method of Lagrange Multipliers -- This is how I learned how to do it.

$f(x,y,z,\lambda,\mu) = x^2 + y^2 -2z^2 -\lambda (x+y-z) - \mu(x^2 + y^2 - 4)$

$\frac {\partial f}{\partial x} = 2x -\lambda - 2x\mu = 0\\ \frac {\partial f}{\partial y} = 2y -\lambda - 2y\mu = 0\\ \frac {\partial f}{\partial z} = -4z +\lambda = 0\\ \frac {\partial f}{\partial \lambda} = x+y-z = 0\\ \frac {\partial f}{\partial \mu} = x^2+y^2-4 = 0$

and notice that the last two equations are your constrains. Now you have 5 equations and 5 unknowns, solve for $x,y,z,\lambda,\mu$

What about gradients?

You could do this....and get the same thing.

$\nabla (x^2 + y^2 -2z^2) = \nabla (\lambda (x+y-z) + \mu(x^2 + y^2 - 4))$

Skipping the Lagrange multipliers substitute $x^2 + y^2 = 4$ into the original objective equation.

$f(z) = 4 - 2z^2$ maxima at at $z = 0$

$(\pm\sqrt 2, \mp\sqrt 2, 0)$

minima when we let |z| get to be as large as possible

$(\pm\sqrt 2, \pm\sqrt 2, 2\sqrt2)$

One more approach:

$x = 2 \cos \theta\\ y = 2 \sin \theta\\ z = 2 \cos \theta + 2 \sin \theta$

$f(\theta) = $$4\cos^2\theta + 4\sin^2\theta - 2(4\cos^2\theta + 4\sin^2\theta + 8\sin\theta\cos\theta\\-4-8\sin2\theta$

$f(\theta)$ is minimized in $\{\frac{\pi}{4},\frac {5\pi}{4}\}$ and maximized in $\{\frac{3\pi}{4},\frac {7\pi}{4}\}$