# Lagrange multiplier question: finding a counterexample.

I'm helping a student through a course in mathematics. In the course text, we came across the following problem concerning the Lagrange multiplier technique. Given a differentiable function with continuous partial derivatives $$f:\mathbb{R}^2\to\mathbb{R}:(x,y)\mapsto f(x,y)$$ that has to be extremized and a constraint given by an implicit relation $$g(x,y)=0$$ with $$g$$ likewise having continuous partial derivatives. The Lagrange multiplier technique looks for points $$(x^*,y^*,\lambda^*)$$ such that

$$\nabla f(x^*,y^*)=\lambda^* \nabla g(x^*,y^*)$$

$$\lambda$$ is the so-called Lagrange multiplier.

The technique rests upon the fact that the gradient of the constraint is different from the zero vector: $$\nabla g(x^*,y^*) \neq 0$$. Then, the text says that if that condition is not fulfilled, it is possible to not have solutions of the system of equations resulting from the technique while there can actually be a constrained extremum.

I have tried to construct such an example, but until now unsuccessfully as every attempt I make with a $$\nabla g(x^*,y^*) = 0$$ turns out to have a solution. Does anyone know of a nice counterexample?

And does one know of a counterexample when there are $$n$$ variables and $$m$$ constraints with $$n>m>1$$ ? For the latter, the condition becomes that the gradients of the constraints have to be linearly independent. So the question is: can we find an example where there is no solution for the Lagrange multiplier method, but there is an extremum and the gradients of the constraints are linearly dependent?

Here is an example, albeit with two constraints: We want to find the minimum of the function $$f(x,y,z):=y\ ,$$ given the constraints $$F(x,y,z):=x^6-z=0\ ,\qquad G(x,y,z):=y^3-z=0\ .$$ The constraints define the curve $$\gamma:\quad x\mapsto (x,x^2, x^6)\qquad(-\infty<x<\infty)\ ,$$ and it is easy to see that the minimum of $f\restriction \gamma$ is taken at the origin. On the other hand $$\nabla f(0,0,0)=(0,1,0)\ ;\quad\nabla F(0,0,0)=\nabla G(0,0,0)=(0,0,-1)\ ;$$ whence $\nabla f(0,0,0)$ is not a linear combination of $\nabla F(0,0,0)$ and $\nabla G(0,0,0)$. This means that using Lagrange's method the origin would not have shown up as a conditionally stationary point.

• Thanks, I see now that if I had kept an eye on the gradients, I would have found an example much more easily. Commented May 20, 2012 at 16:53

In the Lagrange multiplier technique, what you really need is a point $(x^*,y^*)$ where $\nabla f(x^*,y^*)$ and $\nabla g(x^*,y^*)$ are linearly dependent. If the text says otherwise, they are wrong. This is slightly different from what you wrote down. Try $g(x,y)=x^2+y^2$ and $f(x,y) = (x-1)^2=0$, which has a constrained minimum at $(1,0)$. This doesn't satisfy $n > m >1$, but it shouldn't be to hard to modify it so it does.

• Thanks, this is a great example for the case with one constraint and 2 variables. Commented May 20, 2012 at 16:53

An example in two variables with one constraint.

Find the minimum of the function $$f(x,y)=y$$ given the constraint $$g(x,y)=(y-x^2)(y-x^4)=0.$$ It is easy to see that $$(0,0)$$ is the minimum point: $$f(0,0)=0\leq f(x,x^2)=x^2\quad \text{and}\quad f(0,0)=0\leq f(x,x^4)=x^4.$$ On the other hand $$\nabla f(0,0)=(0,1)\not=(0,0)=\lambda\nabla g(0,0).$$ Notice that here the system of equations $$\begin{cases} \nabla f(x,y)=\lambda\nabla g(x,y)\\ g(x,y)=0 \end{cases} \Leftrightarrow \begin{cases} (0,1)=\lambda(x^2-x^4) (-2x,1)\\ y=x^2 \end{cases} \cup \begin{cases} (0,1)=\lambda (x^4-x^2)(-4x^3,1)\\ y=x^4 \end{cases}$$ has NO solutions.

• Very neat counter example. Alas the question is more than ten years old and I'm afraid my former student is now busy with non-mathematical pursuits. ;D Commented Apr 5, 2023 at 15:14
• @Raskolnikov Recently a student asked me about the same issue. I found your question, but not a simple counter example... It could be useful for someone else. Commented Apr 5, 2023 at 15:56