Equality with Euler–Mascheroni constant

While trying to prove $\int_0^{\infty } \frac{\log (x)}{e^x+1} \, dx = -\frac{1}{2} \log ^2(2)$ How to show? in an alternative way, I came to this solution:

$$\sum_{k=0}^{+\infty}(-1)^{k+1}\frac{\log (k+1)+\gamma }{(k+1)}.$$

As both solutions have to be the same, the following equality should be valid:

$$\sum_{k=0}^{+\infty}(-1)^{k+1}\frac{\log (k+1)+\gamma }{(k+1)}=- \frac{1}{2}{{\log }^2(2)}. $$

Can anyone give me some advice on how to prove this equality.

p.s. You can be sure that the equality is correct, as I checked it numerically.


Solution 1:

Note that $$ \begin{align} \sum_{k=1}^\infty(-1)^k\frac{\log(k)+\gamma}{k} &=\lim_{n\to\infty}\left(2\sum_{k=1}^{n}\frac{\log(2k)+\gamma}{2k}-\sum_{k=1}^{2n}\frac{\log(k)+\gamma}{k}\right)\\ &=\lim_{n\to\infty}\left(\sum_{k=1}^{n}\frac{\log(2)+\log(k)+\gamma}{k}-\sum_{k=1}^{2n}\frac{\log(k)+\gamma}{k}\right)\tag{1} \end{align} $$ Using the Euler-Maclaurin Sum Formula, we get that $$ \sum_{k=1}^n\frac{1}{k}=\log(n)+\gamma+\frac{1}{2n}-\frac{1}{12n^2}+O\left(\frac{1}{n^4}\right)\tag{2} $$ and that $$ \sum_{k=1}^n\frac{\log(k)}{k}=\frac12\log(n)^2+C+\frac{\log(n)}{2n}-\frac{\log(n)-1}{12n^2}+O\left(\frac{\log(n)}{n^4}\right)\tag{3} $$ Applying $(2)$ and $(3)$ to $(1)$, leaving out the terms which vanish, we get $$ \begin{align} &\sum_{k=1}^\infty(-1)^k\frac{\log(k)+\gamma}{k}\\ &=\small{\lim_{n\to\infty}\left(\log(2)(\log(n){+}\gamma)+\left(\frac12\log(n)^2+C+\gamma(\log(n){+}\gamma)\right)-\left(\frac12\log(2n)^2+C+\gamma(\log(2n){+}\gamma)\right)\right)}\\ &=\lim_{n\to\infty}\left(\log(2)(\log(n)+\gamma)-\log(2)\log(n)-\frac12\log(2)^2-\gamma\log(2)\right)\\ &=-\frac12\log(2)^2\tag{4} \end{align} $$

Solution 2:

This can be solved similarly to the original problem. The Dirichlet eta function is defined by $$ \eta(s):=\sum_{n\ge 1} \frac{(-1)^{n-1}}{n^s}. $$ The given sum can be rewritten as $$ \sum_{n\ge 1} (-1)^n \frac{\log n}{n}+\sum_{n\ge 1} (-1)^n \frac{\gamma}{n}= \eta'(1)-\gamma \log 2.\qquad (*)$$ We have $$ \eta(s)=\sum_{n\ge 1} \frac{1}{n^s}-2\sum_{n\ge 1} \frac{1}{(2n)^s}=(1-2^{1-s})\zeta(s) $$ so, using the expansions $$\zeta(s)=\frac{1}{s-1}+\gamma+O(s-1),$$ $$ 2^{1-s}=e^{(1-s)\log 2}=1-(s-1)\log 2+\frac{1}{2}(\log 2)^2 (s-1)^2+O((s-1)^3), $$ we get $\eta'(1)=\gamma \log 2 -\frac{1}{2}(\log 2)^2$, so (*) equals $-\frac{1}{2}(\log 2)^2$.