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?
I will use $z$ instead of $x$, and assume that $z \in \mathbb C$. I will also use $z^{1/2}$ instead of $\sqrt{x}$ to denote the square root. Then your equation becomes $$f(z) = z^{1/2} + (-z)^{1/2} - 2 = 0, \tag{1}$$ and we observe that for any $z \in \mathbb C$, $$f(-z) = (-z)^{1/2} + (-(-z))^{1/2} = (-z)^{1/2} + z^{1/2} = f(z). \tag{2}$$ Therefore, if $r$ is a root of $f$, then $-r$ is a root of $f$.
Certain rules about how to manipulate functions of square roots are inherited from assumptions about the domain of such functions; e.g., $$\sqrt{ab} = \sqrt{a} \sqrt{b}$$ is true if $a, b$ are nonnegative real numbers. Otherwise, we encounter inconsistencies, such as the well-known $$1 = \sqrt{1} = \sqrt{(-1)(-1)} \overset{?}{=} \sqrt{-1} \sqrt{-1} = i^2 = -1. \tag{3}$$ The equality with the $?$ symbol above it is where the error occurs.
When we talk about square roots of complex numbers, we are really talking about a one-to-two multivalued mapping; e.g., $$(-2i)^{1/2} = \{1-i, -1+i\}.$$ This is because $(1-i)^2 = -2i$ and $(-1+i)^2 = -2i$, and because $\mathbb C$ is not an ordered field, unlike $\mathbb R$, it is not a simple matter to decide which of these roots is "canonical" in the way that we decide to use $\sqrt{x}$ to denote the nonnegative square root of $x$ when $x$ is a nonnegative real. Moreover, when considering cube roots, now one has in general three complex-valued solutions, all equally valid. A major fundamental aspect of complex analysis concerns itself with the choice of a single value when a mapping is multivalued.
That said, it is clear that your first step is problematic:
$$\sqrt{-x} = \sqrt{-1}\sqrt{x} = i \sqrt{x}$$ does not always hold for the same reason why the aforementioned "paradox" $(3)$ is invalid.
In order to proceed along the same lines of your reasoning, you must be more careful:
$$z^{1/2} + (-z)^{1/2} = z^{1/2} + (-1)^{1/2} z^{1/2} = z^{1/2} (1 + (-1)^{1/2})$$ is allowed. But here, the value of $(-1)^{1/2}$ must be ascertained. It is not simply $i$, because there are two solutions to the equation $$z^2 = -1,$$ namely $$z = \{i, -i\}.$$ Therefore, the following step is applied:
$$z^{1/2} (1 + (-1)^{1/2}) = z^{1/2} (1 \pm i). \tag{4}$$ This preserves the multivalued character of the original expression, from which we proceed as follows:
$$z^{1/2} = \frac{2}{1 \pm i},$$
hence
$$z = \left(\frac{2}{1 \pm i}\right)^2 = \{-2i, 2i\} = \pm 2i.$$