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$?