To find the roots of \[ f(x) = x^{n}-1 \]
Solving for \(x\) from
\begin{align} 0 & =x^{n}-1\nonumber \\ x^{n} & =1\nonumber \\ x & =1^{\frac{1}{n}}\tag{1} \end{align}
Now \(1^{\frac{1}{n}}\) is evaluated. Since \[ 1=e^{i\left ( 2\pi \right ) }\] Substituting (2) in the RHS of (1) gives \begin{align} x & =(e^{i2\pi })^{\frac{1}{n}}\nonumber \\ & =\left ( \cos 2\pi +i\sin 2\pi \right ) ^{\frac{1}{n}}\tag{3} \end{align}
Using De Moivre’s formula \[ \left ( \cos \alpha +i\sin \alpha \right ) ^{\frac{1}{n}}=\cos \left ( \frac{\alpha }{n}+k\frac{2\pi }{n}\right ) +i\sin \left ( \frac{\alpha }{n}+k\frac{2\pi }{n}\right ) \ \ \ \ \ \ \ k=0,1,\cdots n-1 \] Therefore (3) is rewritten as\[ x=\cos \left ( \frac{2\pi }{n}+k\frac{2\pi }{n}\right ) +i\sin \left ( \frac{2\pi }{n}+k\frac{2\pi }{n}\right ) \ \ \ \ \ \ \ k=0,1,\cdots n-1 \] The above gives the roots of \(f(x)=x^{n}-1\). The following examples illustrate the use of the above.
And for \(k=1\)\begin{align*} x & =\cos \left ( \frac{2\pi }{2}+\frac{2\pi }{2}\right ) +i\sin \left ( \frac{2\pi }{2}+\frac{2\pi }{2}\right ) \\ & =1 \end{align*}
Hence the two roots are \(\{1,-1\}\)
And for \(k=1\) \begin{align*} x & =\cos \left ( \frac{2\pi }{3}+\frac{2\pi }{3}\right ) +i\sin \left ( \frac{2\pi }{3}+\frac{2\pi }{3}\right ) \\ & =\cos \left ( \frac{4\pi }{3}\right ) +i\sin \left ( \frac{4\pi }{3}\right ) \\ & =-\frac{1}{2}-i\frac{\sqrt{3}}{2} \end{align*}
And for \(k=2\)\begin{align*} x & =\cos \left ( \frac{2\pi }{3}+2\frac{2\pi }{3}\right ) +i\sin \left ( \frac{2\pi }{3}+2\frac{2\pi }{3}\right ) \\ & =\cos \left ( \frac{6\pi }{3}\right ) +i\sin \left ( \frac{6\pi }{3}\right ) \\ & =1 \end{align*}
Therefore the roots are \(\{1,\) \(-\frac{1}{2}+i\frac{\sqrt{3}}{2},-\frac{1}{2}-i\frac{\sqrt{3}}{2}\}\)