How to find $\sum_{n=0}^{\infty}(-1)^{n}\left(\frac{1}{n+1}-\frac{1}{n+2}+\frac{1}{n+3}-\cdots\right)^{2}$

Solution 1:

You can take that last expression and turn it into an integral that gets you a result that agrees with both Mathematica and the answer linked to (and not really quite explained).

Your last sum may be rewritten as

$$\begin{align}\sum_{n=0}^{\infty} (-1)^n \int_0^{-1} dx \frac{x^n}{1-x} \, \int_0^{-1} dy \frac{y^n}{1-y}&= \int_0^{-1} dx \frac{1}{1-x} \, \int_0^{-1} dy \frac{1}{1-y} \sum_{n=0}^{\infty} (-1)^n x^n y^n \\ &= \int_0^{-1} dx \frac{1}{1-x} \, \int_0^{-1} dy \frac{1}{1-y} \frac{1}{1+x y} \\&= \int_0^{-1} dx \frac{1}{1-x} \, \int_0^{-1} dy \left (\frac{1}{1+x}\frac{1}{1-y}+ \frac{x}{1+x} \frac{1}{1+x y}\right )\\ &= \int_0^{-1} dx \frac{\log{(1-x)}-\log{2}}{1-x^2} \\ &= \frac{\pi^2}{24}\end{align}$$

ADDENDUM

That last integral may be evaluated by substituting $x=1-2 u$ as follows:

$$\begin{align}\int_0^{-1} dx \frac{\log{(1-x)}-\log{2}}{1-x^2} &= -\frac12 \int_{1/2}^1 du \frac{\log{u}}{u-u^2} \\ &= -\frac12 \int_{1/2}^1 du \frac{\log{u}}{u}-\frac12 \int_{1/2}^1 du \frac{\log{u}}{1-u} \\ &= \frac12 \log^2{2} + \frac12 \text{Li}_2\left(\frac12\right) \\ &= \frac12 \log^2{2} + \frac{\pi^2}{24} - \frac12 \log^2{2}\end{align}$$

The result follows.