I have $$ \sqrt{1+i\sqrt{3}}=\sqrt{2}\left[\cos\left(\frac{\frac{\pi}{3}+2k\pi}{2}\right)+i\sin\left(\frac{\frac{\pi}{3}+2k\pi}{2}\right)\right]=\sqrt{2}\left(\pm \frac{\sqrt{3}}{2}\pm\frac{1}{2}i\right). $$
My question is: why do we add $2k\pi$ to the argument of the trigonometric functions?
If we view $1 + \sqrt 3i$ as the point $(1,\sqrt 3)$ in a plane it is a distance of $\sqrt {1 + \sqrt{3}^2} =2$ from the origin. It is at a specific angle to thee $x$-axis. It is the angle whose sine is $\frac {\sqrt 3}2$ and whose cosine is $\frac 12$. That angle is $\frac {\pi}3$.
So we can write $1+\sqrt 3i$ as $2(\cos \frac {\pi}3 + i \sin \frac {\pi}3)$.
All non-zero complex numbers can be written as some $r(\cos \theta + i \sin \theta)$. The advantage is that if you multiply to complex numbers represented this way you get $r(\cos\theta + i \sin \theta)\cdot s(\cos \phi + i\sin \phi)= rs (\cos (\theta +\phi)+ i \sin(\theta + \phi))$. This makes multiplication and division easy; just multiple their magnitudes and add their angles.
So to solve $[r(\cos \theta + i \sin \theta)]^2 = 1 + i\sqrt 3= 2(\cos \frac {\pi}3 + i \sin \frac {\pi}3)$ we just have to solve
$r^2 (\cos 2\theta + i \sin 2\theta) =2(\cos \frac {\pi}3 + i \sin \frac {\pi}3)$. Or in other words $r^2 = 2$ and $2\theta = \frac {\pi}3$.
As $r$ is a distance, it must be positive so $r = \sqrt 2$. But we have to be careful about $\theta$.
So $\theta = \frac {\pi}6$ or $\theta = \frac {7\pi} 6$.
So $\sqrt{1 + i\sqrt 3} = \sqrt 2(\cos \frac {\pi}6 + i\sin \frac {\pi}6)$ or $=\sqrt 2(\cos \frac {7\pi}6 + i\sin \frac {7\pi}6)$.
Or $\sqrt{1+i\sqrt 3} = \sqrt 2(\frac {\sqrt 3}2 + i\frac 12)$ or $= \sqrt 2(-\frac {\sqrt 3}2 - i\frac 12)$