The Structure of Infinite Series

An infinite series is a sum of infinitely many numbers or terms, related in a given way and listed in a given order. They can be used to calculate the values of irrational numbers, like pi, out to trillions of decimal places. Or to calculate values of trigonometric and exponential functions. And of greatest interest, they can be used to see non-obvious relations between different areas of mathematics like integers, fractions, irrational numbers, complex numbers, geometry, trigonometric functions, and exponential functions.

I’d like to start things off with a joke. A math joke.

An infinite number of mathematicians walk into a bar. The first orders a beer, the second orders half a beer, the third orders a quarter of a beer, and so on. After the seventh order, the bartender pours two beers and says, “You fellas ought to know your limits.”

OK, I tried to start things off in a cute way. Anyway, the joke is that if they keep following that pattern to infinity the total approaches the equivalent of two beers. That is the limit of the series. In mathematical terms this is an infinite series. An infinite series is a sum of infinite terms. With the series in the joke the series is:

1 + 1/2 + 1/4 + 1/8 + 1/16 + … = 2

Each term in the series is half the previous term. And if you continue this out to infinity (whatever that means) it ends up adding up to to 2.

Infinite series can be either convergent or divergent. The series just mentioned is convergent because it adds up to a finite number. But others end up blowing up to infinity. And those are divergent.

Convergent series fascinate me. Their aesthetics remind me of cyclopean masonry, famous among the Inca, where all the stone pieces fit together perfectly, as if part of a single block. These series reveal infinite structure within numbers.

I’d like to share some of my favorite examples of infinite series. The previously mentioned series adding up to 2 is interesting. It shows infinite structure within this simple integer, 2. But I’m especially interested in infinite series for irrational numbers. Irrational numbers, like pi, e, and logarithms, have infinite, non-repeating, decimal places. How can we find the values for all these digits? This is where infinite series became extremely useful.

Pi, approximately 3.14159, is the ratio of circumference to diameter. How can we find its value? Maybe make a really big circle and keep on making measurements with more and more accurate tape measures? No, that won’t go very far. Fortunately, there are infinite series that add up to pi or ratios of pi. And what’s fascinating is that these series seem to have no obvious relation to circles, diameters, or circumferences. Here are some of those series:

1/1^2 + 1/2^2 + 1/3^2 + 1/4^2 + … = π^2/6

1/1 – 1/3 + 1/5 – 1/7 + 1/9 – … = π/4

You look at something like that and wonder. What on Earth is pi doing there? Where did that come from? Irrational numbers, by definition, cannot be expressed as fractions. But they can be expressed as infinite sums of fractions. You can get an irrational number like pi just by adding up these simple fractions. At least, by adding them up an infinite number of times. Of course, we can’t actually do that. But we can still add up many, many terms. And with computers we can add up millions of terms to get millions of digits. But different series will converge on the accurate value for a given number of digits more quickly than others. If we’re actually trying to get as many digits as possible as quickly as possible we’ll want a quickly converging series. A great example of such a modern series for pi is the Ramanujan series:

1/π = 2 * sqrt(2) / 9801 * sum[ (4k)! * (1103 + 26930k) / ((k!)^4  * 396^(4k)), k=0,∞]

This series computes a further eight decimal places of pi with each term in the series. Extremely useful.

But back to the earlier question. What is pi doing here? How do these sums, that don’t seem to have anything to do with the geometry of circles, spit out pi?

Let’s just look at that series that adds up to pi/4. This is known as the Leibniz formula. pi/4 is the solution to arctan(1), a trigonometric function. In calculus the derivative of arctan(x) is 1/(1+x^2). 1//(1+x^2) can also be represented by a power series of the form:

1/(1+x^2) = 1 – x^2 + x^4 – x^6 + …

Since this is the derivative of arctan(x) we can integrate it and get a series that is equivalent to arctan(x).

arctan(x) = x – x^3/3 + x^5/5 – x^7/7 + …

This is quite useful. Since it’s a function we can plug in different values for x and get the result to whatever accuracy we want by expanding out the series as many terms as we want. To get the Leibniz formula we plug in 1. So arctan(1) is:

