I am trying to solve $$(\cos\alpha-\lambda)^2+\sin^2\alpha=0$$ for $\lambda$. Expanding and using the identity $\sin^2x+\cos^2x=1$ yields $$\lambda^2-2\lambda\cos\alpha+1 = 0$$ and using the quadratic formula gives me $$\lambda=\cos\alpha\pm\sqrt{\cos^2\alpha-1}.$$
The solution to this problem is $$\lambda = \cos\alpha\pm i\sin\alpha$$ but I don't see how to obtain that result.