Show that $\int_0^\infty \frac{x\log(1+x^2)}{e^{2\pi x}+1}dx=\frac{19}{24} - \frac{23}{24}\log 2 - \frac12\log A$

Any idea on how to prove the following integral

$$\int_{0}^{\infty} {x\log(1+x^2)\over e^{2\pi x}+1}dx =\require{cancel} \cancel{\frac{17}{24} - \frac{23}{24}\log 2 + \frac{1}{2}\log A}={\frac{19}{24} - \frac{23}{24}\log 2 - \frac{1}{2}\log A }$$

Where $A$ is the Glaisher–Kinkelin constant.

We define

$$A= \lim_{n \to \infty}\frac{H(n)}{n^{n^2/2+n/2+1/12}e^{-n^2/4}}$$ Where $$H(n) = \prod^{n}_{k=1} k^k$$

I would start by

$$F(z) = \int^\infty_0 \frac{2xz}{(x^2+z^2)(e^{2\pi x}+1)} \, dx$$

I know that

$$\frac{2t}{e^{2\pi t}-1} =\frac{1}{\pi}-t+\frac{2t^2}{\pi}\sum_{k=1}^\infty\frac{1}{k^2+t^2}$$

But I can't find a similar one for

$$\frac{1}{e^{2\pi t}+1}$$

• Do you know complex function theory with the method of integration by residues ? – Jean Marie Dec 31 '16 at 10:01
• @JeanMarie, Yes. – Zaid Alyafeai Dec 31 '16 at 11:02
• Thus, what is the function $f(z)$ you choose, which contour do you take ? Then its poles are... its residues in these poles are, etc. – Jean Marie Dec 31 '16 at 11:09
• @JeanMarie, not sure what function and contour to choose. – Zaid Alyafeai Dec 31 '16 at 11:24
• @ZaidAlyafeai: If Claude Leibovici's comment is correct, it seems that you also have to change a sign in your post (in front of $\frac 1 2 \ln A$). – Alex M. Dec 31 '16 at 11:26

Contour Integration

Integrate $\frac{z\log{z}}{e^{2\pi z}+1}$ along a rectangular contour with a quarter-circle indent around $0$ and with vertices $0$, $R$, $R+i$ and $i$. Taking limits, one can check that the contributions from the line segment $[R,R+i]$ and the indent tend to zero. By the Residue Theorem, $$\operatorname{Re}\pi i \operatorname*{Res}_{z=\frac{i}{2}}\frac{z\log{z}}{e^{2\pi i z}+1}=\operatorname{Re}\left\{\int^\infty_0\frac{x\log{x}-(x+i)\log(x+i)}{e^{2\pi x}+1}\ dx+PV\int^1_0\frac{y\log(iy)e^{-\pi iy}}{2\cos(\pi y)}dy\right\}$$ Simplifying this, \begin{align} -\frac{\log{2}}{4} &=\color{red}{\int^\infty_0\frac{x\log{x}}{e^{2\pi x}+1}\ dx}-\frac{1}{2}\int^\infty_0\frac{x\log(1+x^2)}{e^{2\pi x}+1}\ dx+\color{blue}{\int^\infty_0\frac{\arctan\left(\frac{1}{x}\right)}{e^{2\pi x}+1}\ dx}\\ &\ \ \ \ \ +\color{green}{\frac{1}{2}\int^1_0x\log{x}\ dx}+\color{purple}{\frac{\pi}{4}PV\int^1_0x\tan(\pi x)\ dx} \end{align} Let us evaluate these integrals individually.

The Red Integral

