Compute the square root of a complex number This is a follow up to a previous question. I solved the equation $z^4 - 6z^2 + 25 = 0$ and I found four answer to be $z = \pm\sqrt{3 \pm 4i}$. 
However someone in the comment said that the answer is going to be $2+i$, $2-i$, $-2+i$, $-2-i$. I cannot understand how we can find these roots from the answer that I found. How are we supposed to compute the square root of a complex number?

Suppose $(x+iy)^2 = a+ib$ with $a,b$ real and you want to find real values for $x$ and $y$.
Then $(x^2-y^2) + i(2xy) = a+ib$. Since $a,b,x,y$ are real, this is equivalent to $x^2-y^2 = a$ and $2xy = b$
$(x^2+y^2)^2 = (x^2-y^2)^2 + 4x^2y^2 = a^2+b^2$, so $x^2+y^2 = \sqrt {a^2+b^2}$. You always pick the positive root because $x^2+y^2$ is positive.
Then, $x^2 = \frac {\sqrt {a^2+b^2}+a}2$, so that $x = \pm \sqrt \frac {\sqrt {a^2+b^2}+a}2$, and finally $y = \frac b{2x}$ if $x \neq 0$.
If $x = 0$ you have to use $y = \pm \sqrt \frac {\sqrt {a^2+b^2}-a}2$ instead.
Here, for $a=3, b=4$, $a^2+b^2 = 9+16 = 25 = 5^2$ so that $x = \pm \sqrt {\frac{5+3}2} = \pm 2$, and $y = \frac 4 {2x} = \pm 1$ (with the same sign as $x$). This gives the two square roots of $3+4i$ .
