# Computing $\sum_{n=1}^\infty\frac{(-1)^nH_n^2}{2n+1}$ in an alternative way

The following equality

$$\sum_{n=1}^\infty(-1)^{n-1}\frac{H_n^2}{2n+1}=\frac{3}{16}\pi^3-\frac34\ln^2(2)\pi-8\Im\left\{\text{Li}_3\left(\frac{1+i}{2}\right)\right\}$$

can be proved if we are allowed to use the generating function ( see Eq$$(3)$$)

$$\sum_{n=1}^\infty x^nH_n^2=\frac{\ln^2(1-x)+\text{Li}_2(x)}{1-x}$$

But the problem-proposer mentioned that the sum to be calculated without using this generating function.

I have no clue how to approach it with such restriction. any idea ? Thanks in advance.

• I think that derivatives of binomial cofficients might be useful here because on differentiation they yields harmonic series with increasing powers along with some other terms but that will be lengty as we have to derivate gamma function (in both numerator and denomintar) atleast three times.In the following image third derivative might be useful here. i.sstatic.net/6B84j.jpg Commented Aug 23, 2020 at 21:32
• @Paras nice idea. Commented Aug 25, 2020 at 16:00
• Your sum is equal to $\displaystyle 4\int_0^1 \int_0^1 \frac{\arctan(xy)-\arctan(x)y-\arctan(y)x+\frac{\pi xy}{4}}{(1-x^2)(1-y^2)}dxdy$
– FDP
Commented Aug 25, 2021 at 21:35

$$\displaystyle\sum_{n=1}^{+\infty}\frac{(-1)^n\ H_n^2}{(2n+1)}$$
Solution:
I'm used:
$$\displaystyle\pmb{\sum^{+\infty}_{n=1}\mathrm{H_n^2}(-1)^{n}x^n=\frac{\mathrm{Li_2(-x)}}{1+x}+\frac{\mathrm{ln}^2(1+x)}{1+x}}$$ $$\displaystyle{\int_{0}^{1}}\left(\sum^{+\infty}_{n=1}\mathrm{H_n^2}(-1)^{n}x^{2n}\right){\mathrm{dx}}={\int_{0}^{1}}\left(\frac{\mathrm{Li_2(-x^2)}}{1+x^2}+\frac{\mathrm{ln}^2(1+x^2)}{1+x^2}\right){\mathrm{dx}}\xrightarrow{\textbf{then}}\sum^{+\infty}_{n=1}\frac{\mathrm{H_n^2}(-1)^{n}}{2n+1}=\underbrace{\int_{0}^{1}\frac{\mathrm{Li_2(-x^2)}}{1+x^2}\mathrm{dx}}_{\pmb{I_1}}+\underbrace{\int_{0}^{1}\frac{\mathrm{ln}^2(1+x^2)}{1+x^2}\mathrm{dx}}_{\pmb{I_2}}$$

$$\displaystyle I_1=\int_{0}^{1}\frac{\mathrm{Li_2(-x^2)}}{1+x^2}\mathrm{dx}=\int_{0}^{1}(Li_2(ix)+Li_2(-ix))\left(\frac{1}{1-ix}+\frac{1}{1+ix}\right)\mathrm{dx}\textbf{ ; } xi=u\longrightarrow i\mathrm{d(x)}=\mathrm{d(u)}$$

$$\displaystyle I_1=\frac{1}{i}(2Li_3(1-xi)-2Li_3(1+xi)-2Li_2(1-xi)\cdot ln(1-xi)-Li_2(xi)\cdot ln(1-xi)-Li_2(-xi)\cdot ln(1-xi)$$

$$\displaystyle +Li_2(-xi)\cdot ln(1+xi)+Li_2(xi)\cdot ln(1+xi)+2Li_2(1+xi)\cdot ln(1+xi)-ln(xi)\cdot ln^2(1-xi)+ln(-xi)\cdot ln^2(1+xi))\left.\frac{}{}\right|_0^1$$ $$\displaystyle I_1=\left[\frac{\pi^2}{3}-ln(1+x^2)\cdot ln(x)\right]2\arctan(x) -\pi\arctan^2(x)+\frac{\pi}{4}\cdot ln^2(1+x^2)+2\mathrm{Ti_2}(x)\cdot ln(1+x^2)-4\ \mathrm{Im}(Li_3(1+ix))\left.\frac{}{}\right|_0^1$$

