Time to show you the dramatic conclusion to the story I began yesterday.
Our problem was to define the complex exponential function in a way that was consistent with everything we knew about real exponential functions. We noticed that one of the standard rules for exponents implies
\[
e^{x+iy}=e^xe^{iy}.
\]
Since we already know how to deal with the first term in that product on the right-hand side, our problem has been reduced to deciding what to do with “pure imaginary” exponents.
The key to doing that is to remember that we have a Taylor series expansion for the exponential function:
\[
e^x=1+x+\frac{x^2}{2!}+\frac{x^3}{3!}+\frac{x^4}{4!}+\frac{x^5}{5!}+\dots,
\]
which is a pretty result all by itself. We have previously discussed Taylor series, so if you need a refresher course just follow the link.
Now, the cool thing about that series is that it is just as meaningful if we use a complex number in place of x. (That’s not so obvious, actually, and a rigorous course in complex variables would spend some time establishing that complex power series really are acceptable, but we will obscure those details.) We can write:
\[
e^{iy}=1+iy+\frac{(iy)^2}{2!}+\frac{(iy)^3}{3!}+\frac{(iy)^4}{4!}+\frac{(iy)^5}{5!}+\dots
\]
Let us now pause to recall some of the basic algebra of complex numbers:
\[
i^1=i, \phantom{xx} i^2=-1, \phantom{xx} i^3=i^2(i)=-i, \phantom{xx} i^4=i^2(i^2)=1.
\]
That’s very interesting, since it implies that raising i to any even power produces an integer. We will put that to good use by separating out the terms with even exponents from the series above:
\[
1+\frac{(iy)^2}{2!}+\frac{(iy)^4}{4!}+\frac{(iy)^6}{6!}+\frac{(iy)^8}{8!}+\dots
\]
Substituting in the even powers of i we saw above gives us:
\[
1-\frac{y^2}{2!}+\frac{y^4}{4!}-\frac{y^6}{6!}+\frac{y^8}{8!}+\dots
\]
If you remember your second semester calculus, that probably looks familiar. It is precisely the Taylor series for cos y.
Now let’s try the same trick for the terms with odd number exponents. We have:
\[
iy+\frac{(iy)^3}{3!}+\frac{(iy)^5}{5!}+\frac{(iy)^7}{7!}+\frac{(iy)^9}{9!}+\dots
\]
Applying our algebraic rules and then factoring out the i from every term leads to
\[
i \left(y-\frac{y^3}{3!}+\frac{y^5}{5!}-\frac{y^7}{7!}+\frac{y^9}{9!}-\dots \right)
\]
And if that looks familiar, it is because the expression in parentheses is precisely the Taylor series for sin y.
That’s how we arrive at the definition
\[
e^{i \theta}=\cos \theta+ i \sin \theta,
\]
which leads immediately to Euler’s identity
\[
e^{i \pi}+1=0.
\]
Very nice, I’d say, and very unexpected. Of course, it gets even better when you realize that Euler’s identity is really just a special case of a more general result, that the sum of all the nth roots of unity is zero for any n. But we’ll save that for a later post.