If I have something like
x^4 = 1
...which I know is a very simple example, how do I calculate all the roots?
We have x^4 - 1 = 0 => ( x^2 + 1 )(x^2 - 1 ) = 0
gives x^2 = 1 and x^2 = -1
so roots of equation are 1; -1; i; -i
That works for something simple, but what happens when we get to something more complex?
I think I recall a formula when working with complex numbers:
$\displaystyle |x^{1/n}|*[cos(\frac{\theta}{n} + \frac{2k\pi}{n}) + jsin(\frac{\theta}{n} + \frac{2k\pi}{n})]$
Is that would I would use?
The way you put the question in the OP lead us to think you were asking a different level of question.
Yes that formula works if you understand its parts.
Finding the $\displaystyle n^{th}$ roots of $\displaystyle z$.
First find $\displaystyle \theta=\text{Arg}(z)$ then $\displaystyle r=\sqrt[n]{{\left| z \right|}}$.
The n roots are $\displaystyle r\exp \left( {\frac{{\theta + 2k\pi }}{n}\mathbif{i}} \right)~k=0,1,\cdots,n-1$
At the time I had posted it, I had completely forgotten about this formula. At some point, I remembered using it for complex numbers, and needed to double check that it was useable for just real numbers.
I also didn't know if I was overcomplicating things, and if there was an easier way to do it.