18

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}$$

Did
  • 271,033
  • 27
  • 280
  • 538
Zaid Alyafeai
  • 13,825
  • 2
  • 36
  • 84

3 Answers3

19

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.

M.N.C.E.
  • 10,169
  • 2
  • 35
  • 67
  • 1
    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 01 '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 01 '17 at 12:22
  • @Sangchul Lee Thanks for your confirmation! – M.N.C.E. Jan 01 '17 at 12:25
  • @ZaidAlyafeai, That is too bad since I see nothing wrong with your question. I upvoted your question. I am also writing down my real-analysis solution. I hope this also improves this situation. – Sangchul Lee Jan 01 '17 at 12:25
  • 1
    @M.N.C.E. I edited my question to indicate the answer given by SangchulLee. – Zaid Alyafeai Jan 01 '17 at 12:29
  • @SangchulLee, I hope you explain in more details what went wrong in numeric solution of the integral in your coming answer. Or you can add a separate answer for that. – Zaid Alyafeai Jan 01 '17 at 12:37
  • 2
    @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 01 '17 at 12:40
  • I have a question, the contour will pass through the pole at $i/2$ ? – Zaid Alyafeai Jan 01 '17 at 12:57
  • @ZaidAlyafeai Yes it will. The contribution from that pole is $\pi i$ multiplied by the residue at $z=i/2$. – M.N.C.E. Jan 01 '17 at 13:00
  • To be more precise the segment of the contour connecting $i$ to $0$ is actually the limit of $$\color{red}{[i,\tfrac{i}{2}+i\epsilon]}\cup \tfrac{i}{2}+\epsilon e^{i[\pi/2, -\pi/2]}\cup \color{red}{[\tfrac{i}{2}-i\epsilon,0]}$$ As $\epsilon\to 0$ the red parts contribute the principal-value integral while the middle one contributes as $\pi i \times \text{residue at } i/2$. – M.N.C.E. Jan 01 '17 at 13:07
  • @M.N.C.E. Yeah I forgot about that theorem. – Zaid Alyafeai Jan 01 '17 at 13:39
  • 2
    (+1) Wonderful solution. A little remark: the blue integral can be computed from Binet's second log-Gamma formula, too. – Jack D'Aurizio Jan 01 '17 at 18:26
12

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) \, du + 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 $$ f(x)= \frac{1}{(1+x)^{s}} , \quad \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 treated 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}. $$

But using Binet's second formula for the log gamma function, we have $$ \begin{align} 2 \int_{0}^{\infty} \frac{\arctan x}{e^{2 \pi x}+1} \, dx &= 2 \int_{0}^{\infty} \frac{\arctan x}{e^{2 \pi x}-1} \, dx - 4 \int_{0}^{\infty} \frac{\arctan x}{e^{4 \pi x}-1} \, dx \\ &=2 \int_{0}^{\infty} \frac{\arctan x}{e^{2 \pi x}-1} \, dx -2 \int_{0}^{\infty} \frac{\arctan \left(\frac{u}{2}\right)}{e^{2 \pi u}-1} \, du \\ &= 1- \frac{\log (2 \pi)}{2} + \frac{3}{2} \log 2 -2 + \frac{\log(2 \pi)}{2} \\ &= \frac{3 \log 2}{2} -1 .\end{align}$$

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}$$

Random Variable
  • 35,296
  • 3
  • 99
  • 179
  • 1
    Very nice, this is what i had in mind (+1) – tired Jan 02 '17 at 09:12
  • 2
    @tired Thanks for the upvote. – Random Variable Jan 02 '17 at 14:39
  • Hey RV , I should've thought of that. – Zaid Alyafeai Jan 02 '17 at 14:55
  • In the post I recently “answered”, where you left the link to this answer, I struggled with that arctangent integral greatly. I knew it was very close to the Binet formula but I couldn’t apply it; I’m reading your answer now, and I don’t understand your decomposition of the $e^{2\pi x}+1$ into $e^{2\pi x}-1,e^{4\pi x}-1$. What’s the presumably simple substitution in missing? – FShrike Dec 13 '21 at 09:18
  • 1
    @FShrike $$\begin{align} \frac{2}{e^{2 \pi x}-1} - \frac{4}{e^{4 \pi x}-1} &= \frac{2}{e^{2 \pi x}-1}- \frac{4}{(e^{2 \pi x}-1)(e^{2 \pi x}+1)} \\ &= \frac{2 e^{2 \pi x}-2}{(e^{2 \pi x}-1)(e^{2 \pi x}+1)} \\ &= \frac{2}{e^{2 \pi x}+1} \end{align}$$ – Random Variable Dec 13 '21 at 10:05
10

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*}

Sangchul Lee
  • 141,630
  • 16
  • 242
  • 385