complex number equation I have this equation:
$$z^2=-i$$
All I can figure out from my knowledge is that 
$$z^2=r^2\cos(2x)+i\sin(\cos(2x))$$ in this case is:
$$\cos(3\pi/4)+i\sin(3\pi/4))$$
and that will be $$e^{3\pi/4}$$
because $-i =0-i$ so that $\cos2x=0$ and $\sin2x=-1$.
Am I on the right track? I feel like I'm missing something.
The answer should be $\pm(-1+i)/\sqrt{2}$.
where does the $\sqrt{2}$ come from?
 A: You're missing some solutions coming from the periodicity of $\cos$ and $\sin$. Note that $\cos 2x = 0$ also for $x = \frac{7\pi}{4}$. These two make up "all" of the solutions since the rest of the $x$ values coming from periodicity lead to the same $z$ values. (Ultimately you're interested in $z$ - not $x$.)
The $\frac{1}{\sqrt 2}$ comes from evaluating $\sin$ and $\cos$ at the values you've solved $x$ for.
A: It is basically question of square root .
$$z=x+iy $$
$$x^2 - y^2 +2ixy=-i $$
$$x^2- y^2 =0 \qquad 2xy=-1$$
$$(x^2 + y^2 )^2=(x^2- y^2)^2 +(2xy)^2$$
$$(x^2 + y^2 )^2=1$$
$$x^2 + y^2 =1\space \space \text {and} \space \space x^2- y^2=0$$
A: If $z=r(\cos(x)+i\sin(x))$, then $z^2=r^2(\cos(2x)+i\sin(2x))$.
If $z^2=-i$, then it is easy to see that $r=1$ and 
$$\cos(2x)+i\sin(2x)=-i \tag1$$
Equating real and imaginary parts of $(1)$ yields the pair of equations
$$\begin{align}\cos(2x)&=0 \tag 2\\\\
\sin(2x)&=-1\tag 3\end{align}$$
From $(2)$, we find that $x=\pi/4+n\pi/2$ for any $n$.  Then, noting that $\sin(\pi/2 +n\pi)=(-1)^n$, we find that $x=\pi/4+(2m+1)\pi/2$ for any $m$.
Finally, we have 
$$\begin{align}
z&=\cos(\pi/4+(2m+1)\pi/2)+i\sin(\pi/4+(2m+1)\pi/2) \\\\
&=\cos(\pi/4)\cos((2m+1)\pi/2)-\sin(\pi/4)\sin((2m+1)\pi/2)\\\\
&+i\left(\sin(\pi/4)\cos((2m+1)\pi/2)+\cos(\pi/4)\sin((2m+1)\pi/2) \right)\\\\
&=(-1)^m\frac{-1+i}{\sqrt2}\\\\
&=\pm \frac{-1+i}{\sqrt2}
\end{align}$$
A: Different ways to represent complex numbers:
$z = x + iy$
$z = \rho (\cos\theta + i \sin \theta)$
$z = \rho e^i\theta$
$z^2 = (x^2-y^2) + i(2xy)$
$z^2 = \rho^2 (\cos2\theta + i \sin 2\theta)$
$z^2 = \rho^2 e^{2i\theta}$
This is important background, and if you are not comfortable bouncing between these, then keep reviewing until it clicks.
lets use this one:
$z^2 = \rho^2 (\cos2\theta + i \sin 2\theta) = -i\\
z^2 = (\cos \frac {3\pi}{2} + i \sin \frac {3\pi}{2}) = -i\\
2\theta = \frac {3\pi}{2}\\
\theta = \frac {3\pi}{4}\\
z = (\cos \frac {3\pi}{4} + i \sin \frac {3\pi}{4})\\
z = -\frac {\sqrt 2}{2} + i \frac {\sqrt 2}{2})\\
z = \frac{\sqrt 2}{2} (-1 + i)$
$z^2 = -i$ has two solutions.  You can choose to think if it as $\pm$ as was so handy with real numbers.  But with complex numbers, I think of it as rotating clockwise and counter clockwise.
So I think of the second solution as:
$z = (\cos \frac {7\pi}{4} + i \sin \frac {7\pi}{4})$ that is half-way between $\frac {3\pi}{2}$ and $2\pi$
$z = \frac{\sqrt 2}{2} (1 - i)$
A: If I understand you correctly that's simply because 
$
    \cos(3\pi/4) = -1/\sqrt{2}
