Euler’s discovery of a surprising connection between trigonometry and imaginary-number exponents wasn’t the first example of a link between trig and the imaginaries. In the early 1700s, French mathematician Abraham de Moivre effectively constructed a bridge between these two math topics by originating a variant of this equation, now known as de Moivre’s formula (although he didn’t write it this way):
(cos θ + i sin θ)n = cos (nθ) + i sin (nθ)
where n is an integer, θ stands for an angle measured in radians, nθ means n times the variable θ, and i sin θ means i times sin θ.
At first glance, de Moivre’s formula may look like a baffler from Reggie’s favorite book. But it’s not hard to understand. Just think of each side of the equation as a function that requires a two-step process to deliver an output number. First, you set n equal to a whole number on both sides. Then, you plug in a certain number of radians for θ in the two functions. The equation implies that the function on the left side will output the same number that the function on the right side does for that θ.
To see how it works, let’s plug in 2 for n, and an angle of π/2 radians for θ, and then evaluate each side of the equation to see if they’re really equal, as claimed by the formula. (If they’re not, an awful lot of math books will need to be corrected.)
First, the left side:
(cos π/2 + i sin π/2)2 = (0 + (i × 1))2 [since cos π/2 = 0 and sin π/2 = 1]
= i2
= −1.
Now the right side:
cos (2 × π/2) + i sin (2 × π/2) = cos π + i sin π
= −1 + (i × 0)
= −1.
So it seems, based on very limited evidence, that de Moivre got it right. (Appendix 1 offers stronger evidence—a derivation of the formula.) De Moivre is credited with a number of other advances besides his eponymous formula. While consulting with gamblers, for example, he developed important concepts in probability. Unfortunately, he never found a way to make a decent living. Despite efforts by celebrated contemporaries such as Leibniz to get him a university job, he was forced to scrape by as a private math tutor and spent his life in poverty. He was a refugee too—reared in France as a Protestant, he moved to London at age 20 to escape the persecution of Protestants during the reign of Louis XIV and lived the rest of his life in England.
In his old age, as the story goes, he noticed that he was sleeping 15 minutes longer every night and predicted that he would die on the day that his progressively lengthening period of sleep reached 24 hours. Being mathematically adept, it wasn’t hard for him to calculate exactly when that would happen. Once again, and for the last time, he was right.
De Moivre’s formula is a versatile tool in mathematics. But its full potential to light the way forward on a number of questions wasn’t apparent until Euler, with his genius for making connections, got interested in it in the mid-1700s—apparently he derived it independently of de Moivre. One of Euler’s intriguing findings based on the formula was that the sine and cosine functions are akin to jack-in-the-boxes with infinity coiled up inside. That is, he showed that the trig functions are equal to functions consisting of infinite sums. These sums, made up of fractions of θs raised to successively greater powers, possess orderly patterns of beautiful simplicity based on even and odd integers. Take a look:
cos θ = 1 − θ 2/2! + θ 4/4! − θ 6/6! + θ 8/8! + …
and
sin θ = θ − θ 3/3! + θ 5/5! − θ 7/7! + θ 9/9! + ….
The ! symbols in these two equations stand for factorials. The factorial operator has explosive power, quantitatively speaking—it can expand even smallish numbers into astronomically huge ones. For instance, 15! is over 1.3 trillion. That means the successive denominators of the fractions in these two equations get bigger very fast, which in turn means that the successive fractions themselves become vanishingly small very fast.
The factorial symbol, !, is shorthand for “multiply together all the positive integers up to and including the specified integer.” Thus, 3!, which is spoken “three factorial,” is short for 1 × 2 × 3, or 6. And four factorial, or 4!, means 1 × 2 × 3 × 4, which equals 24.
Interestingly, de Moivre’s formula includes imaginary-number terms—the ones with i times sines—while the infinite sums Euler derived from the formula feature only real numbers. Thus, he effectively traveled through the land of the imaginaries to get to new results in the real-number realm. During the course of his derivation, the imaginary-number terms that he began with in de Moivre’s formula disappeared, just as all the i’s did in the evaluation of Reggie’s infinite sum. The ability of imaginaries to suddenly disappear in calculations, as when i2 becomes −1, is probably why Leibniz regarded them as slippery little creatures halfway between being and not-being.
These equations make it possible to determine values for the sines and cosines of particular angles without measuring triangles’ side lengths or going through the laborious protractor-and-ruler process with the unit circle outlined in the trig chapter. To calculate the approximate cosine of a particular angle, for example, you could simply plug in the angle for θ in the first few terms of the infinite sum of the first equation and add them together. (You need to use only the first few fractions of the infinite sums because, as noted above, the factorials in the denominators cause the successive fractions to dwindle very rapidly toward vanishingly small amounts—only the first few are large enough to have a significant effect on the total.)
Let’s try that for an angle of 38o, whose approximate cosine was obtained via calculator in the trig chapter: cos 38o ≈ 0.788. Of course, performing this exercise won’t prove that the infinite sum Euler found hidden inside the cosine function is valid. But let’s hope that it lends a bit of circumstantial evidence in favor of that conclusion.
Euler’s equations refer to the unit-circle-based sine and cosine functions, and so we must convert 38o to radians before plugging it in for θ. Since we know that 180 degrees equals π radians, 38o should be equal to 38/180 as many radians as that. Because π equals about 3.14, we have 38o ≈ 38/180 × 3.14 radians, which means 38o is about 0.663 radians.
Plugging this radian-expressed angle into the first of the two equations gives
cos 0.663 = 1 − (0.663)2/2! + (0.663)4/4! − (0.663)6/6! + (0.663)8/8! + ….
Adding up the first five terms in the infinite sum yields cos 38o ≈ cos 0.663 radians ≈ 0.788. Happily, my calculator’s estimate of cos 38o agrees with this.
Plugging in 0.663 for the angle in the sine equation’s first five terms gives
sin 0.663 = 0.663 − (0.663)3/3! + (0.663)5/5! − (0.663)7/7! + (0.663)9/9!.
Adding up the terms on the right side of the equals sign yields sin 38o ≈ sin 0.663 radians ≈ 0.616—further reassuring agreement with my calculator.
OUR MAIN ATTRACTION is now just around the bend—recasting the trig functions as functions made up of infinite sums is a key step in the derivation of the most elegant equation. But we need one last venture into the infinite to reach it, a jaunt revealing that the function ex is another jack-in-the-box with a beautifully patterned infinite sum inside.
Before showing what popped out of ex when Euler turned its crank, I should point out that the derivation of Euler’s formula that I’m sketching in this chapter is just one of three ways that Euler demonstrated the truth of a general equation from which eiπ + 1 = 0 follows as a special case. The general equation, which confusingly is also often called Euler’s formula, is
eiθ = cos θ + i sin θ.
(Many math books state this formula using x instead of θ as the variable, by the way.) I’ll explain where it comes from in the next few paragraphs and further expand on its meaning in the following chapters. The derivation that I’m discussing here is the one Euler came up with that most closely resembles those typically shown in math texts today. Another of his derivations, however, is arguably the easiest to follow for those who aren’t familiar with calculus although it’s unorthodox by modern standards; that entire derivation is shown in Appendix 1.
Here’s the infinite sum that Euler found inside ex, which, to be consistent with this chapter’s use of θ as a variable, I’ll write as eθ:
eθ = 1 + θ + θ 2/2! + θ 3/3! + θ 4/4! + θ 5/5! + ….
This infinite sum may look at least somewhat familiar. In fact, if you edited the two trig functions’ infinite sums shown above by replacing their minus signs with plus signs, and then added the two infinite sums together, you’d get precisely the same infinite sum that Euler popped out of eθ. This equivalence of infinite sums foreshadows his revelation that e raised to an imaginary-number power can be expressed in terms of sines and cosines.
To bring imaginary exponents into the picture, Euler made what modern mathematicians regard as a very bold move: He replaced all the θs in the above equation for eθ with an imaginary-number version of θ. This step is now viewed as a kind of Evel Knievel leap because after Euler had proved that the equation was true for real-number θs, he basically just assumed that it would also be true when imaginary numbers were plugged in for the θs. Although he didn’t base this leap on a rigorous argument, it was a sound assumption—Euler’s intuitive moves were usually correct.
The imaginary-number version of θ that he subbed in is written iθ, which means i times the variable θ —iθ is just the imaginary-number counterpart of the real-number variable θ. The substitution entailed rewriting eθ as eiθ, as well as replacing all the θ’s in the infinite sum on the right side of the equation with iθ.
After these substitutions, the equation becomes
eiθ = 1 + iθ + (iθ)2/2! + (iθ)3/3! + (iθ)4/4! + (iθ)5/5! + ….
Note that the infinite sum on the right side is reminiscent of the one in Reggie’s problem. Indeed, simplifying it by rewriting its exponential terms is actually easier than solving Reggie’s problem. Let’s do that.
We’ll begin, once again, with the fact that i2 is equal to −1. That means we can substitute −1 for each occurrence of i2 in the numerators of the infinite sum’s fractions. For instance, (iθ)2—the third term’s numerator—equals iθ × iθ, which, by rearranging the i’s and θ’s, equals i2 × θ2, or −1 × θ2, which can be written −θ2. Thus, the third term is equal to −θ2/2!.
Similarly, the fourth term’s numerator, (iθ)3, is equal to i3 × θ3, or i2 × i × θ3 (since i3 equals i2 × i), which equals −1 × i × θ3, which, by omitting multiplication signs, is equal to −iθ3. Thus, the fourth term can be simplified to −iθ3/3!.
Now that you’ve seen how this process works, try it on the next six terms of the infinite sum, similarly substituting −1 for all occurrences of i2, and also replacing each occurrence of −1 × −1 with 1. What do you get?*
These simplifying moves show that the above equation can be rewritten as
eiθ = 1 + iθ − θ2/2! − iθ3/3! + θ4/4! + iθ5/5! − θ6/6! − iθ7/7! + θ8/8! + ….
Note that every other element of the infinite sum is now a plus or minus term of the form i times θn/n!, where n is an odd integer. (The first such term, iθ, equals i times θ1/1!, because by definition a number raised to the first power is just that number, unchanged. In addition, 1! is defined as 1. Thus, iθ = iθn/n! when n = 1.) Meanwhile the other terms are similar fractions with no i’s in them. Let’s rearrange the sum so that these two different kinds of terms are grouped together:
eiθ = [1 − θ2/2! + θ4/4! − θ6/6! + θ8/8! + …] + [iθ − iθ3/3! + iθ5/5! − iθ7/7! + …].
Finally, we apply an expanded version of the distributive law* to the second group of terms so that each of their i’s is accounted for by a single i multiplied times all of the group’s terms. That justifies the following rewrite of the equation:
eiθ = [1 − θ2/2! + θ4/4! − θ6/6! + θ8/8! + …] + [i × (θ − θ3/3! + θ5/5! − θ7/7! + …)].
To get to the general version of Euler’s formula, all we need to do now is to notice that the first infinite sum, in brackets, is equal to the infinite sum for cos θ that was shown earlier, and the second infinite sum, in parentheses, is equal to the infinite sum for sin θ. Thus, we can replace the infinite sums on the right side of the equation with the trig functions that they’re equivalent to in order to arrive at the equation we’re after,
eiθ = cos θ + i sin θ.
To recapitulate, the equation eiθ = cos θ + i sin θ follows from the fact that the infinite sum shown above for eiθ is equal to the infinite sum for cos θ plus i times the infinite sum for sin θ. As we’ve seen, Euler arrived at this remarkable equation by following a kind of concealed trail through the realm of the infinite to show that the equation’s two sides, which seem radically different functions at first glance, are actually identical. (Meaning that when you plug in a number for θ in eiθ, it outputs the same number that cos θ + i sin θ does when that θ is plugged in.)
GETTING TO MATHEMATICS’ most beautiful equation from here is now a stroll in the park. First, plug in π for all the θ’s in eiθ = cos θ + i sin θ. The substitution yields
eiπ = cos π + i sin π.
Because cos π = −1 and sin π = 0, you can substitute −1 for cos π, and 0 for sin π to get
eiπ = −1.
(The i sin θ term disappeared because after π is substituted for its θ, it becomes i times sin π, which equals i times 0, and zero times any number equals zero.)
Then, by adding 1 to both sides of eiπ = −1 you get another equation in which both sides are equal:
eiπ + 1 = −1 + 1.
And, as the opening crescendo of “Also Sprach Zarathustra”* suddenly wells up out of nowhere, you simplify this equation to
eiπ + 1 = 0.
* Answer: θ4/4!, iθ 5/5!, −θ 6/6!, −iθ 7/7, θ 8/8!, iθ 9/9!.
* The distributive law, a basic rule of arithmetic, is usually written a × (b + c) = (a × b) + (a × c), where the letters stand for numbers or more complicated expressions representing numbers. It means that when you multiply a sum by a number, you get the same result that you would get if you separately multiplied the number times each of the summed numbers and then added the products together. It can also be written as (a × b) + (a × c) = a × (b + c) by reversing the two sides of its standard formulation. And it can be extended to work with any number of terms. For instance, (2 × 4) + (2 × 2) + (2 × 7) + (2 × 3) = 2 × (4 + 2 + 7 + 3). Here, Euler adventurously applied it with an infinite number of terms.
* You know, that stirring music from the movie 2001: A Space Odyssey.