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)$?
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.