NOTE: A Newer version of this tutorial may exist. Click here to go to the never version


Euler's Identity


Chris Tralie

  1. Introduction: What is it?
  2. Proving it with a differential equation
  3. Proving it via Taylor Series expansion
  4. Visualizing Euler's Formula
  5. Trig Identities and Euler's Formula
  6. Expressing Sine and Cosine

1. Introduction: What is it?

Euler's formula is this crazy formula that ties exponentials to sinusoids through imaginary numbers:

$e^{i\theta} = cos(\theta) + isin(\theta)$

Does that make sense? It certainly didn't to me when I first saw it. What does it really mean to raise a number to an imaginary power? I think our instinct when reasoning about exponents is to imagine multiplying the base by itself "exponent" number of times. So, for instance, 34 would be 3*3*3*3. But this line of reasoning leads to a dead end when we have an imaginary exponent, so we can't use that definition of exponentiation. We'll have to use another definition to prove that this is true. So I will go ahead and prove it two different ways to convince you that it makes sense, and then I'll show how it actually makes life easier (in spite of how strange it may seem).

2. Proving it with a differential equation

I'm going to start with an easy proof of this using some basic calculus. I'll start by working backwards, starting with the result:

$f(x) = cos(x) + isin(x)$

Now differentiate f(x) one time:

$f'(x) = -sin(x) + icos(x) = i(cos(x) + isin(x))$

Now note the following differential equation:

\[ \frac{d f(x)}{dx} = if(x) \]

Therefore,

\[ f(x) = e^{ix} \]

And we're done. That was easy!

3. Proving it via Taylor Series expansion

Recall from my tutorial on Taylor Series that the Maclaurin Series of ex is:

\[ e^x = \sum_{n=0}^{\infty} \frac{x^n}{n!}   \]

Plug in i*theta for x:

\[ e^{i\theta} = 1 + (i\theta) + \frac{(i\theta)^2}{2!} + \frac{(i\theta)^3}{3!} + \frac{(i\theta)^4}{4!} + \frac{(i\theta)^5}{5!} + \frac{(i\theta)^6}{6!} + ... \]

Now simplify all of the terms with powers of i in them, noting that i2 = -1:

\[ e^{i\theta} = 1 + (i\theta) + - \frac{\theta^2}{2!} -i \frac{\theta^3}{3!} + \frac{\theta^4}{4!} + i \frac{\theta^5}{5!} - \frac{\theta^6}{6!} + ... \]

Now group all of the even order terms together and all of the odd order terms together, noting that only the odd order terms have an i factor left:

\[ e^{i\theta} = (1 - \frac{\theta^2}{2!} + \frac{\theta^4}{4!} - \frac{\theta^6}{6!} + ...) + i(\theta - \frac{\theta^3}{3!} + \frac{\theta^5}{5!} - ...) \]

You should now recognize a pattern here; all of the even powers form the Maclaurin series for cos(x), and all of the odd powers form the Maclaurin series for sin(x). Therefore, we have proved once again that eix = cos(x) + isin(x).

4. Visualizing Euler's Formula

So hopefully now you can buy Euler's formula; if not at a concrete level, at least at some abstract level by noting that everything "works" mathematically if you accept that i is the square root of -1. Now it's difficult to try to visualize it unless we come up with some conventions. For this, we first need to remember how to plot complex numbers in rectangular form. We normally visualize complex numbers in 2D by convention, plotting the real component on the horizontal axis, and the imaginary part on the vertical axis. For instance, the complex number, 4 + i, would be plotted as follows:


If we adapt this convention, we notice that the components of e^(ix) in the complex plane are (cos(x), sin(x)). Thus, feeding different x values to Euler's formula traces out a unit circle in the complex plane. In this manner, Euler's formula can be used to express complex numbers in polar form. We simply give a magnitude, A, and an angle, theta, that a complex number makes with the real axis (the arc tangent of the imaginary over the real component), and we can express it using Euler's formula. For instance, we can express the number (1 + i) as:

$\sqrt{2}e^{i( \frac{ \pi}{4})} = \sqrt{2}(cos(\frac{ \pi}{4}) + isin(\frac{ \pi}{4})) = \sqrt{2}(\frac{\sqrt{2}}{2} + i\frac{\sqrt{2}}{2}) = 1 + i$


...where A is sqrt(2) and theta is 45 degrees in this case

5. Trig Identities and Euler's Formula

Euler's Formula makes it really easy to prove complicated trig identities, because we now get to use properties of exponents to help us out. Let me show you a quick example:

$sin(u \pm v) = sin(u)cos(v) \pm cos(u)sin(v)$

$cos(u \pm v) = cos(u)cos(v) \mp sin(u)sin(v)$

Proof:

\begin{align} e^{i(u + v)} &= cos(u + v) + isin(u + v) \\
	&= e^{iu}e^{iv} \\
	&= [cos(u) + isin(u)][cos(v) + isin(v)] \\
	&= cos(u)cos(v) + icos(u)sin(v) + isin(u)cos(v) - sin(u)sin(v) \\
	&= cos(u)cos(v) - sin(u)sin(v) + i(cos(u)sin(v) + sin(u)cos(v)) \end{align}

Therefore, we end up with:

$cos(u + v) + isin(u + v) = (cos(u)cos(v) - sin(u)sin(v)) + i(cos(u)sin(v) + sin(u)cos(v))$

Now grouping both parts together:

$ cos(u + v) = cos(u)cos(v) - sin(u)sin(v)$

and...

$isin(u + v) = i(cos(u)sin(v) + sin(u)cos(v))$
$sin(u + v) = cos(u)sin(v) + sin(u)cos(v)$

To get the other part of the "plus or minus," plug in (-v), noting that cos(-u) = cos(u) [the cosine is an even function] and sin(-u) = -sin(u) [the sine is an odd funtion]:

$cos(u - v) = cos(-u)cos(v) - sin(-u)sin(v) = cos(u)cos(v) - -sin(u)sin(v)$
$cos(u - v) = cos(u)cos(v) + sin(u)sin(v)$

and...

$sin(u - v) = sin(u)cos(-v) + cos(u)sin(-v) = sin(u)cos(v) + cos(u)[-sin(v)]$
$sin(u - v) = sin(u)cos(v) - cos(u)sin(v)$

The normal way to prove it with trig is much more complicated (I don't even feel it's worth writing down here right now). But this identity is very important, and we will need it later when we talk about phasors in another tutorial.

6. Expressing Sine and Cosine


One more quick note about how to write sine and cosine in terms of euler's identity. These formulas rely on the fact that cosine is even (cos(x) = cos(-x)) and sine is odd (sin(x) = - sin(-x)). The goal will be to use these facts to our advantage to cancel out the sine when we're trying to get the formula for the cosine, or vice versa: