Please help me understand why the following doesn't work.
Say I want to find the minimum of the function $f(x,y)=x^2+y^2$ with the constraint $y=1$. So I declare the helper function $g(x,y)=(y-1)^2=0$. And by using the Lagrange multipliers method, what I get is $F=x^2+y^2+\lambda(y-1)^2, F_x=2x, F_y=2y+2\lambda(y-1)$ and \begin{cases} 2x=0\\ 2y+2\lambda(y-1)=0\\ (y-1)^2=0. \end{cases} The above has no solutions, although obviously $(0, 1)$ is a minimum value.
One of the requirements of the method is that $\nabla g \not= 0$ on the surface $g(x,y) = 0$. But in your case $\nabla g(x,y) = (0,2(y-1))$ which is zero at every point on the surface $(y-1)^2 = 0$.
Moral of the story: use $g(x,y) = y-1$ instead.