<s>[INST] Where is error in this solution to $ \sqrt{x} + \sqrt{-x} = 2 $? Given the equation:
$$ \sqrt{x} + \sqrt{-x} = 2 $$
The solutions are $x = \pm 2i$. This can be seen via Wolfram Alpha
$$
\left( \sqrt{x} + \sqrt{-x} \right)^2 = 2^2
$$
$$
\sqrt{x}^2 + 2\sqrt{x}\sqrt{-x} + \sqrt{-x}^2 = 4
$$
$$
x + 2\sqrt{x}\sqrt{-x} - x = 4
$$
$$
\sqrt{-x^2} = 2
$$
$$
-x^2 = 4
$$
$$
x = \pm 2i
$$
However, my approach to the problem only found the positive value to this equation.
$$ \sqrt{x} + \sqrt{-x} = 2 $$
$$ \sqrt{x} + i\sqrt{x} = 2 $$
$$ (1+i) \sqrt{x} = 2 $$
$$ (1-i)(1+i) \sqrt{x} = 2(1-i) $$
$$ 2 \sqrt{x} = 2 (1-i) $$
$$ x = (1-i)^2 $$
$$ x = 1^2 - 2i + (-i)^2 = -2i $$
Where did I make a mistake here that resulted in me only getting one of the two solutions to this equation?
 [/INST] Squaring twice,
$$ x +(-x) + 2 \sqrt{x}\sqrt{-x} =4 \to -x^2=4$$
and solutions of quadratic equation
$$ x^2+4 = 0$$
should be two in number
$$ x= \pm \sqrt {2} i~. $$
</s>