1/1 – 1/3 + 1/5 – 1/7 + 1/9 – … = arctan(1)

And we already know that arctan(1) is equal to pi/4. So this gives us a way to calculate the value of pi/4 and, by just multiplying the result by 4, the value of pi. We can calculate pi as accurately as we want by expanding the series out as many terms as we want to. Though in the case of pi, we’ll do this with a faster converging series like the Ramanujan series. But I picked the Leibniz series as an example because it’s easiest to show why it converges on pi, or specifically pi/4. You can see a little bit here how different areas of mathematics overlap: geometry relating to trigonometry, calculus, and infinite series. Steven Strogatz has made the point that infinite series are actually a great way to see the unity of all mathematics.

So that’s pi. Let’s look at some other irrational numbers that can be calculated by series. 

To calculate e, approximately 2.71828, we can use the following series:

1/0! + 1/1! + 1/2! + 1/3! + 1/4! + … = e

Or to calculate ln(2), approximately 0.693, we can use the following series:

1/1 – 1/2 + 1/3 – 1/4 + … = ln(2)

I find these similarly elegant in their simplicity. We’re just adding up fractions of integers and converging to irrational numbers. I think that’s remarkable.

We saw earlier with the arctan function that it’s also possible to write a series not only with numbers but with variables so that the series becomes a function where we can plug in different numbers. There are series for sine and cosine functions in trigonometry. That’s good because not all outputs from these functions are “nice” values that we can figure out using other principles of geometry, like the Pythagorean Theorem. What are some of these “nice” values? We’ll use radians, where pi/2 radians equals 90 degrees.

sin(0) = 0
sin(pi/2) = 1
sin(pi/3) = sqrt(3)/2
sin(pi/4) = sqrt(2)/2
sin(pi/6) = 1/2

These are angles of special triangles with angles of 45, 30, 60 degrees, where the ratios of the different side lengths work out to ratios that we can figure out using the Pythagorean Theorem. But these are special cases. If we want to calculate a trigonometric function for other values we need some other method.

Fortunately, there are infinite series for these functions. The infinite series for the sine and cosine functions are:

sin(x) = x – x^3/3! + x^5/5! – x^7/7! + …

cos(x) = 1 – x^2/2! + x^4/4! – x^6/6! + …

Again, we have this kind of surprising result where we get trigonometric functions just from the sum of fractions of integers and factorials, which don’t seemingly have much to do with each other. Where is this coming from?

These trigonometric functions are infinitely differentiable. You can take the derivative of a sine function over and over again and no matter how many times you do it the result will be either a sine function or a cosine function. Same for the cosine function. They just keep circling back on themselves when we differentiate them. These series come from their Taylor series representations, or specifically their Maclaurin series representations. The Maclaurin series for a function f(x) is:

f(0) + f’(0)/1! * x + f’’(0)/2! * x^2 + f’’’(0)/3! * x^3 + …

What happens if we apply this to sin(x)? Let’s take repeated derivatives of sin(x):

First derivative: cos(x)
Second derivative: -sin(x)
Third derivative: -cos(x)
Fourth derivative: sin(x)

So by the fourth derivative we’re back where we started. And so on. What are the values of these derivatives at 0?

sin(0) = 0
cos(0) = 1
-sin(0) = 0
-cos(0) = -1

So the terms with the second and fourth derivatives will go to 0 and disappear. The remaining terms will alternate between positive and negative. In the case of sin(x) each term in the resulting series will have x raised to odd integers divided by odd factorials, with alternating signs. The result being:

sin(x) = x – x^3/3! + x^5/5! – x^7/7! + …

And for cos(x) it will be similar but with x raised to even integers divided by even factorials, with alternating signs. The result being:

cos(x) = 1 – x^2/2! + x^4/4! – x^6/6! + …

Using these series we can now calculate sine and cosine for any value. Not just the special angles of “nice” triangles.

The Maclaurin series also gives an infinite series for another important infinitely differentiable function: the exponential function e^x. The derivative of e^x is just itself, e^x, forever and ever. So in this case the Maclaurin series is quite simple. No skips or alterations.

e^x = 1 + x + x^2/2! + x^3/3! + …

