# Euler's formula

Euler's formula is a relationship between exponents of imaginary numbers and the trigonometric functions:

For example, if , then

### Relationship to sin and cos

In Euler's formula, if we replace θ with -θ in Euler's formula we get

and

we get

or equivalently,

Similarly, subtracting

from

and dividing by 2i gives us:

Multiplying the top and bottom by -i gives us:

These formulas allow us to define sin and cos for complex inputs. The existence of these formulas allows us to solve 2nd order differential equations like

y" + y' + y = 0

using sines and cosines.

Example

Find sin(3 + 4i) using Euler's formula:

Using the formula

derived above, we plug 3 + 4i in for θ:

 = =

From Euler's formula,

Plugging these into the formula for sin(3 + 4i) yields:

### Proof of Euler's formula

Given the Maclaurin series for ex, cos(x), and sin(x):

 ex = = sin(x) = = cos(x) = =

Notice that if we plug ix into the Mauclaurin series of ex we get

After repeated multiplication, i cycles through i, -1, -1, 1, and back again to i, so i has a period of 4. As a result, the terms in the above series switch signs after every 2 terms. If we group the even and odd powers together, we get

Notice that the terms in parentheses above are equivalent to the Maclaurin series for cos(x) and sin(x) respectively, so plugging cos(x) and sin(x) for their respective Maclaurin series in the above equation yields:

eix = cos(x) + i sin(x)