Why couldn't the Karush-Kuhn-Tucker optimization find the solution? I have the following utility maximization problem:
$$\max (xy)$$
$$(x+y-2)^2 \leq 0$$
Conditions:
$$y-2\lambda (x+y-2) =0$$
$$x-2\lambda (x+y-2) =0$$
$$\lambda(x+y-2)^2=0$$

When I set $\lambda&gt;0$, I get:
$$(x+y-2)^2=0 \Rightarrow (x+y-2) = 0$$
$$y-2\lambda (x+y-2) = y = 0$$
$$x-2\lambda (x+y-2) = x = 0$$

But the obvious solution is $x=y=1$.

When I set $$\lambda=0$$ that's not a case with a valid solution either. Is the constraint too low? What is the explanation to this?

I would greatly appreciate your help.
As @user32416 pointed out the first order stationarity conditions are not enough. Specifically it seems that you violate Slater's condition, which states that "the feasible region must have an interior point". There are no $x,y$ for which 
$$(x+y-2)^2 &lt; 0.$$

If you rephrase the problem to
$$\max (xy)$$
$$x+y-2 = 0$$
$$x,y \geq 0$$
Slater's condition is met (for linear conditions no interior points are necessary) and you can apply Karush-Kuhn-Tucker.