Chronology Current Month Current Thread Current Date
[Year List] [Month List (current year)] [Date Index] [Thread Index] [Thread Prev] [Thread Next] [Date Prev] [Date Next]

Re: Sum of infinite series



Regarding Paul's question and John M.'s response:

On Sat, 26 Jan 2002, Paul O. Johnson wrote:

How would I easily find the sum of the first 50 or 100 terms
such as John Denker suggests in his second reply?

A spreadsheet is ideal for quick sums of finite series. Here are
a few results for 1/2 + 1/4 + 1/6 + 1/8 + ...

# of terms sum
10 1.4645
20 1.7989
50 2.2496
100 2.5937
200 2.9390
500 3.3964
1000 3.7427

As you can see, the series diverges painfully slowly.
...

This looks like a job for the Euler-Mascheroni constant, i.e.
gamma, and the Euler-Maclaurin summation formula.

The Euler-Mascheroni Constant has the approximate value of:

gamma = 0.577215664901532860606512090082402431042...

and it is defined by the expression:

gamma = lim(N --> infinity) {SUM(k = 1 to N, 1/k) - ln(N)}

If we combine this with an application of the Euler-Maclaurin
Summation formula (useful for summing long series) which has been
tuned for this problem we can construct a rapidly pseudo-convergent
asymptotic series that allows us to quite accurately sum the partial
(slowly divergent) harmonic series. In particular, if we define H_n
to be:

H_n == SUM(k = 1 to n, 1/k)

we can find an alternate expression for H_n which is rapidly
pseudo-convergent for large values of n. In particular, we get:

H_n = gamma + ln(n) + 1/(2*n) - 1/(12*n^2) + 1/(120*n^4) -
- 1/(252*n^6) + 1/(240*n^8) - 1/(132*n^10) +
+ 691/(32760*n^12) - 1/(12*n^14) + order (1/n^16) ...

Now suppose we wish to sum the first 1000 terms of the harmonic
series. We then get:

H_1000 = gamma + ln(1000) + 1/2000 - 1/12000000 + 1/120000000000000 -
- 1/252000000000000000000 + ... = 7.4854708606...

Dividing this by 2 gives H_1000 / 2 = 3.7427354303... .

Suppose we wish to sum the first 100 terms of the harmonic series.
This gives:

H_100 = gamma + ln(100) + 1/200 - 120000 + 1/12000000000 -
- 1/252000000000000 + ... = 5.1873775176... .

Dividing this by 2 gives H_100 / 2 = 2.5936887588... .

Using this alternate formula frees us from having to rely on a
computer spreadsheet with its attendant cumulating roundoff error.
We can easily get the above results and any others like them to at
least 11 sig figs for large and moderately large n values by just
using a non-programable hand held calculator that has a built-in
natural logarithm function. I used a TI-30 for the above
calculations.

David Bowman
David_Bowman@georgetowncollege.edu