In mathematics, de Moivre's formula (a.k.a. De Moivre's theorem and De Moivre's identity), named after Abraham de Moivre, states that for any complex number (and, in particular, for any real number) x and integer n it holds that
, for z = cos nx + i sin nx. Hence, S(n) holds for all integers n.
, an analog to De Moivre's formula also applies to the hyperbolic trigonometry. For all
,
. Also, if
, then one value of
will be
.^{[2]}
can be represented in the form
for
. In this representation,
, and the trigonometric functions are defiend as
and
. In the case that
,
(the unit vector). This leads to the variation of De Moivre's formula:
, write the quaternion in the form
:
While the formula was named after De Moivre, he never explicitly stated it in his works.^{[1]}
The formula is important because it connects complex numbers (i stands for the imaginary unit (i^{2} = −1)) and trigonometry. The expression cos x + i sin x is sometimes abbreviated to cis x.
By expanding the left hand side and then comparing the real and imaginary parts under the assumption that x is real, it is possible to derive useful expressions for cos(nx) and sin(nx) in terms of cos x and sin x. Furthermore, one can use a generalization of this formula to find explicit expressions for the nth roots of unity, that is, complex numbers z such that z^{n} = 1.
Derivation
Although historically proven earlier, de Moivre's formula can easily be derived from Euler's formula
and the exponential law for integer powers
Then, by Euler's formula,
Failure for noninteger powers
De Moivre's formula does not, in general, hold for noninteger powers. Noninteger powers of a complex number can have many different values, see failure of power and logarithm identities. However there is a generalization that the righthand side expression is one possible value of the power.
The derivation of de Moivre's formula above involves a complex number to the power n. When the power is not an integer, the result is multiplevalued, for example, when n = ½ then:
 For x = 0 the formula gives 1^{½} = 1
 For x = 2'π the formula gives 1^{½} = −1.
Since the angles 0 and 2π are the same this would give two different values for the same expression. The values 1 and −1 are however both square roots of 1 as the generalization asserts.
No such problem occurs with Euler's formula since there is no identification of different values of its exponent. Euler's formula involves a complex power of a positive real number and this always has a defined value. The corresponding expressions are:
Proof by induction (for integer n)
The truth of de Moivre's theorem can be established by mathematical induction for natural numbers, and extended to all integers from there. Consider S(n):
For n > 0, we proceed by mathematical induction. S(1) is clearly true. For our hypothesis, we assume S(k) is true for some natural k. That is, we assume
Now, considering S(k+1):
We deduce that S(k) implies S(k+1). By the principle of mathematical induction it follows that the result is true for all natural numbers. Now, S(0) is clearly true since cos (0x) + i sin(0x) = 1 +i 0 = 1. Finally, for the negative integer cases, we consider an exponent of n for natural n.
The equation (*) is a result of the identity
Formulas for cosine and sine individually
See also: List of trigonometric identities
Being an equality of complex numbers, one necessarily has equality both of the real parts and of the imaginary parts of both members of the equation. If x, and therefore also cos x and sin x, are real numbers, then the identity of these parts can be written using binomial coefficients. This formula was given by 16th century French mathematician Franciscus Vieta:
In each of these two equations, the final trigonometric function equals one or minus one or zero, thus removing half the entries in each of the sums. These equations are in fact even valid for complex values of x, because both sides are entire (that is, holomorphic on the whole complex plane) functions of x, and two such functions that coincide on the real axis necessarily coincide everywhere. Here are the concrete instances of these equations for n = 2 and n = 3:
The right hand side of the formula for cos(nx) is in fact the value T_{n}(cos x) of the Chebyshev polynomial T_{n} at cos x.
Generalization
The formula is actually true in a more general setting than stated above: if z and w are complex numbers, then
is a multivalued function while
is not. However, it still holds that
Applications
This formula can be used to find the n^{th} roots of a complex number. This application does not strictly use de Moivre's formula as the power is not an integer. However considering the right hand side to the power of n will, in each case, give the same value on the lefthand side.
If z is a complex number, written in polar form as
then
where k is an integer. To get the n different roots of z one only needs to consider values of k from 0 to n − 1.
Analog for hyperbolic trigonometry
Since
Analog for quaternions
To find the roots of a quaternion there is an analogous form of De Moivre's formula. A quaternion in the form
'Example' To find the cubic roots of
Then the cubic roots are given by
References
 Abramowitz, Milton & Stegun, Irene A. (1964), Handbook of Mathematical Functions, New York: Dover Publications, p. 74, ISBN 0486612724.

^ Daniels, Margaret L. Lial, John Hornsby, David I. Schneider ;with assistance of Callie J. (2008). College algebra and trigonometry (4th ed. ed.). Boston: Pearson/Addison Wesley. p. 792. ISBN 9780321497444. More than one of
author=
andlast=
specified (help);  ^ Mukhopadhyay, Utpal (NaN undefined NaN). "Some interesting features of hyperbolic functions". Resonance 11 (8): 81–85. doi:10.1007/BF02855783.
 ^ Brand, Louis (October 1942). "The roots of a quaternion". The American Mathematical Monthly 49 (8): 519–520. Retrieved 19 August 2012.
External links
 Hazewinkel, Michiel, ed. (2001), "De Moivre formula", Encyclopedia of Mathematics, Springer, ISBN 9781556080104
 De Moivre's Theorem for Trig Identities by Michael Croucher, Wolfram Demonstrations Project.