Where does De Moivre's formula for complex roots come from? I have noticed that in some places on the web (such as here and on the Encyclopedia of Math), De Moivre's familiar theorem,
$$z^n=\big(\rho(\cos\phi+i \sin\phi)\big)^n=\rho^n(\cos n\phi + i \sin n\phi)$$
is expressed in terms that make it easier to compute the roots of a complex number,
$$z^\frac{1}{n}=\big(\rho(\cos\phi+i \sin\phi)\big)^\frac{1}{n}=\rho^\frac{1}{n}\left(\cos\frac{\phi+2\pi k}{n} + i \sin \frac{\phi+2\pi k}{n}\right), \\  
 k=0,1,\ldots n-1$$
I was wondering, what is a simple way to derive the second version from the first? I know that adding a multiple of $2\pi$ to angle does not change its $\sin$ or $\cos$, but I am not sure how to use that knowledge to derive the second version.
EDIT:
I don't mean to be a snob, but it would be better for me (and any poor sap who stumbles upon this question in the years to come) if the amount of extra mathemetical information in answers was kept to a minimum.
I will upvote any answers that are technically correct, but I won't accept the answer if it seems to require more math knowledge than the average high-schooler would be comfortable with.
 A: The reason the angles have an offset of $2\pi k$ is because in the complex world, operations like root-taking are multivalued - because exponentiation of $a^b$ is defined as $\exp(\ln(a)\cdot b)$, and the complex log is multivalued.
Now here we have to assume that $n$ is a real number, and of course $\phi$ is real as well, as otherwise the property $(\rho(\cos\phi+i\sin\phi))^{1/n}=\rho^{1/n}\cdot(\cos\phi+i\sin\phi)^{1/n}$ does not hold. With those assumptions in mind, one could guess the inverse of De Moivre's formula, which was originally developed for integers, but by Euler's formula it holds for any real number $n$. That is to say, if $(\cos\phi+i\sin\phi)^n=\cos n\phi+i\sin n\phi$, then surely $(\cos\phi+i\sin\phi)^{1/n}=\cos\frac{\phi}{n}+i\sin\frac{\phi}{n}$. There is some technical care needed before you turn this intuition into rigour:
To see why the $2\pi k$ appears where it does, consider the cosine + sine as  $\exp(i\phi)$. Then:
$$\exp(i\phi)^{1/n}=\exp\left(\ln(\exp(i\phi))\cdot\frac{1}{n}\right)$$
By the definition I made at the start, and
$$\begin{align}\exp\left(\ln(\exp(i\phi))\cdot\frac{1}{n}\right)&=\exp\left((i\phi+2\pi ik)\cdot\frac{1}{n}\right)\\&=\exp\left(i(\phi+2\pi k)\cdot\frac{1}{n}\right)\\&=\cos\left(\frac{\phi+2\pi k}{n}\right)+i\sin\left(\frac{\phi+2\pi k}{n}\right)\end{align}$$
As you see in your formulae.
A: $z^{1/n}$ is a complex number that when raised to the $n^\text{th}$ power, gives $z$. Using Euler's Formula, we get
$$
\begin{align}
&\left[\rho^{1/n}\left(\cos\left(\frac{\theta+2\pi k}{n}\right)+i\sin\left(\frac{\theta+2\pi k}{n}\right)\right)\right]^n\tag{1a}\\
&=\rho\,(\cos(\theta+2\pi k)+i\sin(\theta+2\pi k))\tag{1b}\\[6pt]
&=\rho\,(\cos(\theta)+i\sin(\theta))\tag{1c}
\end{align}
$$
The last equation follows because $\sin(x+2\pi)=\sin(x)$ and $\cos(x+2\pi)=\cos(x)$, so by induction, for all positive integers $k$, $\sin(x+2\pi k)=\sin(x)$ and $\cos(x+2\pi k)=\cos(x)$.

We only need to use $0\le k\le n-1$ since
$$
\cos\left(\frac{\theta+2\pi n}{n}\right)+i\sin\left(\frac{\theta+2\pi n}{n}\right)=\cos\left(\frac{\theta}{n}\right)+i\sin\left(\frac{\theta}{n}\right)\tag2
$$
and so we would start repeating $n^\text{th}$ roots every $n$ times if we used $k\ge n$.

We get $n$ different roots using $0\le k\le n-1$ with
$$
\rho^{1/n}\left(\cos\left(\frac{\theta+2\pi k}{n}\right)+i\sin\left(\frac{\theta+2\pi k}{n}\right)\right)\tag3
$$
since $\cos(x)+i\sin(x)=\cos(y)+i\sin(y)$ implies that
$$
\begin{align}
0
&=(\cos(x)-\cos(y))^2+(\sin(x)-\sin(y))^2\tag{4a}\\[6pt]
&=2-2\cos(x-y)\tag{4b}
\end{align}
$$
and therefore, $x-y\in2\pi\mathbb{Z}$.
A: A complex number $z \ne 0$ can be written as
$$z = r(\cos \phi +i \sin \phi) \tag{1}$$
with a unique positive number $r$ (in fact, $r = \lvert z \rvert$) and an angle $\phi \in \mathbb R$. As you know, the angle $\phi$ is not uniquely determined by $z$ - we have to make a choice. If we have chosen some $\phi$ satisfying $(1)$, the complete set of solutions of $(1)$ is given by the numbers
$$\phi + 2k\pi,k \in \mathbb Z .$$
Frequently one makes the choice of $\phi$ unique by requiring $0 \le \phi < 2\pi$, but this is arbitrary convention. We could also  require $-\pi < \phi \le  \pi$ etc.
Note that if $\phi, \phi'$ belong to the same half-open interval of length $2\pi$, then $\cos \phi +i \sin \phi = \cos \phi' +i \sin \phi'$ if and only if $\phi = \phi'$.
You ask how
$$z^n = r^n(\cos n\phi + i \sin n \phi)$$
can be used to prove that
$$z^{1/n} = r^{1/n}(\cos \frac{\phi+2\pi k}{n} + i \sin \frac{\phi+2\pi k}{n}), \\  
 k=0,1,\ldots n-1 .$$
So let us determine all complex numbers $w = s (\cos \psi + i \sin \psi)$ such that $w^n = z$. These $w$ are written as $z^{1/n}$ although this notation can mislead to think that $z^{1/n}$ is unique. We have
$$w^n = s^n(\cos n\psi + i \sin n\psi) .$$
Comparing with $z$ yields $s = r^{1/n}$ and $n\psi =  \phi + 2k\pi$ for some $k$. The latter means that
$$\psi = \frac{\phi + 2k\pi}{n} .$$
Hence for each $k \in \mathbb Z$ an $n$-th root of $z$ is given by
$$w_k = r^{1/n}(\cos \psi_k + i \sin \psi_k)$$
where
$$\psi_k = \frac{\phi+2\pi k}{n} .$$
Clearly $\psi_k = \psi_{k'}$ if and only if $k = k'$. Which distinct $w_k$ are produced by these $\psi_k$?

*

*The numbers $\psi_0,\ldots,\psi_{n-1}$ belong to the interval $[\phi/n,\phi/n + 2\pi)$, therefore the $w_0,\ldots,w_{n-1}$ are $n$ distinct $n$-th roots of $z$.


*We have $\psi_{k + rn} = \psi_k + 2r\pi$ for all $r \in \mathbb Z$, thus $w_{k+rn} = w_k$. This shows that each $w_k$ agrees with one of $w_0,\ldots,w_{n-1}$.
