<s>[INST] Complex Solution I was looking at a simple complex problem and I came by this:
Solve: $z^2 = 3 - 4i$
Let
$$z= x + yi$$
Rewrite as
$$(x + yi)^2 = 3 - 4i$$
Expand
$$x^2 +2xyi + y^2i^2 = 3 - 4i$$
Simplify
$$x^2 - y^2 + 2xyi = 3 - 4i$$
real/imaginary parts
$$x^2 - y^2 = 3$$
and
$$2xy = -4$$
$$xy = -2$$
Therefore $y = -\frac{2}{x}$.
Substitute $y = -\frac 2x$ into $x^2 - y^2 = 3$, giving
$$x^2 - \frac{4}{x^2} = 3$$
Multiply by $x^2$:
$x^4 - 4 = 3x^2$
Factor
$$x^4 - 3x^2 - 4 = 0$$
$$(x^2 + 1) (x^2 - 4) = 0$$
$$(x^2+ 1) (x + 2) (x - 2) = 0$$
Given $xy = -2$
for $x = 2$ then $y = -1$ therefore $z = 2 - i$
for $x = -2$ then $y = 1$ therefore $z = -2 + i$
Now, I understand everything, but why do we ignore the root of $i$ and $-i$ for the root $x^2+1=0$? Is it because we are only looking for real roots? When plugging these two back into $(x+iy)=z$, I saw that it gave the same two solutions as the real roots.
 [/INST] When you write $z=x+yi$ you are looking for real $x$ and $y$.
There's really nothing bad in considering also the other two possibilities, but they will give just the same numbers.
Indeed, if you take $x=i$, you obtain, from $xy=-2$, that $y=-2/i=2i$ and so
$$
z=x+yi=i+2i^2=-2+i
$$
which has already been obtained. The other solution is obtained when you consider $x=-i$.
You know that the equation has at most two solutions, so when you find two of them you're done.
</s>