<s>[INST] Finding $\sqrt{a+ib}$ How do to find the square root of a complex number?
$z=a+ib$
$z=\sqrt{3+i4}=a+ib$
remove the square by squaring both side
$a^2+2iab+b^2=3+i4$
$a^2+b^2=3$
$2ab=4$
So I just solve the simultaneous equation. But my friend is telling me this way I am doing is wrong. Can anyone give a hand, thank in advance
 [/INST] The method is correct, you identify the real and imaginary parts:
$$\begin{cases}x^2-y^2=a,\\2xy=b.\end{cases}$$
Then multiplying the first equation by $4x^2$,
$$4x^4-4ax^2-4x^2y^2=4x^4-4ax^2-b^2=(2x^2-a)^2-a^2-b^2=0,$$
giving
$$x^2=\frac{\pm\sqrt{a^2+b^2}+a}2.$$
As we need $a$ to be real, only the $+$ sign is useful and
$$x=\pm\sqrt{\frac{\sqrt{a^2+b^2}+a}2}.$$
</s>