9

$$\int_0^\infty \frac{\ln(1-e^{-\pi x})}{1+x^2} dx$$ let $u=e^{-\pi x}$, the integral goes to:

$$\pi \int_0^1 \frac{1}{u}\cdot\frac{\ln(1-u)}{\pi^2+\ln^2(u)}du$$

This looks a little like Gregory's coefficient, but not the same, because the integral is from $0$ to $1$, instead of from $0$ to $\infty$. How to do next?

MathFail
  • 21,128
  • 1
    Alternatively, proceed to use the representation $$\frac{\pi}{\pi^2+\ln^2 (u)}=\int_{0}^{\infty} \cos (\ln (u) x)e^{-\pi x},dx$$ to arrive at $$I=\int_{0}^{\infty}\frac{e^{-\pi x} (1-\pi x \coth (\pi x))}{2x^2},dx = \int_{0}^{\infty} \frac{s}{4}\left(\frac{2(2\pi+s)}{(\pi+s)^2}-\frac{\psi^{(1)} \left(\frac{\pi+s}{2\pi}\right)}{\pi}\right),ds =\frac{\pi}{2}(\ln(2)-1)$$ from integrating by parts, where $\psi^{(1)}$ is the trigamma function. – KStarGamer Jul 12 '22 at 09:20
  • Thank you, but how you did the last step, the trigamma function? @KStarGamer – MathFail Jul 12 '22 at 20:05
  • @MathFail I used the property of the Laplace transform linked, and took $$\mathcal{L}\left[e^{-\pi x} (1-\pi x \coth (\pi x))\right] (s)$$ by writing $\coth (\pi x)$ in exponential form, and thus as a geometric series- I also took $$\mathcal{L}^{-1} \left[\frac{1}{2x^2}\right] (s) = \frac{s}{2}$$ and multiplied both results. – KStarGamer Jul 12 '22 at 20:16
  • Thank you a lot! @KStarGamer – MathFail Jul 12 '22 at 20:23
  • I don't know this trick for swapping the Laplace transform inside the integral. I learn it today, thank you! I am looking forward to your general approach :) @KStarGamer – MathFail Jul 12 '22 at 20:27

6 Answers6

13

Integrating by parts in Binet's second formula yields $$ \log \Gamma (z) = \left( {z - \frac{1}{2}} \right)\!\log z - z + \frac{1}{2}\log (2\pi ) - \frac{1}{{\pi z}}\int_0^{ + \infty } {\frac{{\log (1 - \mathrm{e}^{ - 2\pi t} )}}{{1 + t^2 /z^2 }}\mathrm{d}t} ,\quad \operatorname{Re}(z)>0. $$ Taking $t=x/2$ and $z=1/2$ then gives $$ \log \Gamma\! \left( {\frac{1}{2}} \right) = - \frac{1}{2} + \frac{1}{2}\log (2\pi ) - \frac{1}{\pi }\int_0^{ + \infty } {\frac{{\log (1 - \mathrm{e}^{ - \pi x} )}}{{1 + x^2 }}\mathrm{d}x} , $$ i.e., $$ \int_0^{ + \infty } {\frac{{\log (1 - \mathrm{e}^{ - \pi x} )}}{{1 + x^2 }}\mathrm{d}x} = \frac{\pi }{2}(\log (2) - 1), $$ since $\Gamma(1/2)=\sqrt\pi$.

Gary
  • 31,845
  • 1
    Just out of curiosity : what could it be if we change $\pi$ by $a$ ? – Claude Leibovici Jul 12 '22 at 04:21
  • 1
    @ClaudeLeibovici Take $t=ax/(2\pi)$ and $z=a/(2\pi)$. – Gary Jul 12 '22 at 06:03
  • Great, thank you so much! Do you know how to prove the top line formula? or any references? @Gary – MathFail Jul 12 '22 at 19:31
  • 1
    @MathFail It is usually derived using the Abel–Plana formula. See for example Sections $3.17$ and $3.18$ in the book Special Functions by Z. X. Wang and D. R. Guo. – Gary Jul 13 '22 at 01:47
  • I just try to do this integral by using Abel-Plana formula, and here is my attempt link: https://math.stackexchange.com/questions/4491717/use-abel-plana-formula-to-calculate-an-integral-int-0-infty-frac-arctant But I came across a problem on the divergent limit... Could you take a look of my steps? Thank you! @Gary – MathFail Jul 13 '22 at 01:56