We already saw one solution to this equation where x is set equal to 1, which is simply the number e.

These three series – for sin(x), cos(x), and e^x – allow us to see an interesting relation between exponential functions and trigonometric functions. The series for e^x has all the terms from the series for both sin(x) and cos(x). But in the series for e^x all the terms are positive. Is there a way to combine these three? Yes, there is. And it will connect it all to another area of mathematics: complex numbers. Complex numbers include the imaginary number i, which is defined as the square root of -1. The number i has the following properties:

i^2 = -1
i^3 = -i
i^4 = 1
i^5 = i

And the cycle repeats from there. It turns out that if we plug ix into the series for e^x all the positive and negative sines work out to match those of the series for cos(x) and i*sin(x). With the result that:

e^(ix) = cos(x) + i * sin(x)

To make things really interesting let’s also bring pi into this and substitute pi for x. In that case, cos(π) = -1 and sin(π) = 0. So we get the equation:

e^(iπ) + 1 = 0

Steven Strogatz said of this result:

“It connects a handful of the most celebrated numbers in mathematics: 0, 1, π, i and e. Each symbolizes an entire branch of math, and in that way the equation can be seen as a glorious confluence, a testament to the unity of math. Zero represents nothingness, the void, and yet it is not the absence of number — it is the number that makes our whole system of writing numbers possible. Then there’s 1, the unit, the beginning, the bedrock of counting and numbers and, by extension, all of elementary school math. Next comes π, the symbol of circles and perfection, yet with a mysterious dark side, hinting at infinity in the cryptic pattern of its digits, never-ending, inscrutable. There’s i, the imaginary number, an icon of algebra, embodying the leaps of creative imagination that allowed number to break the shackles of mere magnitude. And finally e, the mascot of calculus, a symbol of motion and change.”

He also said, speaking of infinite series generally:

“The most compelling reason for learning about infinite series (or so I tell my students) is that they’re stunning connectors. They reveal ties between different areas of mathematics, unexpected links between everything that came before. It’s only when you get to this part of calculus that the true structure of math — all of math — finally starts to emerge.”

I think we can see that effect in some of the relations between some of my favorite infinite series that I’ve shared here.

Having looked at all this I’d like to make a couple philosophical observations.

One is on the possibility of objectivity in mathematics, mathematical realism, or mathematical platonism. Infinite series enable us to calculate digits for irrational numbers, which have infinite digits. We find the values millions and billions of decimal places out and we will always be able to keep going. Last I checked, as of 2021 pi had been calculated out to 62.8 trillion digits. What of the next 100 trillion digits? Or the next quadrillion digits? Well, I think that they are already there waiting to be calculated, whether we end up ever calculating them or not. And they always have been. Those 62.8 trillion digits that we’ve calculated so far have been there since the days of the dinosaurs and since the Big Bang. There’s a philosophical question of whether mathematical conclusions are discovered or created. You can tell I believe they’re discovered. And part of the reason for that is because of these kinds of calculations with infinite series. No matter how deep into infinity you go there’s always more there. And you don’t know what’s there until you do the calculations. You can’t decide for yourself what’s there. You have to do the work to find out and get the right answer. Roger Penrose had a similar line of thinking with the infinite structure of the Mandelbrot set.

Now, I do think there’s a certain degree of human activity in the process. Like in deciding what kinds of questions to ask. For example, geometry looks different whether you’re working in Euclidean, hyperbolic, or elliptic geometry. Answers depend on assumptions and conditions. I like a line that I heard from Alex Kontorovich: “The questions that are being asked are an invention. The answers are a discovery.”

The other philosophical question is: What does it actually mean to say that an infinite sum equals a certain value or converges to a certain value? We can never actually add up infinite terms. Nevertheless, we can see and sometimes even prove where a convergent series is headed. And this is where that concept of limits comes up. I don’t know how to answer that question. There are different ways to interpret that. Presently, the way I’m inclined to put it is this: The limits of infinite series are values toward which series tend. They never actually reach them because infinity is not actual. But the tendency of an infinite series is real, such that, as you continue to add up more terms in the series the sum will continue to get closer to the value of convergence. 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: