The Harmonic Series
If you would have to guess the value of the following expression (the harmonic series), what would you do?
The value of the individual terms clearly goes to zero if \(n\) goes to infinity. But does that mean that the total sum will be finite? Well, it doesn’t. This was already proven by Nicole Oresme in about 1350. The proof is actually surprisingly easy, it goes as follows.
If we replace each term in the series by a term that is smaller than or equal to the original one, then the total sum will surely be smaller. So we have
But the right-hand series is equal to
which means that the sum of the original series must be infinite as well.
Shouldn’t We Use a Computer For This?
The fun starts when you try to approximate the harmonic series using a computer. This is not a good idea, of course, but it shows very well that you should be careful to understand what you are doing before implementing a numerical solution for a mathematical problem.
The most straightforward way, simply adding terms starting at 1, is even worse than you would expect. It not only does not provide the right answer, it also makes you believe that the series actually converges. What happens? The terms that you add keep getting smaller and smaller, until they are so small that they actually don’t increase the sum anymore, since they are smaller than the precision that the computer keeps for that sum. If you use single precision floating point numbers, this happens when \(n\) is 2097152; the sum at that point is a whopping 15.4. Adding further terms won’t increase the sum anymore, which could lead to the conclusion that 15.4 is the correct result.
Adding the terms the other way around, so starting with the largest \(n\), is much better. The added terms are comparable in size, so less precision is lost. A more important advantage of starting “at the end” is that you are aware that you are only calculating a partial sum, so you won’t conclude that your result is the final solution.
We know from the proof that the sum of the harmonic series is infinite, and we know from the numerical experiments that it increases rather slowly. The sum passes 10 when \(n\) is 12367; it passes 100 when \(n\) is 15092688622113788323693563264538101449859497 (I am not making this up). The harmonic series is a very nice demonstration of the subtleness of mathematics. Try to image the infinite succession of ever smaller terms that still produces a sum that outgrows any number, even though the terms added become really ridiculously small… By the way, now that you are convinced that the harmonic series grows very slowly, you will possibly be surprised that the harmonic series of primes, the sum of the reciprocals of the primes,
also grows to infinity!