$z^2 = -1$ Why what i do is wrong? I want to calculate $z^2 = -1$ i think i should get  to $z = i$.
$-1 = -1+0i = 1(\cos(2\pi k)+i\sin(2\pi k)), k \in Z$
$z^2 = r^2(\cos(2 \theta) + i\sin(2\theta))$
So i get: 
$$r^2(\cos(2 \theta) + i\sin(2\theta)) = 1(\cos(2\pi k)+i\sin(2\pi k))$$
Namely: 
$r = 1, 2 \theta = 2 \pi k \Rightarrow \theta = \pi k$
So for $k = 0$ i get $z_0 = 1$ for $k=1: z_1 = -1$
What i do wrong?
 A: Note that
$$-1 = -1+0i = 1[\cos(\pi+2\pi k)+i\sin(\pi+2\pi k)], \>k \in Z$$
Then,
$$z^2=r^2[\cos(2 \theta) + i\sin(2\theta)] = 1[\cos(\pi+2\pi k)+i\sin(\pi+2\pi k)]$$
and you get $r =1$ and $\theta = \frac\pi2 + k\pi$. As a result,
$$z_k = \cos(\frac\pi2+\pi k)+i\sin(\frac\pi2+\pi k)$$
So, for $k=0$ and $k=1$, you have respectively,
$$z_0= \cos\frac\pi2 +  i\sin\frac\pi2 = i;\>\>\>\>\>z_1= \cos\frac{3\pi}2 +  i\sin\frac{3\pi}2 =-i$$
A: You want to have$$r^2\bigl(\cos(2\theta)+\sin(2\theta)i\bigr)=-1,$$which means that $r=1$ (here, I am using the fact that $r\geqslant0$), that $\cos(2\theta)=-1$, and that $\sin(2\theta)=0$. But then $2\theta=2k\pi+\pi$ for some $k\in\mathbb Z$, which means that $\theta=k\pi+\frac\pi2$. If $k$ is even you get $i$; otherwise, you get $-i$.
A: It should be
$-1 = -1+0i = 1(\cos(\pi(2 k+1))+i\sin(2\pi(2 k+1))), k \in Z$
$z^2 = r^2(\cos(2 \theta) + i\sin(2\theta))$
So  $r^2(\cos(2 \theta) + i\sin(2\theta)) = 1(\cos(\pi(2 k+1))+i\sin(2\pi (2k+1)))$
Namely, $r = 1, 2 \theta = \pi(2 k+1)\Rightarrow \theta = \pi (k+\frac12)$.
So for $k = 0$ you get $z_0 = i$, and, for $k=1, z_1 = -i$.
A: $$(a+b\,i)^2=a^2-b^2+2ab\,i=-1\iff a^2-b^2=-1,2ab=0.$$
The only way is by $a=0,b^2=1$, hence $\pm i$.

Your mistake was in $2k\pi$ instead of $(2k+1)\pi$.
