<s>[INST] What is the square root of $3 + 2\sqrt{10}i$? I need to compute the square root of $3 + 2\sqrt{10}i$.
I know how to solve it, but for some reason I'm not getting the correct answer. I attempted to solve it like this: 
$$
  \sqrt{3 + 2\sqrt{10}i} = x + iy
    \quad \longrightarrow \quad
  3 + 2\sqrt{10}i = x^2 - y^2 +2xyi
$$
and so forth, but my answer isn't correct.
 [/INST] You want $z=a+bi$ where $a,b\in\mathbb{R}$ such that
$$z^2=a^2-b^2+2abi=3+2\sqrt{10}i.$$
Comparing coefficients, you need $a^2-b^2=3$ and $ab=\sqrt{10}$. So $a=\sqrt{5}$ and $b=\sqrt{2}$, or $a=-\sqrt{5}$ and $b=-\sqrt{2}$. Thus the square root of $3+2\sqrt{10}$:
$$\pm(\sqrt{5}+\sqrt{2}i).$$
</s>