How to find all values of $z$ such that $z^3=-8i$ If I am asked to find all values of $z$ such that $z^3=-8i$, what is the best method to go about that?
I have the following formula:
$$z^{\frac{1}{n}}=r^\frac{1}{n}\left[\cos\left(\frac{\theta}{n}+\frac{2\pi k}{n}\right)+i\sin\left(\frac{\theta}{n}+\frac{2\pi k}{n}\right)\right]$$
for $k=0,\pm1, \pm2,...$
Applying this formula, I find the cubed root of $8$, which is $2$.  And then when I apply it to the formula, I get the following:
$$z = 2\left[\cos\left(\frac{\pi}{3}+\frac{2\pi k}{3}\right)+i\sin\left(\frac{\pi}{3}+\frac{2\pi k}{3}\right)\right]$$ for $k=0,\pm1, \pm2,...$
I am confused, because the given solution is as follows:
$$z = 2\left[\cos\left(\frac{\pi}{2}+\frac{2\pi k}{3}\right)+i\sin\left(\frac{\pi}{2}+\frac{2\pi k}{3}\right)\right]$$ for $k=0,\pm1, \pm2,...$
Where did I go wrong?  How would my approach changed if I was asked to find all values for $-8$, or $8i$?
 A: There are several ways to solve this but one of the simplest is to write $ z $ of the form $ r \angle \theta $.
In this case $ z = 8 \angle \frac{-\pi}{2} $ We want cube roots and the cube root of 8 is 2. We get the first one by dividing $ \theta$ by 3
$ 2 \angle \frac{-\pi}{6}$ is thus one solution.  There are three unique solutions and we get a solution by adding or subtracting $ \frac{2 \cdot \pi}{3} $ we can get a solution every time we do this but to avoid repeated solutions we are only interested in the ones where $ -\pi \lt \theta \le \pi$.
I'll leave this as an exercise, If required you can now convert these solutions back into $ a + i b$ form. 
A: Short way write it as $$z^{ 3 }=-8i\\ z^{ 3 }=8{ e }^{ i\frac { 3\pi  }{ 2 }  }\\ z=\sqrt [ 3 ]{ 8 } { e }^{ i\left( \frac { \frac { 3\pi  }{ 2 } +2\pi k }{ 3 }  \right)  }=2{ e }^{ i\left( \frac { 3\pi +4\pi k }{ 6 }  \right)  },k=0,1,2\quad $$
A: You are claiming $\theta=\pi$, whereas it doesn't - actually $\theta=\dfrac{3\pi}{2}$, which gives the solution you list.
For $-8$ use $\theta=\pi$, and for $8i$ use $\theta=\dfrac{\pi}{2}$.
A: The problem with you solution is the following: you didn't wrote properly the modulus and the exponential part of $w:=-8i$.
Clearly
$$
r=|w|=8\\
-i=\exp{\left(\frac{3}{2}\pi i\right)}=\exp{\left(\frac{3}{2}\pi i+2ki\pi\right)}\;,\;\;k\in\Bbb Z
$$
so that
$$
z^3=r\exp[{i\pi\left(3/2+2k\right)}]\\
\Longrightarrow z_k
=\sqrt[3]r\exp\left[{\frac{i\pi}3\left(\frac32+2k\right)}\right]
=2\exp\left[{\frac{i\pi}2+\frac{2ki\pi}3}\right]
$$
and as $k\in\Bbb Z$ you will notice that $z_k$ assumes only three different values, which are the solution of your initial equation.
