<s>[INST] Finding square roots of $\sqrt 3 +3i$ I was reading an example, where it is calculating the square roots of $\sqrt 3 +3i$.
$w=\sqrt 3 +3i=2\sqrt 3\left(\frac{1}{2}+\frac{1}{2}\sqrt3i\right)\\=2\sqrt 3(\cos\frac{\pi}{3}+i\sin\frac{\pi}{3})$
Let $z^2=w \Rightarrow r^2(\cos(2\theta)+i\sin(2\theta))=2\sqrt 3(\cos\frac{\pi}{3}+i\sin\frac{\pi}{3})$.
But how did they get from $\sqrt 3 +3i=2\sqrt 3\left(\frac{1}{2}+\frac{1}{2}\sqrt3i\right)=2\sqrt 3(\cos\frac{\pi}{3}+i\sin\frac{\pi}{3})$?
And can one just 'let $z^2=w$' as above?
Edit:
$w=2\sqrt 3(\cos\frac{\pi}{3}+i\sin\frac{\pi}{3})=z^2\\ \Rightarrow z=\sqrt{2\sqrt 3}(\cos\frac{\pi}{6}+i\sin\frac{\pi}{6})\\ \Rightarrow \sqrt{2\sqrt 3}\frac{\sqrt 3}{2} +i \sqrt{2\sqrt 3} \frac{1}{2}$
 [/INST] The general procedure (for square roots) goes as follows.
We want the square roots of $a+ib$ (where at least one of $a$ or $b$ is non-zero).
Note that
$$a+ib=\sqrt{a^2+b^2}\left(\frac{a}{\sqrt{a^2+b^2}}+i\frac{b}{\sqrt{a^2+b^2}}i\right).\tag{$1$}$$
For brevity, write $x=\frac{a}{\sqrt{a^2+b^2}}$ and $y=\frac{b}{\sqrt{a^2+b^2}}$.
Since $x^2+y^2=1$, there is a unique $\theta$ in the interval $[0,2\pi)$ such that $x=\cos\theta$ and $y=\sin\theta$.
In your example, $x=\frac{1}{2}$ and $y=\frac{\sqrt{3}}{2}$, so, from "special angles" we recognize that $\theta=\pi/3$.
Now the square roots of $\cos\theta+i\sin\theta $ are $\pm(\cos\frac{\theta}{2}+i\sin\frac{\theta}{2})$, and from this we find that the square roots of $a+bi$ are
$$\pm\sqrt[4]{a^2+b^2}\left(\cos\tfrac{\theta}{2}+i\sin\tfrac{\theta}{2}\right).$$ 
Added: In language close to the language used in the post, let $w=a+bi$. We want to solve the equation $z^2=w$. Let $z=r(\cos\phi+i\sin\phi)$, where $r$ is positive.  Then $z^2=r^2(\cos 2\phi+i\sin 2\phi)$. Comparing with the expression $(1)$, we find that $r^2=\sqrt{a^2+b^2}$ and therefore $r=\sqrt[4]{a^2+b^2}$. 
Also, we want $\cos2\phi +i\sin 2\phi=\cos\theta+i\sin\theta$. Obviously $\phi=\frac{\theta}{2}$ works. But also, more subtly, so does $\phi=\frac{\theta}{2}+\pi$, which gives you the negative of the square root picked out by $\phi=\frac{\theta}{2}$. 
</s>