Lagrange multiplier plus or minus

6.9k Views Asked by At

I am working through different tutorials about Lagrange multiplier and came upon a problem. It seems like that there's different ways to solve.

You have a given equation $f(x,y)$ and a constraint $g(x,y)$.


A few tutorials then start to set the derivatives respect to $x$ and $y$ of $\lambda\,g(x,y)$ and $f(x,y)$ equal to each other and start solving for variables:

$$f(x,y)= \lambda\,g(x,y) \tag{1}$$

or use a form of

$$F(x,y,\lambda)=f(x,y) - \lambda \,g(x,y)\tag2$$

which is basically the same since you can subtract the right hand side of $(1)$ and derive $(2)$.


Other tutorials use a form of

$$F(x,y,\lambda)= f(x,y) + \lambda\,g(x,y)\tag3$$


So the main difference is the minus and the plus in their form and I am not sure which one to use. I have found multiple examples for both, so it's not a single mistake by one of the tutors.

So which one is the correct one: $(2)$ or $(3)$?

sources for $(1)$, $(2)$: A, B

sources for $(3)$: C, D

5

There are 5 best solutions below

0
On BEST ANSWER

When working with Lagrange multipliers, always keep this in mind: the value of $\lambda$ doesn't matter. This is so because working with the constrains $g(x,y)=1$, $3g(g,y)=3$ or $-\pi g(x,y)=-\pi$ leads again and again to the same problem. But it leads to different $\lambda$'s.

So, it's as if in one of the methods the constrain was $g(x,y)=k$ and in the other one it was $-g(x,y)=-k$. It makes no difference.

0
On

They're equivalent. You'll get different values of $\lambda$ (positive for one, negative for the other) but the same solutions in terms of $x$, $y$, and your objective function.

0
On

If you think about what the method of Lagrange multipliers really does, you will realize it doesn't matter at all, any more than the value of $\lambda$ does.

The only thing you really care about is if the vectors $$ u=\left(\frac{\partial f}{\partial x},\frac{\partial f}{\partial y}\right), \\ v=\left(\frac{\partial g}{\partial x},\frac{\partial g}{\partial y}\right) $$ are parallel. Whether you write that as $u+\lambda v=0$ or $u-\lambda v=0$ is quite irrelevant.

0
On

If you compute $\dfrac{\partial F}{\partial\lambda}$ for both definition of $F$ and set them equal to zero, you'll see that they are equivalent. As Nick has just suggested, they both give the same optimal solutions.

However, $\lambda$ has other interpretations in other subjects. For instance in Economics, I'll suggest you use $F(x,y,\lambda)= f(x,y) + \lambda g(x,y)$ as a definition for Lagrangian. Why? One example is that $\lambda$ is the Shadow price. You've to "make" $\lambda$ "positive" to conclude something else. If this is the case, just bare in mind that mathematically, they give the same solution.

0
On

In the Lagrange Multipliers technique one is searching the sattionary points which are the points such that

$$ \nabla f + \lambda \nabla g = 0 $$

which means the points such that $\nabla f$ and $\nabla g$ are linearly dependent so it is irrelevant the condition $\pm\lambda$