$$\displaystyle \pmb{I_1=\frac{5\pi^3}{48}+\frac{\pi}{4}ln^2(2)+2G\cdot ln(2)-4\ \mathrm{Im}(Li_3(1+i)) }$$

In $$I_2$$: $$\displaystyle\int_{0}^{1}\frac{ln^2(1+x^2)}{1+x^2}\mathrm{dx}=\int_{0}^{\pi/4} ln^2(1+tan^2(x))\ dx=4\int_{0}^{\pi/4} ln^2(cos(x))\ dx=4\int_{\pi/4}^{\pi/2} ln^2(sin(x))\ dx=$$

$$\displaystyle\underbrace{4\int_{\pi/4}^{\pi/2} ln^2(2sin(x))\ dx}_{\pmb{\displaystyle I_{2,1}}}\underbrace{-8ln(2)\int_{\pi/4}^{\pi/2} ln(2sin(x))\ dx}_{\displaystyle\pmb{I_{2,2}}}+\underbrace{4\int_{\pi/4}^{\pi/2}ln^2(2)\ dx}_{\displaystyle\pmb{I_{2,3}}}$$

$$\displaystyle \pmb{I_{2,1}}=4\int_{\pi/4}^{\pi/2} ln^2(2sin(x))\ dx=4\int_{\pi/4}^{\pi/2} \left(2\left(\sum_{n=1}^{+\infty}\left(\frac{H_{n}}{n}-\frac{1}{n^2}\right)cos(2nx)\right)+\left(\frac{\pi}{2}-x\right)^2\right)\ dx=$$