8

A solution using contour integration. For "small" $r>0$, let $D_r$ be the disk $|z|<1$ with "notches of size $r$" around the point $z=1$ and the negative real axis. Formally, say $$D_r=\{z\in\mathbb{C}:r<|z|<1\land|1-z|>r\land(\Re z>0\lor\Im z>r)\}.$$ Its boundary is $\partial D_r=C_r^0\cup C_r^1\cup C_r^+\cup C_r^-\cup L_r^+\cup L_r^-$, where $C_r^0$ and $C_r^1$ are arcs of radius $r$ around $z=0$ and $z=1$, $C_r^+$ and $C_r^-$ are arcs of $|z|=1$ in the upper/lower half-plane, and finally $L_r^+$ and $L_r^-$ are line segments. Then $\int_{\partial D_r}f(z)\,dz=0$, where $f(z)=\frac{\log(1+z)}{z\log z}$ with the principal values taken. But (using the "half-residue" trick for $C_r^1$) \begin{align*} \lim_{r\to 0}&\int_{C_r^0}f(z)\,dz=0,\\ \lim_{r\to 0}&\int_{C_r^1}f(z)\,dz=-i\pi\operatorname*{Res}_{z=1}f(z)=-i\pi\log2,\\ \lim_{r\to 0}&\int_{C_r^+\cup C_r^-}f(z)\,dz=\int_0^\pi\frac{\log(1+e^{it})-\log(1+e^{-it})}{t}dt=i\pi,\\ \lim_{r\to 0}&\int_{L_r^+\cup L_r^-}f(z)\,dz=\int_0^1\frac{\log(1-t)}{t}\left(\frac1{\log t-i\pi}-\frac1{\log t+i\pi}\right)dt=2iI \end{align*} where $I=\pi\int_0^1\frac{\log(1-t)}{\pi^2+\log^2 t}\frac{dt}{t}$ is the given integral (as in the OP). Hence $I=\frac\pi2(\log2-1)$.

metamorphy
  • 39,111
6

Similar to the evaluation of $\int_{0}^{\infty} \operatorname{Li}_{2}(e^{-\pi x}) \arctan(x) \, \mathrm dx$ here, we have $$ \begin{align} \int_{0}^{\infty} \frac{\ln(1-e^{-\pi x})}{1+x^{2}} \, \mathrm dx &= -\int_{0}^{\infty} \frac{1}{1+x^{2}} \sum_{n=1}^{\infty} \frac{e^{- \pi n x}}{n} \, \mathrm dx\\ &= -\sum_{n=1}^{\infty} \frac{1}{n} \int_{0}^{\infty} \frac{e^{- \pi n x}}{1+x^{2}} \, \mathrm dx \\ &= - \sum_{n=1}^{\infty} \frac{1}{n} \left( \left(\frac{\pi}{2} - \operatorname{Si}(\pi n) \right) \cos(\pi n) + \operatorname{Ci}(\pi n ) \sin(\pi n ) \right) \\ &= \frac{\pi}{2}\sum_{n=1}^{\infty} \frac{(-1)^{n+1}}{n} + \sum_{n=1}^{\infty} (-1)^{n} \frac{\operatorname{Si}(\pi n)}{n} \\ &= \frac{\pi}{2} \ln(2) + \sum_{n=1}^{\infty} (-1)^{n} \frac{\operatorname{Si}(\pi n)}{n}, \end{align}$$

where $\operatorname{Si}(z)$ is the sine integral and $\operatorname{Ci}(z)$ is the cosine integral.