We have \begin{align} \int^\infty_0\frac{x\log{x}}{e^{2\pi x}+1}\ dx &=\int^\infty_0\frac{x\log{x}}{e^{2\pi x}-1}\ dx-2\int^\infty_0\frac{x\log{x}}{e^{4\pi x}-1}\ dx\\ &=\frac{1}{4}\int^\infty_0\frac{x\log\left(\frac{x}{2}\right)}{e^{\pi x}-1}\ dx-\frac{1}{8}\int^\infty_0\frac{x\log\left(\frac{x}{4}\right)}{e^{\pi x}-1}\ dx\\ &=\frac{1}{8}\int^\infty_0\frac{x\log{x}}{e^{\pi x}-1}\ dx\\ &=\frac{1}{8}\left.\frac{d}{ds}\int^\infty_0\frac{x^{s-1}}{e^{\pi x}-1}\ dx\right|_{s=2}\\ &=\frac{1}{8}\left.\frac{d}{ds}\sum^\infty_{n=0}\int^\infty_0 x^{s-1}e^{-\pi(n+1)x}\ dx\right|_{s=2}\\ &=\frac{1}{8}\left.\frac{d}{ds}\sum^\infty_{n=0}\frac{\Gamma(s)}{\pi^{s}(n+1)^{s}}\right|_{s=2}\\ &=\frac{1}{8}\left.\frac{d}{ds}\pi^{-s}\Gamma(s)\zeta(s)\right|_{s=2}\\ &=\left.\frac{d}{ds}\frac{2^{s-4}\zeta(1-s)}{\cos\left(\frac{\pi s}{2}\right)}\right|_{s=2}\\ &=\left.\frac{2^{s-4}\left[-\zeta'(1-s)+\zeta(1-s)\left(\log{2}+\frac{\pi}{2}\tan\left(\frac{\pi s}{2}\right)\right)\right]}{\cos\left(\frac{\pi s}{2}\right)}\right|_{s=2}\\ &=\color{red}{\frac{\zeta'(-1)}{4}+\frac{\log{2}}{48}} \end{align}

The Blue Integral

Integrate $\frac{\log{z}}{e^{2\pi z}+1}$ along the same contour as we did for the integral in question. This yields $$\operatorname{Im}\pi i \operatorname*{Res}_{z=\frac{i}{2}}\frac{\log{z}}{e^{2\pi z}+1}=\operatorname{Im}\left\{\int^\infty_0\frac{\log{x}-\log(x+i)}{e^{2\pi x}+1}\ dx-i\ PV\int^1_0\frac{\log(iy)e^{-\pi iy}}{2\cos(\pi y)}dy\right\}$$ Simplifying, \begin{align} \int^\infty_0\frac{\arctan\left(\frac1x\right)}{e^{2\pi x}+1}\ dx &=-\frac{\log 2}{2}-\frac{1}{2}\int^1_0\log x\ dx-\frac{\pi}{4}PV\int^1_0\tan(\pi x)\ dx\\ &=-\frac{\log 2}{2}-\frac{1}{2}\left[x\log{x}-x\right]^1_0-\frac{\pi}{4}(0)\\ &=\color{blue}{-\frac{\log 2}{2}+\frac{1}{2}} \end{align}

The Green Integral

This is elementary. Integrate by parts once to get $$\frac{1}{2}\int^1_0x\log{x}\ dx=\frac{1}{2}\left[\frac{x^2}{2}\log{x}-\frac{x^2}{4}\right]^1_0=\color{green}{-\frac{1}{8}}$$

The Purple Integral

Splitting the limits of integration, \begin{align} \frac{\pi}{4}PV\int^1_0x\tan(\pi x)\ dx &=\frac{\pi}{4}\lim_{\epsilon\to0}\left[\left(\int^{\frac{1}{2}-\epsilon}_0+\int^1_{\frac{1}{2}+\epsilon}\right)x\tan(\pi x)\ dx\right]\\ &=\frac{\pi}{4}\lim_{\epsilon\to0}\left[\int^{\frac{1}{2}-\epsilon}_0x\tan(\pi x)\ dx-\int^{\frac{1}{2}-\epsilon}_0(1-x)\tan(\pi x)\ dx\right]\\ &=\frac{\pi}{4}\int^\frac{1}{2}_0(2x-1)\tan(\pi x)\ dx\\ &=\frac{1}{2}\int^\frac{1}{2}_0\ln(\cos(\pi x))\ dx\\ &=\color{purple}{-\frac{\log{2}}{4}} \end{align} where the last step follows from a classic result.

The Final Result

