Why is the $\nabla g\neq0$ condition needed for the method of Lagrange multipliers?

435 Views Asked by At

Based on my Calculus textbook, the method of Lagrange multipliers is stated as follow:

Suppose that $f(x,y,z)$ and $g(x,y,z)$ are differentiable and $\nabla g \ne \mathbf 0$ when $g(x,y,z) = 0$. To find the local extremum values of $f$ subject to the constraint $g(x,y,z) = 0$, find the values of $x,y,z$ and $\lambda$ simultaneously satisfying the equations $\nabla f = \lambda \nabla g$ and $g(x,y,z) = 0$.

My questions are:

  1. Why do we need $\nabla g \ne \mathbf 0$ in the assumption? (Is there something realted to the implicit function theroem?)
  2. What happens if $\nabla g = \mathbf 0$?
2

There are 2 best solutions below

6
On BEST ANSWER

I think the best way to understand the condition is to see what can go wrong when $\nabla g=0$. Try working through the following examples:


Apply Lagrange's method to the following problem and then solve it graphically:

$$\min_{x,y} x^2 +y^2\text{ subject to $(x−1)^3 −y^2 = 0$}$$


Apply the method to $$\max_{x,y} y−2x^2 +x\text{ subject to $(x+y)^2 = 0$}$$ and compare your findings to the equivalent problem:

$$\max_{x,y} y−2x^2 +x\text{ subject to $x+y = 0$}$$

0
On

Let me consider again some of the examples discussed in the other answer, but working out the details of the calculations.


  • Considering the optimisation problem $\max_{x,y} (y-x^2)$ subject to the constraint $x+y=0$. Graphically, the solution is straightforward, and we can also just substitute $y=-x$ into the cost, which then reads $-x-x^2$, and easily find out that it maximises at $x=-1/2$.

    Same answer is obtained via Lagrange's multipliers: computing the gradients of cost and constraint we have $$\begin{pmatrix}-2x\\1\end{pmatrix} = \lambda \begin{pmatrix}1\\1\end{pmatrix},$$ which has the only solution $x=-1/2$.

  • Let's consider now the completely equivalent problem $\max_{x,y}(y-x^2)$ subject to $(x+y)^2=0$. The constraint is clearly equivalent, and thus so is the solution, however, if we now follow the Lagrange multipliers scheme we get $$\begin{pmatrix}-2x\\1\end{pmatrix} = 2\lambda(x+y)\begin{pmatrix}1\\1\end{pmatrix}.$$ But this system now doesn't have any solution in the feasible set. To see it, observe that the components on the LHS must be equal, thus $x=-1/2$, but on the RHS $x+y=0$, which is a contradiction. We conclude that the Lagrange multipliers approach doesn't capture the local maximum at $x=-y=-1/2$ in this case.


  • For another even simpler example, say we want to find $\min x$ subject to $(x-1)^2+y^2=1$. The solution is clearly $x=0$, which you see because the constraint is a unit-radius circle with center $(1/2,0)$. Lagrange gives the condition $\binom{1}{0}=\lambda\binom{2(x-1)}{2y}$, which has solution $y=0$ and $\lambda(x-1)=1/2$. In the feasible set for $y=0$ we can have $x=0$ or $x=2$, both of which are viable solution corresponding to $\lambda=-1/2$ and $\lambda=1/2$, respectively (one of these corresponds to the min and the other to the max).

    Now let's do this again but with the constraint written as $[(x-1)^2+y^2]^2=1$. The Lagrange condition becomes $$\begin{pmatrix}1\\0\end{pmatrix} = 2\lambda[(x-1)^2+y^2]\begin{pmatrix}2(x-1)\\ 2y\end{pmatrix}.$$ But on the feasible set the RHS is identically zero, thus there is no solution.