I was trying to obtain the square root of $-5-12i$ by the formula for square root (given below) and also by De Moivre's theorem and verify that both give the same result. But the two results are somehow not matching for this complex number. I am writing my solution below in two cases for each method:
Case - I:
As given on pg - 3 of Complex Analysis - Newman and Bak, the equation $(x+iy)^2 = a+ib$ has the solution: $x=\pm\sqrt{\frac{a+\sqrt{a^2+b^2}}{2}}$ and $y=\pm\sqrt{\frac{-a+\sqrt{a^2+b^2}}{2}}.($sign $b)$
Putting $a=-5, b=-12$ & $($sign $b) = -ve$ in the above formula for $x$ & $y$, we get that the square roots of $-5-12i$ are $2-3i$ & $-2+3i$
Case - II:
By De Moivre's theorem, we know that given $z = r(cos \theta + i sin \theta)$; its $n$th root $z_k$ is given by $z_k = r^{1/n}(cos (\frac{\theta + 2k \pi}{n}) + i sin (\frac{\theta + 2k \pi}{n}))$, where $k=0,1,...,n-1$
Here, $z=-5-12 i = r(cos \theta + i sin \theta)$. Thus, $r=13$ and $\theta = atan(\frac{-12}{-5}) = 1.176005207$ (in radian)
Hence, $z_k = \sqrt{13}(cos (\frac{\theta + 2k \pi}{2}) + i sin (\frac{\theta + 2k \pi}{2}))$, where $k=0,1$
For $k=0$, $z_0 = \sqrt{13} (cos (\frac{\theta}{2}) + i sin (\frac{\theta}{2})) = \sqrt{13} (0.8320502943 + i 0.5547001962) = 3 + 2i$
For $k=1$, $z_1=\sqrt{13} (cos (\frac{\theta + 2 \pi}{2}) + i sin (\frac{\theta + 2 \pi}{2})) = \sqrt{13} (cos (\pi + \frac{\theta}{2}) + i sin (\pi + \frac{\theta}{2})) = - \sqrt{13} (cos (\frac{\theta}{2}) + i sin (\frac{\theta}{2})) = - \sqrt{13} (0.8320502943 + i 0.5547001962) = -3 - 2i$
Here, the square roots of $-5-12i$ are $3+2i$ and $-3-2i$
I think there must be some error in the solution because the square roots are coming out to be different. Thanks...