An Amazing Formula

A couple of years ago I was thinking about how to generalize many of the infinite series that we know so well. It was clear to me that it was possible to generalize them since some of my studies into the field of Fourier series had led me to some of these generalizations in the past. But it was clear that I needed another way – a more controlled way to generate such formulas.

Not long ago, I found a method and I couldn’t sleep that night because I was calculating like crazy in my head. The next morning, I wrote the proof down and that journey is exactly what I want to share with you today.

Recall the geometric series:

This series only converges for |x| < 1.

Also note that if we subtract 1 on both sides, we get:

Let 0 < r < 1, then we can substitute in the complex exponential as follows:

Now here’s the idea. If we integrate with respect to x on both sides, we will get series on the right-hand side that generalizes the harmonic series except for the r that is only present because we need the series to converge. We will deal with that shortly, for now just hold on tight and enjoy the ride.

If we use Euler’s formula we can transform the complex exponential into its trigonometric real and complex parts, the usual trick is to multiply the numerator and the denominator by the complex conjugate of the denominator to separate the real and complex parts.

When we do that, we get

If we integrate that with respect to x and do the same to the series, we get the following:

Now for the interesting part. Note that if we let r → 1 on the left-hand side, and split it up in the real and complex parts, then for certain values of x, we have our convergence!

Therefore, letting r → 1 and multiplying by 2πi on both sides, gives us:

This holds when 0