How do I get the square root of a complex number? If I'm given a complex number (say $9 + 4i$), how do I calculate its square root?

Write $(a+bi)^2 =  9+4i$. Then $a^2-b^2 +2abi = 9+4i$.
By comparison of coefficients,
$2ab = 4$ and $a^2-b^2 = 9$.
Thus $ab=2$ and $a^2 = 9 +b^2$.
Setting $a = 2/b$ with $b\ne 0$ gives $4/b^2 = 9 + b^2$ and so $4 = 9b^2 + b^4$, i.e., $b^4 + 9b^2 -4 = 0$.
Solve $x^2 + 9x-4=0$, where $x=b^2$. Solutions are
$x_{1,2} = \frac{-9\pm\sqrt{9^2-4\cdot 1\cdot (-4)}}{2\cdot 1} = \frac{-9\pm\sqrt{97}}{2}$. Solutions are $b_{1,2,3,4} = \pm\sqrt{\frac{-9\pm\sqrt{97}}{2}}$. This gives the corresponding values $a_{1,2,3,4}$. All solution pairs are real-valued.
