# Using Lagrangian multiplier method with multiple constraints

So I am trying to find the minimum and maximum of the function $$f(x,y,z)= x^2 + y^2 - z^2$$ on the curve defined by $$y^2 + z^2 =1$$ and $$x=y.$$

My work thus far is the following:

$$\text{Proof.}$$ Let $$g=y^2 + z^2 -1=0, h=x-y=0,$$ and taking partials, $$f_x = 2x, f_y = 2y, f_z = -2z$$ $$g_x = 0, g_y = 2y, g_z = 2z,$$ $$h_x = 1, h_y = -1, h_z = 0$$ and by definition of the Lagrange multiplier with multiple constraints, we have $$\nabla f = \lambda \nabla g + \mu\nabla h$$ corresponding to each parameter. Thus, $$\nabla f_x = \lambda g_x + \mu\nabla h_x \implies x = \frac{\mu}{2}$$ $$\nabla f_y = \lambda g_y + \mu\nabla h_y \implies y = \lambda y - \frac{\mu}{2}$$ $$\nabla f_z = \lambda g_z + \mu\nabla h_z \implies z = -\lambda z$$ Now from here I am having issues because I cannot find a solution for $$y,z$$ Can someone please help me? Thank you.

## 2 Answers

Assuming your setup is correct up to this point, basically there is a bunch of case work to do. If you're allowed to divide by whatever you want then you can do this:

$$y=\lambda y - \mu/2 \Rightarrow y=\frac{\mu/2}{\lambda-1} \\ z = -\lambda z \Rightarrow \lambda = -1 \\ \Rightarrow y = \frac{-\mu}{4} \\ \Rightarrow x = \frac{-\mu}{4}$$

However we also know $$x=\frac{\mu}{2}$$, so $$\mu=0$$, and so you get $$z=\pm 1$$ so you have the points $$(0,0,1)$$ and $$(0,0,-1)$$. You probably don't actually care but the values of the Lagrange multipliers are $$\lambda=-1$$ and $$\mu=0$$.

Now what assumptions did you make along the way? You assumed $$\lambda \neq 1$$ and $$z \neq 0$$. What happens if you violate one or both of those assumptions?

Incidentally I would say that an easier approach to this particular problem would be to just substitute $$x=y$$ and do a one-constraint Lagrange problem. Thus you look at $$f(y,z)=2y^2-z^2$$ subject to $$y^2+z^2-1=0$$, so $$4y=\lambda 2y$$ and $$-2z=\lambda 2z$$, from which you readily conclude that at least one of $$y$$ or $$z$$ must be zero (since $$\lambda$$ cannot be both $$2$$ and $$-1$$ at the same time).

• Thank you, Ian. So we have infinite solutions if we allow for those two cases? Thus, no max or min? – shiloh.otis Nov 20 '20 at 23:32
• @shiloh.otis Well, if $\lambda=1$ then the third equation gives $z=0$. Of course $z=0$ itself gives the same thing. Either way, if $z=0$ then the constraints specify two more possible points. Are there admissible values of $\mu$ and $\lambda$ at these points so that all three Lagrange equations are satisfied? – Ian Nov 21 '20 at 2:51

The symmetries in the geometrical arrangement will help somewhat with locating solutions. The constraint surfaces are a circular cylinder with its symmetry axis along the $$\ x-$$axis and a plane cutting obliquely through the cylinder. The intersection curve is then an ellipse symmetrical about the $$\ xy-$$plane, so we would expect the points at which the extremal values of the function occur to have coordinates $$\ (\pm x \ , \ \pm x \ , \ \pm z) \ = \ (\pm x \ , \ \pm x \ , \ \pm \sqrt{1-x^2}) \ \ .$$ For the Lagrange equations, it is sometimes best to bring all or most of the terms to one side in order to factor them; this reduces the risk of overlooking solutions. Here, we would have $$2x \ = \ \mu \ \ , \ \ 2y \ = \ \lambda·2y - \mu \ \ \rightarrow \ \ 2y · (1 - \lambda) \ = \ -\mu \ \ ,$$ $$-2z \ = \ \lambda·2z \ \ \rightarrow \ \ -2z · (1 + \lambda) \ = \ 0 \ \ .$$

It is now clearer from the third equation that we have the two cases:

$$\mathbf{z = 0 \ , \ \lambda \neq -1 \ } \ ,$$ from which it follows immediately that $$\ y^2 \ = \ 1 \ \Rightarrow \ y = x = \pm 1 \ \ ,$$ for which we have the function value $$f(\pm 1 \ , \ \pm 1 \ , 0 ) \ \ = \ \ 1^2 \ + \ 1^2 \ - \ 0^2 \ = \ 2 \ \ ;$$

and

$$\mathbf{z \neq 0 \ , \ \lambda = -1 \ } \ ,$$ for which we obtain $$\ 2y · (1 - [-1]) \ = \ 4y \ = \ -\mu \ = \ -2x \ \ ;$$ since the planar constraint requires $$\ y = x \ ,$$ we must have $$\ x = y = 0 \ \Rightarrow \ z^2 = 1 \ \ ,$$ leading at once to $$\ f(0 \ , \ 0 \ , \pm 1 ) \ \ = \ \ 0^2 \ + \ 0^2 \ - \ 1 \ = \ -1 \ \ .$$

The former case thus gives us the absolute maximum $$\ 2 \$$ and the latter case the absolute minimum $$\ -1 \$$ on the intersection ellipse.