$
and
$
    \sin(3\pi/4) = 1/\sqrt{2}
$
A: "I have this equation:
$z^2=−i$
All I can figure out from my knowledge is that
$z^2=r^2\cos(2x)+i\sin(\cos(2x))$"
Um... that's a bad typo.
You meant $z^2 = r^2(\cos(2x) + i\sin(2x))$
"in this case is:
$\cos(3π/4)+i\sin(3π/4))$
and that will be
$e^{3π/4}$".
Another typo.  You meant $e^{3\pi i/4}$.
But you forget the period of $2\pi$ which effects the answer.
When you have a problem $\sin (x) = N$ and you solve $x = \arcsin (N)$.  You need to realize that $x = \arcsin(N) + 2k\pi$ are also answers.
So solving for $cos 2x = 0$ so $2x = \pi/2|3\pi/2$ so $x = \pi/4|3\pi/4$ you also need to consider  $2x = \pi/2|3\pi/2 \pm 2k\pi$.   So $x = \pi/4|3\pi/4 \pm k\pi$.  
(If you prefer you can write this as $x = \pi/4|3\pi/4|5\pi/4|7\pi/4 \pm 2j\pi$.)
(Which, we can for convenience sake, now write as $x =\pi/4|3\pi/4|5\pi/4|7\pi/4$.)
The point being if we ever have $\cos (nx) = M$ so $nx = W \pm 2k \pi$ we can't ignore the $\pm 2k \pi$ as $[\pm 2k\pi]/n$ is no longer a period constant but now directly affects the final value.
(Also as $k$ or $j$ may be negative we don't have to write the $\pm$ sign.)
Likewise $\sin 2x = -1$ so $2x = 3\pi/2 + 2k\pi$ and $x = 3\pi/4 + k\pi = 3\pi/4 |7\pi4$
So $z^2 = -i \implies z = e^{3\pi i/4}|e^{7\pi i/4}$.  And this makes sense!  Because all numbers should have two square roots.  And hopefully this means $e^{7\pi i/4 } = -e^{3\pi i/4}$.   ... hopefully....
So to convert these back to $a + bi$ format....
$z =  e^{3\pi i/4},e^{7\pi i/4 }$
$= \cos(3\pi /4) + i\sin({3\pi /4}), \cos(7\pi /4) + i\sin({7\pi /4})$
$= -\frac 1{\sqrt{2}} + i\frac 1{\sqrt{2}},\frac 1{\sqrt{2}} - i\frac 1{\sqrt{2}}$
$= \pm(-1 + i)/\sqrt{2}$.
That's the correct and slick way to do it.
The tedious way to do it is $z = a + bi$ so $z^2 = (a^2-b^2) + i2ab = 0 + (-i)$ so $a^2 = b^2$ and $ab = -1/2$ so $a = \pm \frac 1{\sqrt{2}}; b = \mp \frac 1{\sqrt{2}}$.
So "where does the square root of two come from"?
Well... If you look at the answer geometrically either as $z = \pm r*e^{wi}$ or as $z = a+bi$ the answer is either a point on a circle where cosine and sine are equal but opposite signs $z=(s,-s)$, or the corner of a square (in the first or third quadrant) where the sides are equal, $z=(s,-s)$.  The distance from $(0,0)$ to the point $z=(s,-s)$ is going to be $\sqrt{s^2 + (-s)^2} = \sqrt{2s^2} = \sqrt{2}|s|$.  
As  $|z| = \sqrt{|z^2|} = 1$ and $|z| = |(s,-s)| = |s|\sqrt{2}$ we need to "normalize" $|(s,-s)| = |s(1,-1)| = |s|(\sqrt{2})=1$ so $s = \pm \frac 1{\sqrt{2}}$.  
