How to "speed up" a series $\displaystyle \sum_{k=0}^{\infty}a_k=\ell$

171 Views Asked by At

Introduction

I was numerically calculating some limits of functions and series and I noticed a disparity:

I have a function $f(x)$ such that: $$\displaystyle\lim_{x\to\infty}f(x)=\ell$$ and I want to numerically calculate an approximation of $\ell$.

Let (for example) $N=1000$ $$\displaystyle\lim_{x\to N}f(x)=\ell_1$$

From a numerical point of view, if I wanted to reach a more accurate approximation of $\ell$ I just need to replace $x$ with a "faster" function (for example $e^x$).

I define $g(x):=f(e^x)$ so I have:

$$\displaystyle\lim_{x\to N}g(x)=\ell_2$$

Where: $$|\ell_2-\ell|\leq |\ell_1-\ell|$$

This is a very trivial example, but clearly $g(x)$ reaches the $\ell$ limit faster than $f(x)$

Question

Given a generic convergent series:

$$\sum_{k=0}^{\infty}a_k=\ell$$

which converges to its limit "slowly".

Is it possible to generate a $b_k$ series that converges to the same limit but faster?

Mathematically speaking

If $$\sum_{k=0}^{\infty}a_k=\ell$$ and I calculate (for example) $$\sum_{k=0}^{N}a_k=\ell_1$$ where $N=1000$, it is possible to generate a sequence $b_k$ such that: $$\sum_{k=0}^{N}b_k=\ell_2$$

Where $|\ell_2-\ell|\leq |\ell_1-\ell|$?


Edit:

An example of a series that converges very slowly is:

$$\sum_{n=0}^{\infty}\frac{\left(-1\right)^{n}}{\frac{1}{2}+n}\cdot\ln\left(n+1\right)\approx -0.23117606098678711$$

I calculated that value with Wolfram, but normally I use a calculator which obviously doesn't reach infinity, but I give it the extremes of the calculation. So my input is something like:

$$\sum_{n=0}^{N}\frac{\left(-1\right)^{n}}{\frac{1}{2}+n}\cdot\ln\left(n+1\right)$$

It reaches:
$1$ decimal correct digits for $N=69^{*}$
$2$ decimal correct digits for $N=3\,471^{**}$
$3$ decimal correct digits for $N=29\,199$
$4$ decimal correct digits for $N=260\, 456$
$5$ decimal correct digits for $N=1\,830\,414$
$6$ decimal correct digits for $N=154\,593\,396$

*The first time it appears is with $N=22$, but being a series of alternating signs with $N=24$ we no longer have the correct figure, so I sign the numbers from which the digits continues to be constantly correct
**The first time it appears is with $N=329$

1

There are 1 best solutions below

2
On

Probably too advanced but made for your curiosity.

One thing that you could do is to write $(a=\frac 12)$ $$\frac{\left(-1\right)^{n}}{n+1-a}\,\log\left(n+1\right)=\sum_{k=0}^\infty 2^{-k}\, (-1)^n \,\frac{\log (n+1)}{(n+1)^{k+1} }$$ and use $$S_k=2^{-k}\, \sum_{n=0}^\infty (-1)^n \, \frac{\log (n+1)}{(n+1)^{k+1} }$$ $$S_k=-2^{-2k} \left(\left(2^k-1\right) \zeta '(k+1)+\log (2)\, \zeta (k+1)\right)$$ Now, computing the partial sums $$\Sigma_p=-\frac{1}{2} (2 \gamma -\log (2)) \log (2)+\sum_{k=1}^p S_k$$

$$\Sigma_{28}=-0.23117606098678711$$

The fast convergence is due to the fact that $$0.250 <\frac{S_{k+1}}{S_k} <0.295 \qquad \forall k >0$$ $$0.250 <\frac{S_{k+1}}{S_k} <0.251 \qquad \forall k >10$$

Edit

For the infinite summation, write it as

$$\sum_{n=0}^{\infty}\left(-1\right)^{n}\,\frac{\log\left(n+1\right)}{n+\frac{1}{2}}=\sum_{n=0}^{p}\left(-1\right)^{n}\,\frac{\log\left(n+1\right)}{n+\frac{1}{2}}+\sum_{n=p+1}^{\infty}\left(-1\right)^{n}\,\frac{\log\left(n+1\right)}{n+\frac{1}{2}}$$ and you want to know $p$ such that $$\frac{\log (p+2)}{p+\frac{3}{2}} \leq 10^{-m}$$ The solution is given in terms of Lambert function $$p=-10^m\,\, W_{-1}\left(-e^{-\frac{10^{-m}}{2}} \,10^{-m}\right)-2$$

$$\left( \begin{array}{cc} m &\lceil p_m\rceil\\ 1 & 35 \\ 2 & 646 \\ 3 & 9117 \\ 4 & 116670 \\ 5 & 1416359 \\ 6 & 16626508 \\ 7 & 190660023 \\ 8 & 2148818393 \\ 9 & 23897019584 \\ 10 & 262952388191 \\ \end{array} \right)$$

This explains your numbers.