$$\displaystyle 4\left(\sum_{n=1}^{+\infty}\left(\frac{H_{n}}{n^2}-\frac{1}{n^3}\right)\left((sin(n\pi)-sin\left(\frac{n\pi}{2}\right)\right)-\left.\frac{1}{3}\left(\frac{\pi}{2}-x\right)^3\right|_{\pi/4}^{\pi/2}\right)=-4\sum_{n=1}^{+\infty}\left(\frac{H_{n}}{n^2}-\frac{1}{n^3}\right)sin\left(\frac{n\pi}{2}\right)+\frac{\pi^3}{48}$$ $$\displaystyle -4\ \mathrm{Im}\left(\sum_{n=1}^{+\infty}\left(\frac{H_{n}}{n^2}-\frac{1}{n^3}\right)e^{in\pi/2}\right)+\frac{\pi^3}{48}=$$

$$\displaystyle -4\ \mathrm{Im}\left(-\mathrm{Li_{3}}(1-\mathrm{e^{\pi i/2}})+\mathrm{Li_{2}}(1-\mathrm{e^{\pi i/2}})\cdot\mathrm{\ln}(1-\mathrm{e^{\pi i/2}})+ \frac{1}{2}\mathrm{\ln}(\mathrm{e^{\pi i/2}})\cdot\mathrm{\ln}^2(1-\mathrm{e^{\pi i/2}})+\zeta(3)\right)+\frac{\pi^3}{48}$$ $$\displaystyle -4\ \mathrm{Im}\left(-\mathrm{Li_{3}}(1-i)+\mathrm{Li_{2}}(1-i)\cdot\mathrm{\ln}(1-i)+ \frac{1}{2}\mathrm{\ln}(i)\cdot\mathrm{\ln}^2(1-i)+\zeta(3)\right)+\frac{\pi^3}{48}$$
$$\displaystyle -4\ \mathrm{Im}\left(\mathrm{Li_{3}}(1+i)+\mathrm{Li_{2}}(1-i)\cdot\mathrm{\ln}(1-i)+ \frac{1}{2}\mathrm{\ln}(i)\cdot\mathrm{\ln}^2(1-i)+\zeta(3)\right)+\frac{\pi^3}{48}$$ $$\displaystyle-4\left(\ \mathrm{Im}\left(\mathrm{Li_{3}}(1+i)\right)-\frac{\pi^3}{64}-\frac{ln(2)\mathrm{G}}{2}-\frac{ln^2(2)\pi}{8}+\frac{\pi ln^2(2)}{16}-\frac{\pi^3}{64}\right)+\frac{\pi^3}{48}$$ $$\displaystyle -4\ \mathrm{Im}(\mathrm{Li_3}(1+i))+\frac{7\pi^3}{48}+2ln(2)\mathrm{G}+\frac{\pi ln^2(2)}{4}$$

$$\displaystyle \pmb{I_{2,2}}=-8ln(2)\int_{\pi/4}^{\pi/2} ln(2sin(x))\ dx=-8ln(2)\int_{\pi/4}^{\pi/2}\left(-\sum_{n=1}^{+\infty}\frac{cos(2nx)}{n}\right)dx=$$

$$\displaystyle 8\ln(2)\left(\sum_{n=1}^{+\infty}\frac{\displaystyle\left((sin(n\pi)-sin\left(\frac{n\pi}{2}\right)\right)}{2n^2}\right)=-4ln(2)\mathrm{G}$$

$$\displaystyle \pmb{I_{2,3}}=4\int_{\pi/4}^{\pi/2}ln^2(2)\ dx= \pi\ ln^2(2)$$
$$\displaystyle\pmb{I_2}=-4\ \mathrm{Im}(\mathrm{Li_3}(1+i))+\frac{7\pi^3}{48}+2ln(2)\mathrm{G}+\frac{\pi ln^2(2)}{4}-4ln(2)\mathrm{G}+\pi\ ln^2(2)$$ $$\displaystyle\pmb{I_2=-4\ \mathrm{Im}(\mathrm{Li_3}(1+i))+\frac{7\pi^3}{48}-2ln(2)\mathrm{G}+\frac{5\pi ln^2(2)}{4}}$$

Finally:
$$\displaystyle S=I_1+I_2=\frac{5\pi^3}{48}+\frac{\pi}{4}ln^2(2)+2G\cdot ln(2)-4\ \mathrm{Im}(Li_3(1+i))-4\ \mathrm{Im}(\mathrm{Li_3}(1+i))+\frac{7\pi^3}{48}-2ln(2)\mathrm{G}+\frac{5\pi ln^2(2)}{4}$$ $$\pmb{\displaystyle S=\frac{\pi^3}{4}+\frac{3\pi\ln^2(2)}{2}-8\mathrm{Im(Li_3(}1+i\mathrm{))}}$$

• very nice .. Thanks for the efforts (+1) Commented Aug 25, 2021 at 23:22

Replace $$x$$ by $$-x^2$$ in the generating function: $$\sum_{n=1}^\infty (H_n^2-H_n^{(2)})x^{n}=\frac{\ln^2(1-x)}{1-x}$$

we get

$$\sum_{n=1}^\infty (-1)^n(H_n^2-H_n^{(2)})x^{2n}=\frac{\ln^2(1+x^2)}{1+x^2}.$$ Next, integrate both sides from $$x=0$$ to $$1$$, we have

$$\sum_{n=1}^\infty \frac{(-1)^nH_n^2}{2n+1}-\sum_{n=1}^\infty \frac{(-1)^nH_n^{(2)}}{2n+1}=\int_0^1 \frac{\ln^2(1+x^2)}{1+x^2}\mathrm{d}x=4\int_0^{\pi/4}\ln^2(\cos x)\mathrm{d}x.$$

$$=\frac{7\pi^3}{48}+\frac{5\pi}{4}\ln^2(2)-2\ln(2)G-4\Im\operatorname{Li_3}(1+i),$$ where the latter integral is calculated here .

To get the remaining sum on the left side, we start with the following integral:

$$\begin{gather} \int_0^1\frac{\ln(x)\arctan x}{x(1+x)}\mathrm{d}x=\sum_{n=0}^{\infty}\frac{(-1)^n}{2n+1}\int_0^1\frac{x^{2n}\ln(x)}{1+x}\mathrm{d}x\nonumber\\ =\sum_{n=0}^{\infty}\frac{(-1)^n}{2n+1}\int_0^1\frac{\partial}{\partial{n}}\frac12\frac{x^{2n}}{1+x}\mathrm{d}x\nonumber\\ =\frac12\sum_{n=0}^{\infty}\frac{(-1)^n}{2n+1}\frac{\mathrm{d}}{\mathrm{d}{n}}\int_0^1\frac{x^{2n}}{1+x}\mathrm{d}x\nonumber\\ =\frac12\sum_{n=0}^{\infty}\frac{(-1)^n}{2n+1}\frac{\mathrm{d}}{\mathrm{d}{n}}\left(H_n-H_{2n}+\ln(2)\right)\nonumber\\ =\frac12\sum_{n=0}^{\infty}\frac{(-1)^n}{2n+1}\left(2H_{2n}^{(2)}-H_n^{(2)}-\zeta(2)\right)\nonumber\\ =\sum_{n=0}^{\infty}\frac{(-1)^nH_{2n}^{(2)}}{2n+1}-\frac12\sum_{n=0}^{\infty}\frac{(-1)^nH_{n}^{(2)}}{2n+1}-\frac12\zeta(2)\sum_{n=0}^\infty\frac{(-1)^n}{2n+1}\nonumber\\ =\sum_{n=0}^{\infty}\frac{(-1)^nH_{2n+1}^{(2)}}{2n+1}-\frac12\sum_{n=0}^{\infty}\frac{(-1)^nH_{n}^{(2)}}{2n+1}-\sum_{n=0}^\infty\frac{(-1)^n}{(2n+1)^3}-\frac12\zeta(2)\sum_{n=0}^\infty\frac{(-1)^n}{2n+1}. \end{gather}$$ On the other hand, we have $$\begin{gather} \int_0^1\frac{\ln(x)\arctan x}{x(1+x)}\mathrm{d}x=\int_0^1\frac{\ln(x)\arctan x}{x}\mathrm{d}x-\int_0^1\frac{\ln(x)\arctan x}{1+x}\mathrm{d}x\nonumber\\ =\sum_{n=0}^{\infty}\frac{(-1)^n}{2n+1}\int_0^1x^{2n}\ln(x)\mathrm{d}x-\int_0^1\frac{\ln(x)\arctan x}{1+x}\mathrm{d}x\nonumber\\ =-\sum_{n=0}^{\infty}\frac{(-1)^n}{(2n+1)^3}-\int_0^1\frac{\ln(x)\arctan x}{1+x}\mathrm{d}x . \end{gather}$$ Therefore, $$\sum_{n=0}^{\infty}\frac{(-1)^nH_{n}^{(2)}}{2n+1}=2\sum_{n=0}^{\infty}\frac{(-1)^nH_{2n+1}^{(2)}}{2n+1}-\zeta(2)\sum_{n=0}^\infty\frac{(-1)^n}{2n+1}+2\int_0^1\frac{\ln(x)\arctan x}{1+x}\mathrm{d}x,$$

where $$\sum_{n=0}^{\infty}\frac{(-1)^nH_{2n+1}^{(2)}}{2n+1}=\Im \sum_{n=1}^{\infty}\frac{i^nH_{n}^{(2)}}{n}$$

$$=\Im\{\operatorname{Li}_3(i)+2\operatorname{Li}_3(1-i)-\ln(1-i)\operatorname{Li}_2(1-i)-\zeta(2)\ln(1-i)-2\zeta(3)\}$$

$$=-2\,\mathfrak{J}\operatorname{Li}_3(1+i)+\frac{17\pi^3}{192}+\frac{\pi}{8}\ln^2(2)+\frac12\ln(2)G,$$

$$\sum_{n=0}^\infty\frac{(-1)^n}{2n+1}=\frac{\pi}{4},$$

and the latter integral is calculated here:

$$\int_0^1\frac{\ln(x)\arctan x}{1+x}\mathrm{d}x=\frac12G\ln(2)-\frac{\pi^3}{64}.$$

Collecting all the pieces, we have

$$\sum_{n=0}^\infty\frac{(-1)^nH_{n}^{(2)}}{2n+1}=-4\,\mathfrak{J}\operatorname{Li}_3(1+i)+\frac{5\pi^3}{48}+\frac{\pi}{4}\ln^2(2)+2\ln(2)G.$$

Thus,

$$\sum_{n=0}^\infty \frac{(-1)^nH_n^2}{2n+1}=-8\,\mathfrak{J}\operatorname{Li}_3(1+i)+\frac{\pi^3}{4}+\frac{3\pi}{2}\ln^2(2).$$