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?


Hint:

Let $x + yi = \sqrt{a + bi}$. Then $(x+ yi)^2 = a + bi$. Then solve for $x$ and $y$ and you will generally have two sets of values for the square root $ \sqrt{a + bi}$

Example:

Say you want to compute $\sqrt{3 + 4i}$. Then assume the square root is $a + bi$. That is $a + bi = \sqrt{3 + 4i} \implies (a + bi)^2 = (a^2 - b^2) + 2abi = 3 + 4i$. Now solve the equations $ (a^2 - b^2) = 3$ and $2ab = 4$ to find $a$ and $b$.


Let $$\sqrt{3+4i}=r(\cos\theta+i\sin\theta)$$ for some $r,\theta$. Squaring both sides, and using de Moivre, we get $$3+4i=r^2(\cos2\theta+i\sin2\theta)$$ so $$3=r^2\cos2\theta,\qquad4=r^2\sin2\theta$$ Squaring and adding gives $$25=3^2+4^2=r^4(\cos^22\theta+\sin^22\theta)=r^4$$ so $r=\sqrt5$. Dividing gives $$\tan2\theta=4/3$$ and $\theta=(1/2)\arctan(4/3)$. So, $$\sqrt{3+4i}=\sqrt5(\cos((1/2)\arctan(4/3))+i\sin((1/2)\arctan(4/3)))$$ This isn't exactly what you want, so let's have a look at that arctangent. Recall $$\tan2\theta={2\tan\theta\over1-\tan^2\theta}={2u\over1-u^2}$$ where I introduce the abbreviation $u=\tan\theta$. So, $${2u\over1-u^2}={4\over3}$$ This is $2u^2+3u-2=0$, $u=(-3\pm5)/4$. Let's take the plus sign, $u=1/2=\tan\theta$, so $\cos\theta=2/\sqrt5$, $\sin\theta=1/\sqrt5$. Now $$\sqrt{3+4i}=r(\cos\theta+i\sin\theta)=\sqrt5((2/\sqrt5)+i(1/\sqrt5))=2+i$$ With a little more care, you get the other three solutions.

It would seem de Moivre is not the best way to go, here.