By expanding the left hand side and then comparing real and imaginary parts, it is possible to derive useful expressions for cos(nx) and sin(nx) in terms of sin(x) and cos(x). Furthermore, one can use the formula to find explicit expressions for the n-th roots of unity: complex numbers z such that zn = 1.
Abraham de Moivre was a good friend of Newton; in 1698 he wrote that the formula had been known to Newton as early as 1676. It can be derived from (but historically preceded) Euler's formula eix = cos x + i sin x and the exponential law (eix)n = einx (see exponential function).
De Moivre's formula is actually true more generally than stated above: if z and w are complex numbers, then (cos z + i sin z)w is a multivalued function while cos (wz) + i sin (wz) is not, and one can state that