What is the principal root of $\sqrt{-i}$? Where is the mistake in this solution?

$$\sqrt{-i}=\sqrt {\cos \frac{3 \pi}2+i\sin \frac{3 \pi}2}=\cos \frac{3 \pi}4+i\sin \frac{3 \pi}4=-\frac{\sqrt 2}2+i \frac{\sqrt 2}2$$

WA gives me different result:

$$\frac{\sqrt 2}2-i \frac{\sqrt 2}2$$

Why the principal root must be equal to $\frac{\sqrt 2}2-i \frac{\sqrt 2}2$?
I used Moivre's formula. But I dont know. How can I must choose value of $k$ in Moivre's formula? I chose $k=0$.
$$z=r\left(\cos x+i\sin x\right)$$
$$z^{\frac 1n}=r^\frac1n \left( \cos \frac{x+2\pi k}{n} + i\sin \frac{x+2\pi k}{n}\right)$$
 A: You're correct, and indeed, there are two square roots for every complex number (other than zero). For instance $\sqrt{-1}$ is both $i$ and $-i$. In general there are $n$, $n$'th roots of every complex number.
So for $k=0$ you get one root, for $k=1$ you will get another root.
A: A more geometric approach: $-i$ is equivalent to a rotation of the $(1,0)$ point by $-90^\circ$ around the origin.
When you take the square root, you are asking yourself in what way you can obtain the same result by applying two rotations: one is clearly doing two $-45^\circ$ rotations, whereas the other is doing two $135^\circ$ rotation.
Those are your two square roots.
A: There are two square root of $-i$ namely, $$ \pm\frac {\sqrt 2}{2} (1-i)$$
You may verify it by squaring each one $$ (\pm\frac {\sqrt 2}{2} (1-i))^2= \frac {1}{2}(1-2i-1)=-i$$
One  way to find them is of course the polar form of complex number $-i=e^{3i \pi /2}$ as mentioned in Kevin's answer.
The other way is looking at the unit circle and locate the square roots by dividing the angle $3\pi /2 $ by $2$ to find the first one and add $\pi $ to this angle to  find the second one. 
A: Since you are asked to find the principal root, you need to solve according to the definition of the principal root below.
Given the complex number $z$,
\begin{equation}
z = r \mathrm{e}^{i \theta},  ~ -\pi < \theta \le \pi.
\end{equation}
its principal square root is defined as,
\begin{equation}
\sqrt{z} = \sqrt{r} \mathrm{e}^{i \theta/2}
\end{equation}
Note that $\theta$ is expressed within $(-\pi, \pi]$. In your case, $z=e^{-\frac{\pi}{2}i}$. Thus, its principal root is 
$$e^{-\frac{\pi}{4}i}=\frac{\sqrt 2}2-i \frac{\sqrt 2}2$$
as given by WA.
A: Technically, the problem is that the "principal root" is define using $z=r\left(\cos \theta +i\sin\theta\right)$ with $r>0$ and $\theta\in(-\pi,\pi].$ Then the principal $\sqrt{z}$ is defined as $\sqrt{r}\left(\cos \frac\theta 2 +i\sin\frac\theta 2\right).$
So in your case, we use $\theta=-\frac{\pi}{2},$ not $\frac{3\pi}{2}.$
The reason to define it this way is to make $\sqrt{z}$ continuous when $z$ is on the positive real line. Defining it for $\theta\in[0,2\pi)$ leaves $\sqrt{z}$ discontinuous at $z$ on the positive real line.

The "principal" value is a somewhat arbitrary definition. The principal value has the "branch cut" on the negative reals, but you could make your brach cut cut any simple path from $0$ to $\infty.$ 
You may learn in more advanced complex analysis that the proper way to define $\sqrt{z},$ to keep nice behavior, is to define it as a multi-valued function. 
A: Solve the quadratic equation
$$x^2=-i=e^{-i\pi/2}\implies x=e^{-i\pi/4+ik\pi},\; k=0,1$$
A: Let $\sqrt{-i} = a + bi$, so $-i = (a+bi)^2 = a^2 - b^2 + 2abi$.
Equating real values, $0 = a^2 - b^2$, and equating imaginery parts, $-1 = 2ab$.  
Solving these simultaneously gives us either $a=\frac{1}{\sqrt 2}, b=\frac{-1}{\sqrt 2}$ or $a=\frac{-1}{\sqrt 2}, b=\frac{1}{\sqrt 2}$.  
Thus, $\sqrt{-i} = \pm \frac{1}{\sqrt 2}(1-i)$.
