How to evaluate the sum of infinite series numerically?

857 Views Asked by At

As mentioned in document, Mathematica can evaluate Riemann Zeta function to arbitrary numerical precision. I see related posts which takes advantage of the property of Zeta function. But for a converged general series without closed form, how do we evaluate it numerically? Do we have to sum many terms one by one. When should we stop? How do we know the result reaches given precision? And the sum of all remaining terms won't affect the result? If the sum of the series converges very slowly, the computation would be very expensive.

====

UPDATE

Since this post is on hold, I know that there is no general way to evaluate the sum of infinite series. Many thanks to your replies. They give me a good start point for further study.

2

There are 2 best solutions below

0
On BEST ANSWER

If you have a slowly converging series, there are a number of techniques for accelerating the convergence.

This is a good place to start:

https://en.m.wikipedia.org/wiki/Series_acceleration

0
On

In principle it is impossible (you have no guarantee that the behaviour of the first $1000000$ terms predicts what the rest of the series does), but nevertheless there are numerical methods that work pretty well most of the time in practice. I don't know what Mathematica uses, but Maple uses Levin's U transform. References the Maple help page gives are:

Fessler, T.; Ford, W.F.; and Smith, D.A. "HURRY: An acceleration algorithm for scalar sequences and series." ACM Trans. Math. Software, Vol. 9, (1983): 346-354.

Levin, D. "Development of non-linear transformations for improving convergence of sequences". Internat. J. Comput. Math, Vol. B3, (1973): 371-388.