I want to speed up the convergence of a series involving rational expressions the expression is $$\sum _{x=1}^{\infty }\left( -1\right) ^{x}\dfrac {-x^{2}-2x+1} {x^{4}+2x^{2}+1}$$ If I have not misunderstood anything the error in the infinite sum is at most the absolute value of the last neglected term. The formula for the $n$th term is $\dfrac {-x^{2}-2x+1} {x^{4}+2x^{2}+1}$ from the definition of the series. To get the series I used Maxima the computer algebra system. I have noticed that to get 13 decimal places of the series one must wade through $312958$ terms of the series. I had to kill the computer GUI and some other system processes and run Maxima to compute the sum. I took about 5 minutes. The final sum I obtained was $0.3106137076850$. Is there any way to speed up the convergence of the sum? In general is there any way to speed up the convergence of the sum of $$\sum _{x=1}^{\infty }\left( -1\right) ^{x}\dfrac {p(x)} {q(x)}$$
where both ${p(x)}$ and ${q(x)}$ are rational functions?
There are several methods to speed up the summation of series. For example Euler summation or the Shanks transformation. Here is a simple method that works quite well. Let $$f(n)=\frac{n^2+2n-1}{n^4+2n^2+1}$$ and $$g(n)=\tfrac{1}{2}f(2n-1)-f(2n)+\tfrac{1}{2}f(2n+1).$$ Then $$f(1)-f(2)+f(3)-\ldots = \tfrac{1}{2}f(1) +g(1)+g(2)+g(3)+\ldots$$ but the right hand side converges much faster than the left hand side. This is a generic method. For example if you take $$f(n)=\frac{1}{n}$$ then $$g(n)=\frac{1}{(2n-1)\cdot 2n \cdot (2n+1)}$$ and $$\log(2)=1-\frac{1}{2}+\frac{1}{3}-\ldots =\frac{1}{2}+\frac{1}{1\cdot 2\cdot 3} + \frac{1}{3\cdot 4 \cdot 5}+\ldots$$