To show that $$\sum_{n=1}^{\infty} (-1)^{n} \frac{\operatorname{Si}(\pi n)}{n} = - \frac{\pi}{2}, $$ we can integrate the meromorphic function $$f(z) = \frac{\pi \csc(\pi z) \operatorname{Si}(\pi z)}{z}$$ around a rectangular contour with vertices at $z= \pm \left(N+ \frac{1}{2} \right) \pm i\left(N+ \frac{1}{2} \right),$ where $N$ is a positive integer.

Using the asymptotic expansion of $\operatorname{Si}(z)$, we have $$ \small f(z) \sim \frac{\pi \csc(\pi z) \left(\frac{\pi}{2}+ \cos(\pi z) \, O \left(\frac{1}{z} \right) + \sin(\pi z) \, O \left(\frac{1}{z^{2}} \right) \right) }{z} = \frac{\pi^{2} \csc(\pi z)}{2z} + \cot(\pi z) \, O \left(\frac{1}{z^{2}} \right) + O \left(\frac{1}{z^{3}} \right)$$ as $|z| \to \infty$ in the sector $|\arg(z) | \le \pi - \delta, \ \delta >0$.

It might seem that the first term of the asymptotic expansion would prevent the integral from vanishing as $N \to \infty$, but it actually doesn't. See the answers to this question.

So we have $$ \begin{align} 0 &= 2 \pi i \sum_{n=-\infty}^{\infty}\operatorname{Res}[f(z), n] \\ &= 2 \pi i \left( \sum_{n=-\infty}^{-1} (-1)^{n} \frac{\operatorname{Si}(\pi n)}{n} + \pi + \sum_{n=1}^{\infty} (-1)^{n} \frac{\operatorname{Si}(\pi n)}{n} \right) \\ &= 2 \pi i \left(2 \sum_{n=1}^{\infty} (-1)^{n} \frac{\operatorname{Si}(\pi n)}{n} + \pi \right), \end{align}$$ and the result follows.

  • This really nice, I also did this way but fail to show the series on the Sinc integral equals -pi/2. I have a question on your asymptotic expansion step. Why the asymptotic expansion of Sinc integral gives that result? – MathFail Jul 12 '22 at 19:56
  • @MathFail I just noticed that an approach using Watson's lemma is mentioned on the DLMF webpage I linked to above. Hover over the "i". – Random Variable Jul 12 '22 at 21:47
  • I have a question here, when you do the integral by part, if integrate along the real axis, then the term $\frac{\cos(t)}{t}|_x^\infty$ vanishes at infinity. But for the complex case, the numerator $\cos(t)$ diverges at $t=(N+1/2)+(N+1/2)i\rightarrow \infty+i\infty$. Is that still allowed to use this asymptotic expansion? – MathFail Jul 12 '22 at 22:47
  • @MathFail True. I tried to get around that by restricting $x$ to positive real values values and then using the identity theorem to extend the result to large complex values of $x$ that don't fall on the negative real axis. But now I'm not confident that you can do that. In any case, the DLMF website states how to use Watson's lemma to show that the expansion is valid for large complex values of $x$. – Random Variable Jul 12 '22 at 23:30
  • If we can calculate this series $\sum \frac{(-1)^n}{n}\text{Si}(n\pi)$ without using complex? Surely this series can be connected to the Binet's second formula, but I mean a more direct way to evaluate it, and without complex... – MathFail Jul 12 '22 at 23:37
6

Utilize $\tan^{-1}x=\int_0^\infty \frac{e^{-y}}{y} \sin xy \ dy$ and $\int_{0}^{\infty}{\sin xy \over e^{\pi x} - 1}dx = \frac12\coth y -\frac1{2y}$ below

\begin{align} \int_0^\infty \frac{\ln(1-e^{-\pi x})}{1+x^2} dx \overset{ibp}=& \pi \int_0^\infty \frac{\tan^{-1}x}{1-e^{\pi x}} dx = \pi \int_0^\infty \int_0^\infty \frac{\sin xy }{1-e^{\pi x}} \frac{e^{-y}}{y} dy\ dx\\ =& \ \frac\pi2\int_0^\infty e^{-y}(1-y\coth y )\ d(\frac1y)\\ \overset{ibp}=& \ \frac\pi2\int_0^\infty \frac{g(y)-g(\frac y2)}y - e^{-y}\ dy =\frac\pi2 \ln2 -\frac\pi2 \end{align} where the Frullani integral for $g(y)=\coth y- y\ \text{csch}^2 y$ is applied.