Therefore, we conclude that \begin{align} \int^\infty_0\frac{x\log(1+x^2)}{e^{2\pi x}+1}\ dx &=2\left(\frac{\log{2}}{4}+\color{red}{\frac{\zeta'(-1)}{4}+\frac{\log 2}{48}}\color{blue}{-\frac{\log{2}}{2}+\frac12}\color{green}{-\frac{1}{8}}\color{purple}{-\frac{\log{2}}{4}}\right)\\ &=\frac{\zeta'(-1)}{2}-\frac{23}{24}\log{2}+\frac{3}{4}\approx0.00302338011316028053\cdots \end{align}

$\textbf{Note:}$ As pointed out by @Sangchul Lee, there was originally a discrepancy between the value in my answer and that provided in the question due to a computational fault in WolframAlpha / Mathematica. The value given in the question has now been corrected.

• Your answer equals $\frac{19}{24} - \frac{23}{24}\log 2 - \frac{1}{2}\log A$, which also matched the numerical result up to 100 digits using Mathematica 11. Since Mathematica 11 shares the same symbolic computation issue you pointed out, I will going to report this error. I guess that this is a sign mistake since the erroneous answer given by Mathematica is exactly the same as $$\frac{17}{24} - \frac{23}{24}\log 2 + \frac{1}{2}\log A = \text{[correct answer]} - \zeta'(-1).$$ – Sangchul Lee Jan 1 '17 at 12:14
• @SangchulLee, I initially put the answer you suggested in the question but I got 3 downvotes and 4 reports to close the question because someone (who deleted his comment by now) said it was wrong. Then I had to change the result to that of W|A. – Zaid Alyafeai Jan 1 '17 at 12:22
• @M.N.C.E. I edited my question to indicate the answer given by SangchulLee. – Zaid Alyafeai Jan 1 '17 at 12:29
• @ZaidAlyafeai, I have no idea why the symbolic computation failed in Mathematica (which presumably uses the same kernel as in WolframAlpha). Probably the programmers in Wolfram Research know the reason. My guess is that they made a sign mistake when they punched the integral table into the software. At least numerical computation matches M.N.C.E.'s answer. – Sangchul Lee Jan 1 '17 at 12:40
• (+1) Wonderful solution. A little remark: the blue integral can be computed from Binet's second log-Gamma formula, too. – Jack D'Aurizio Jan 1 '17 at 18:26

The following approach uses the Abel-Plana formula, which was mentioned in a comment by the user tired.

By applying the Abel-Plana formula to $f(\frac{x}{2})$ and then subtracting the result from the Abel-Plana formula applied to $f(x)$, we get \begin{align} &\sum_{n=0}^{\infty} f(n) - \sum_{n=0}^{\infty} f \left(\frac{n}{2} \right) \\ &= \int_{0}^{\infty} f(x) \, dx - \int_{0}^{\infty} f \left(\frac{x}{2} \right) \, dx + i \int_{0}^{\infty} \frac{f(ix) - f(-ix)}{e^{2 \pi x}-1} \, dx - i \int_{0}^{\infty} \frac{f\left(i \frac{x}{2}\right) - f\left(-i\frac{x}{2}\right)}{e^{2 \pi x}-1} \, dx \\ &= \int_{0}^{\infty} f(x) \, dx - 2 \int_{0}^{\infty} f(u) \, dx + i \int_{0}^{\infty} \frac{f(ix) - f(-ix)}{e^{2 \pi x}-1} \, dx - 2 i \int_{0}^{\infty} \frac{f(iu) - f(-iu)}{e^{4 \pi u}-1} \, du \\ &= -\int_{0}^{\infty} f(x) \, dx + i \int_{0}^{\infty} \frac{f(ix) - f(-ix)}{e^{2 \pi x}+1} \, dx. \end{align}

Let's apply the above formula to the function $\displaystyle f(x)= \frac{1}{(1+x)^{s}} , \ \text{Re}(s) >1.$

Doing so, we get $$\sum_{n=0}^{\infty} \frac{1}{(1+n)^{s}} - 2^{s} \sum_{n=0}^{\infty}\frac{1}{(2+n)^{s}} = \frac{1}{1-s} + 2 \int_{0}^{\infty} \frac{\sin \left(s \arctan x \right)}{(1+x^{2})^{s/2}(e^{2 \pi x}+1)} \, dx,$$ which implies that

$$2 \int_{0}^{\infty} \frac{\sin \left(s \arctan x \right)}{(1+x^{2})^{s/2}(e^{2 \pi x}+1)} \, dx = (1-2^{s}) \zeta(s) + 2^{s} + \frac{1}{s-1}. \tag{1}$$

By analytic continuation, $(1)$ should hold for all complex values of $s$. (For $s=1$, the right side of the equation should be interpreted as a limit.)

Now if we differentiate under the integral sign and then let $s=-1$, we get

$$\int_{0}^{\infty} \frac{x \log(1+x^{2})}{e^{2 \pi x}+1} \, dx + 2 \int_{0}^{\infty} \frac{\arctan x}{e^{2 \pi x}+1} \, dx = - \frac{\log 2}{2} \underbrace{\zeta(-1)}_{- \frac{1}{12}}+\frac{\zeta'(-1)}{2} + \frac{\log 2}{2}-\frac{1}{4}.$$

By applying Binet's second formula for the log gamma function to the parameter $2s$ and then subtracting the result from Binet's second formula applied to the parameter $s$, one can quickly show that $$2 \int_{0}^{\infty} \frac{\arctan x}{e^{2 \pi x}+1} \, dx = \frac{3 \log 2}{2}-1.$$

Therefore, \begin{align}\int_{0}^{\infty} \frac{x \log(1+x^{2})}{e^{2 \pi x}+1} \, dx &= \frac{\log 2}{24} + \frac{\zeta'(-1)}{2} + \frac{\log 2}{2} - \frac{1}{4} + 1 - \frac{3 \log 2}{2} \\ &= \frac{\zeta'(-1)}{2} - \frac{23}{24} \log 2 + \frac{3}{4}. \end{align}

• Very nice, this is what i had in mind (+1) – tired Jan 2 '17 at 9:12
• @tired Thanks for the upvote. – Random Variable Jan 2 '17 at 14:39
• Hey RV , I should've thought of that. – Zaid Alyafeai Jan 2 '17 at 14:55

Here is another method which is a mixture of both real-analysis technique and complex-analysis technique (without contour integration). The main idea is similar to my previous answer.

Let $I$ denote the integral and we write

$$I = \sum_{n=1}^{\infty} (-1)^{n-1} \int_{0}^{\infty} x \log(1+x^2) e^{-2\pi n x} \, dx.$$

In order to proceed, we claim the following:

$$\int_{0}^{\infty} x \log(1+x^2)e^{-sx} \, dx = \frac{2}{s^2} - \frac{2}{s} \int_{0}^{\infty} \frac{\sin(st)}{t+1} \, dt + \frac{2}{s^2} \int_{0}^{\infty} \frac{\cos(st)}{t+1} \, dt. \tag{1}$$

We postpone the proof to the end and discuss the consequence of $\text{(1)}$. Substituting $s = 2\pi n$ and plugging back, $I$ can be simplified as

\begin{align*} I &= \sum_{n=1}^{\infty} (-1)^{n-1} \left( \frac{1}{2\pi^2 n^2} - \frac{1}{\pi n} \int_{0}^{\infty} \frac{\sin(2\pi n t)}{t+1} \, dt + \frac{1}{2\pi^2 n^2} \int_{0}^{\infty} \frac{\cos(2\pi n t)}{t+1} \, dt \right) \\ &= \frac{1}{24} - \int_{0}^{\infty} \left( \sum_{n=1}^{\infty} (-1)^{n-1} \frac{\sin(2\pi n t)}{\pi n} \right) \, \frac{dt}{t+1} + \int_{0}^{\infty} \left( \sum_{n=1}^{\infty}(-1)^{n-1} \frac{\cos(2\pi n t)}{2\pi^2 n^2} \right) \, \frac{dt}{t+1} \end{align*}

Then utilizing the Fourier series of the periodic Bernoulli polynomials $\tilde{B}_n$

$$\sum_{n=1}^{\infty} \frac{\sin(2\pi n x)}{\pi n} = -\tilde{B}_1(x), \qquad \sum_{n=1}^{\infty} \frac{\cos(2\pi n x)}{\pi^2 n^2} = \tilde{B}_2(x),$$

it follows that

$$I = \frac{1}{24} - \int_{0}^{\infty} \frac{\tilde{B}_1(t + \frac{1}{2})}{t+1} \, dt - \frac{1}{2}\int_{0}^{\infty} \frac{\tilde{B}_2(t + \frac{1}{2})}{t+1} \, dt.$$

Next, we introduce the following function

$$f(s) = 2^s - (2^s - 1)\zeta(s) + \frac{1}{s-1}.$$

This is an entire function on $\Bbb{C}$ since all the poles are cancelled out. Then we claim that for $\Re(s) > 0$,

\begin{align*} \int_{0}^{\infty} \frac{\tilde{B}_1(t + \frac{1}{2})}{(t+1)^s} \, dt &= \frac{f(s-1)}{s-1}, \tag{2} \\ \int_{0}^{\infty} \frac{\tilde{B}_2(t + \frac{1}{2})}{(t+1)^s} \, dt &= \frac{2f(s-2)}{(s-1)(s-2)} - \frac{1}{12}\frac{1}{s-1}. \tag{3} \end{align*}

We also postpone the proof to the end. Assuming this, we have

\begin{align*} \int_{0}^{\infty} \frac{\tilde{B}_1(t + \frac{1}{2})}{t+1} \, dt &= \lim_{s\to 1} \frac{f(s-1)}{s-1} = \frac{3}{2}\log 2 - 1, \\ \int_{0}^{\infty} \frac{\tilde{B}_2(t + \frac{1}{2})}{t+1} \, dt &= \lim_{s\to 1} \left(\frac{2f(s-2)}{(s-1)(s-2)} - \frac{1}{12}\frac{1}{s-1}\right) = \frac{7}{12} - \frac{13}{12}\log 2 - \zeta'(-1). \end{align*}

Plugging this back yields the same answer as M.N.C.E.'s:

$$I = \frac{3}{4} - \frac{23}{24}\log 2 + \frac{1}{2}\zeta'(-1).$$

• Proof of $\text{(1)}$. By the integration by parts, for $s > 0$ we have

\begin{align*} \int_{0}^{\infty} x \log(1+x^2)e^{-sx} \, dx &= \int_{0}^{\infty} \frac{2x(sx+1)}{s^2(x^2+1)} e^{-sx} \, dx \\ &= \int_{0}^{\infty} \frac{2u(u+1)}{s^2(u^2 + s^2)}e^{-u} \, du \qquad (u = sx) \\ &= \int_{0}^{\infty} \left( \frac{2}{s^2} - \frac{2}{u^2+s^2} + \frac{2u}{s^2(u^2 + s^2)} \right) e^{-u} \, du. \end{align*}

In order to compute the last integral, we notice that

$$\int_{0}^{\infty} \frac{e^{-u}}{u - is} \, du = \int_{0}^{\infty}\int_{0}^{\infty} e^{ist} e^{-ut} e^{-u} \, dt du = \int_{0}^{\infty} \frac{e^{ist}}{t+1} \, dt.$$

In fact, this is more of a heuristics than a rigorous computation, since the Fubini's theorem does not apply directly. One can regularize both sides by replacing $s$ by $s - i\epsilon$ for $\epsilon > 0$, applying Fubini's theorem to prove the corresponding equailty, and then letting $\epsilon \to 0^+$ to establish this. (Alternatively, this can be also thought as a $\frac{\pi}{2}$-rotation of the contour.) Then the claim follows by utilizing this equality. ////

• Proof of $\text{(2)}$ and $\text{(3)}$. We first prove the following identity

$$\int_{0}^{\infty} \frac{1}{(t+1)^s} \, d\tilde{B}_1(t+\tfrac{1}{2}) = f(s), \qquad \Re(s) > 0.$$

By integration by parts, it is not hard to check that the left-hand side defines a holomorphic function for $\Re(s) > 0$. In view of the principle of analytic continuation, it suffices to prove the identity for $\Re(s) > 1$. Then

\begin{align*} \int_{0}^{\infty} \frac{1}{(t+1)^s} \, d\tilde{B}_1(t+\tfrac{1}{2}) &= \int_{0}^{\infty} \frac{1}{(t+1)^s} \, d(t - \lfloor t+\tfrac{1}{2}\rfloor) \\ &= \frac{1}{s-1} - \sum_{k=0}^{\infty} \frac{1}{(k+\frac{3}{2})^s}. \end{align*}

It is easy to check that this coincides with $f(s)$. Now both $\text{(2)}$ and $\text{(3)}$ follows easily. Again, both define holomorphic functions on $\Re(s) > 0$ and the principle of analytic continuation allows us to prove both identities only when $\Re(s)$ is large. Then the claim follows from the following identity:

\begin{align*} \int_{0}^{\infty} \frac{\tilde{B}_n(t + \frac{1}{2})}{(t+1)^s} \, dt &= \frac{B_n(\frac{1}{2})}{s-1} + \frac{1}{s-1} \int_{0}^{\infty} \frac{1}{(t+1)^{s-1}} \, d\tilde{B}_n(t + \tfrac{1}{2}) \tag{$n \geq 1$} \\ &= \frac{B_n(\frac{1}{2})}{s-1} + \frac{n}{s-1} \int_{0}^{\infty} \frac{\tilde{B}_{n-1}(t + \frac{1}{2})}{(t+1)^{s-1}} \, dt \tag{$n \geq 2$} \end{align*}

• Don't tell me you have changed ur username ? – Zaid Alyafeai Jan 5 '17 at 11:41