KStarGamer
  • 5,089
  • 1
  • 18
  • 50
Quanto
  • 97,352
5

Many nice solutions are posted; let's add one more. We will get the general formula (which, in turn, can be easily transformed into Binet's second formula) by means of complex integration.

Let's denote $\,I(a)=\displaystyle \int_0^\infty\frac{\ln(1-e^{-2\pi ax})}{1+x^2}dx$, and $$J(a)=\frac{\partial}{\partial a}I(a)=2\pi\int_0^\infty\frac{x}{1+x^2}\frac{e^{-2\pi ax}}{1-e^{-2\pi ax}}dx=\pi\int_0^\infty(\coth\pi ax-1)\frac{x}{1+x^2}dx$$ Integrating by part, $$J(a)=\frac{\pi^2 a}{2}\int_0^\infty\frac{\ln(1+x^2)}{\sinh^2\pi ax}dx=\frac{\pi^2 }{2}\int_0^\infty\Big(\frac{\ln(a^2+t^2)}{2\sinh^2\pi t}-\frac{\ln a}{\sinh^2\pi t}\Big)dt$$ We introduce $r\ll1$ to make regularization: $$J(a)=\lim_{r\to0}\Big(-\pi^2\ln a\int_r^\infty\frac{dt}{\sinh^2\pi t}+\frac{\pi^2}{2}\int_r^\infty\frac{\ln(a^2+t^2)}{\sinh^2\pi t}dt\Big)\tag 1$$ Evaluation of the first integral gives $$J_{1r}=-\pi^2\ln a\int_r^\infty\frac{dt}{\sinh^2\pi t}=-\frac{\ln a}{r}+\pi\ln a+O(r)\tag 2$$ To evaluate $$J_{2r}=\frac{\pi^2}{2}\int_r^\infty\frac{\ln(a^2+t^2)}{\sinh^2\pi t}dt=\frac{\pi^2}{2}\Re\Big(\int_{-\infty}^{-r}+\int_r^\infty\frac{\ln(a-it)}{\sinh^2\pi t}dt\Big)$$ we use $\,\displaystyle\ln(a-it)=\ln\Gamma\big(a-i(t+i)\big)-\ln\Gamma\big(a-it\big)$ and $\,\displaystyle\sinh^2\pi (t+i)=\sinh^2\pi t$, and consider the integral in the complex plane along the following contour:

enter image description here

There are no poles inside the contour; integrals $[1]$ and $[2]$ tend to zero at $R\to\infty$.

Therefore, $$0=-\frac{\pi^2}{2}\oint\frac{\ln\Gamma(a-iz)}{\sinh^2\pi z}dz$$ $$=\frac{\pi^2}{2}\Big(\int_{-\infty}^{-r}+\int_r^\infty\frac{\ln\Gamma(a-it)}{\sinh^2\pi t}dt\Big)-\frac{\pi^2}{2}\Big(\int_{-\infty}^{-r}+\int_r^\infty\frac{\ln\Gamma(a+1-it)}{\sinh^2\pi t}dt\Big)+I_{C_1}+I_{C_2}$$ Where $I_{C_1}, I_{C_2}$ - integral along small arches around $z=0, z=i$. Taking the real part, $$J_{2r}=-\Re\,(I_{C_1}+I_{C_2})=\frac{\pi^2}{2}\Re\Big(\int_\pi^0\frac{\ln\Gamma(a-ire^{i\phi})}{\sinh^2(\pi re^{i\phi })}ire^{i\phi}d\phi+\int_{2\pi}^\pi\frac{\ln\Gamma(a+1-ire^{i\phi})}{\sinh^2(\pi re^{i\phi})}ire^{i\phi}d\phi\Big)$$ Decomposing $\ln\Gamma(z)$ near $z=a; z=a+1$ $$J_{2r}=\frac{\ln \Gamma(a)-\ln\Gamma(1+a)}{2r}\int_0^\pi (-i)e^{-i\phi}d\phi-\frac{\psi(a)}{2}\int_\pi^0d\phi-\frac{\psi(a+1)}{2}\int_{2\pi}^\pi d\phi+O(r)$$ $$J_{2r}=\frac{\ln a}{r}-\frac{\pi}{2}\big(\psi(a)+\psi(a+1)\big)+O(r)\tag 3$$ Putting $(2)$ and $(3)$ into $(1)$ $$J(a)=\lim_{r\to0}\big(J_{1r}+J_{2r}\big)=\lim_{r\to0}\Big(-\frac{\ln a}{r}+\pi\ln a+\frac{\ln a}{r}-\frac{\pi}{2}\big(\psi(a)+\psi(a+1)\big)+O(r)\Big)$$ $$J(a)=\pi\ln a-\frac{\pi}{2}\big(\psi(a)+\psi(a+1)\big)\tag 4$$ Integrating $(4)$ $$I(a)=\pi(a\ln a-a)-\frac{\pi}{2}\big(\ln\Gamma(a)+\ln\Gamma(a+1)\big)+C\tag 5$$ To identify the constant $C$, we can consider the limit $a\to 0$: $$\int_0^\infty\frac{\ln(1-e^{-2\pi ax})}{1+x^2}dx=\int_0^\infty\frac{\ln(2\pi ax)}{1+x^2}dx+O(a\ln a)=\frac{\pi}{2}\ln(2\pi a)+O(a\ln a)$$ On the other hand, from $(5)$ follows $$I(a)=\frac{\pi}{2}\ln a+C+O(a\ln a)\,\,\Rightarrow\,\,C=\frac{\pi}{2}\ln(2\pi)$$ $$\boxed{\,\,I(a)=\int_0^\infty\frac{\ln(1-e^{-2\pi ax})}{1+x^2}dx=\pi\big(a\ln a-a\big)-\pi\ln\Gamma(a+1)+\frac{\pi}{2}\ln(2\pi a)\,\,}$$

Gary
  • 31,845
Svyatoslav
  • 15,657
3

Some related integrals:

In the book "Table of Integrals, Series, and Products" (7th Edition, 2007) by I.S. Gradshteyn and I.M. Ryzhik, I found the following integrals (in Page 568, 4.318 and 4.319):

(1) For $q > 0$, we have $$\int_0^1 \frac{1}{x}\cdot \frac{\ln(1 - x^q)}{1 + \ln^2 x}\,\mathrm{d} x = \pi\left[-\ln \Gamma\left(\frac{q}{2\pi}\right) - \frac{\ln q}{2} + \frac{q}{2\pi}\left(\ln \frac{q}{2\pi} - 1\right) + \ln 2\pi\right].$$

(2) For $a > 0$, it holds that $$\int_0^\infty \frac{\ln(1 - \mathrm{e}^{-2a\pi x})}{1 + x^2}\,\mathrm{d} x = \pi \left[\frac12\ln 2a\pi + a(\ln a - 1) - \ln \Gamma(a + 1)\right].$$

Remark 1: One can prove them using @Gary's formula.

Remark 2: I think there are typos in the formulas (1) and (2) in the book (see picture below). The above formulas are the corrected. Can someone verify the formulas (typos)?

enter image description here

River Li
  • 37,323
  • $4.319.1$ - the overall sign is not correct (should be $,+\pi\Big[\frac{1}{2}\ln2a\pi+...\Big]$). It is easy to see that $4.319.1$ is not correct: the integral is $<0$ for all $a>0$. Leading $a\to 0$, we get $-\pi\ln a+...>0$, what is wrong. Apart from the sign, $4.319.1$ is correct.

    $,,4.319.2$ - it seems the same story takes place. At least, the sign is wrong: at $a=0$ the integral is equal to $\frac{\pi}{2}\ln2$, but 4.319.2 gives $,-\frac{\pi}{2}\ln2$

    – Svyatoslav Jul 12 '22 at 16:02
  • 1
    @Svyatoslav Thanks. – River Li Jul 12 '22 at 22:06