# Integral $\int_0^\infty \frac{\ln x}{(\pi^2+\ln^2 x)(1+x)^2} \frac{dx}{\sqrt x}$

I have stumbled upon the following integral:$$I=\int_0^\infty \frac{\ln x}{(\pi^2+\ln^2 x)(1+x)^2} \frac{dx}{\sqrt x}=-\frac{\pi}{24}$$ Although I could solve it, I am not quite comfortable with the way I did it.

But first I will show the way. We can substitute $$\ln x \rightarrow t\$$ which gives: $$I=\int_{-\infty}^\infty \frac{t}{\pi^2+t^2}\frac{e^{\frac{t}{2}}}{(1+e^t)^2}dt\overset{t=-x}=\int_{-\infty}^\infty \frac{-x}{\pi^2+x^2}\frac{e^{-\frac{x}{2}}}{(1+e^{-x})^2}dx$$ Also adding the two integral from above and simplify some of it yields: $$2I= \int_{-\infty}^\infty \frac{x}{\pi^2+x^2}\left(\frac{e^{\frac{x}{2}}}{(1+e^x)^2}-\frac{e^{-\frac{x}{2}}}{(1+e^{-x})^2}\right)dx$$ $$\Rightarrow I=-\frac{1}{4} \int_{-\infty}^\infty \frac{x}{\pi^2+x^2}\frac{\sinh \left(\frac{x}{2}\right)}{\cosh ^2\left(\frac{x}{2}\right)}dx$$ And now a round of IBP gives: $$I=\frac12 \int_{-\infty}^\infty \left(\frac{x^2-\pi^2}{(x^2+\pi^2)^2}\right)\left(\frac{1}{\cosh \left(\frac{x}{2}\right)}\right)dx$$ Using the Plancherel theorem the integral simplifies to: $$I=\int_0^\infty \left(\sqrt{\frac{\pi}{2}}x\left(-e^{-\pi x}\right)\right)\left(\sqrt{2\pi}\frac{1}{\cosh(\pi x)}\right)dx\overset{\pi x\rightarrow x}=-\frac{1}{\pi}\int_0^\infty \frac{x}{\cosh( x)}e^{- x}dx$$ We also have the following Laplace tranform for:$$f(t)=\frac{t}{\cosh( t)}\rightarrow F(s)=\frac18\left(\psi_1\left(\frac{s+1}{4}\right)-\psi_1\left(\frac{s+3}{4}\right)\right)$$ Where $$\displaystyle{\psi_1(z)=\sum_{n=0}^\infty \frac{1}{(z+n)^2}}\,$$ is the trigamma function. $$\Rightarrow I=-\frac{1}{\pi}F(s=1)=-\frac{1}{\pi}\cdot \frac18\left(\psi_1\left(\frac{1}{2}\right)-\psi_1 (1)\right)=-\frac{1}{\pi}\cdot \frac18\left(\frac{\pi^2}{2}-\frac{\pi^2}{6}\right)=-\frac{\pi}{24}$$ Have I done anything wrong, or can it be improved? I have to admit that I mostly used wolfram when applying Plancherel theorem and Laplace transform which I'm not comfortable with, but I didn't find an alternative method myself.

For this question I would like to see a different proof that doesn't rely on that theorem.

Probably not needed, but I should mention that my contour integration knowledge is pretty low. Also maybe there is a conexion with this integral, but I didn't find any.

From the identity

$$\Im\int_0^\infty e^{-(\pi-it)x}\,dx=\frac t{\pi^2+t^2}$$

we see that it suffices to compute the imaginary part of the integral

$$\int_0^\infty dx\int_{-\infty}^\infty dt\; \frac{e^{\alpha t}}{(1+e^t)^2}e^{-\pi x}$$

where $$\alpha=1/2+ix$$. Now, the integral with respect to $$t$$ is easy by means of the substitution $$u=e^t$$ and using the beta function. We thus get

$$\int_0^\infty \pi\left(\frac12-ix\right)\frac{e^{-\pi x}}{\cosh(\pi x)}\,dx.$$

Taking the imaginary part we see that the problem boils down to compute the integral

$$\int_0^\infty \frac{x e^{-\pi x}}{\cosh(\pi x)}\,dx =2\int_0^\infty \frac{x}{1+e^{2\pi x}}\,dx$$

which, after the substitution $$v=2\pi x$$, reduces to the integral representation of the eta function $$\eta(2)$$. Also notice that taking the real part we obtain the evaluation

$$\int_0^\infty\frac1{(\pi^2+\log^2 x)(1+x)^2} \frac{dx}{\sqrt x}= \frac{\log2}{2\pi}.$$

This method generalises to other integrals such as

\begin{align*} \int_0^\infty \frac{1}{(\pi^2+\ln^2 x)(1+x)^3} \frac{dx}{\sqrt x} &=\frac{3\log (2)}{8 \pi }-\frac{3 \zeta (3)}{16 \pi ^3}\\ \int_0^\infty \frac{\ln x}{(\pi^2+\ln^2 x)(1+x)^3} \frac{dx}{\sqrt x} &=-\frac{\pi }{24}\\ \int_0^\infty \frac{1}{(\pi^2+\ln^2 x)(1+x)^4} \frac{dx}{\sqrt x} &=\frac{5 \log (2)}{16 \pi }-\frac{9 \zeta (3)}{32 \pi ^3}\\ \int_0^\infty \frac{\ln x}{(\pi^2+\ln^2 x)(1+x)^4} \frac{dx}{\sqrt x} &=-\frac{223 \pi }{5760}\\ \int_0^\infty \frac{1}{(\pi^2+\ln^2 x)(1+x)^5} \frac{dx}{\sqrt x} &=-\frac{43 \zeta (3)}{128 \pi ^3}+\frac{15 \zeta (5)}{256 \pi ^5}+\frac{35 \log (2)}{128 \pi }\\ \int_0^\infty \frac{\ln x}{(\pi^2+\ln^2 x)(1+x)^5} \frac{dx}{\sqrt x} &=-\frac{103 \pi }{2880}\\ \end{align*}

Incidentally, since the integrals $$\int_0^\infty \frac{\ln x}{(\pi^2+\ln^2 x)(1+x)^k} \frac{dx}{\sqrt x}$$ both yield the same value for $$k=2,3$$, we also deduce

$$\int_0^\infty \frac{\sqrt x\ln x}{(\pi^2+\ln^2 x)(1+x)^3}\;dx=0.$$

This, however, should not be surprising due to the symmetry $$x\mapsto1/x$$.

• At first sight this looks quite impressive! Give me some time to try to understand it better. – Zacky Jan 1 at 19:13
• Thanks! I hope you enjoy completing the steps, but tell me if you need more details. – diech Jan 1 at 19:18
• This is very beautiful. But I get here: $$\int_0^\infty \pi\left(\frac12\color{red}+ix\right)\frac{e^{-\pi x}}{\cosh(\pi x)}\,dx.$$ Am I wrong? – Zacky Jan 1 at 22:50
• @Zacky Are you sure? I've checked my calculations and I am still getting $-ix$. In any case, your integral is negative, so the imaginary part should also be negative, shouldn't it? – diech Jan 2 at 9:34
• Well, I have $$\int_{-\infty}^\infty \frac{e^{at}}{(1+e^t)^2}dt\overset{t=\ln u}=\int_0^\infty \frac{u^{a-1}}{(1+u)^2}du=B(a,2-a)=a\Gamma(a)\Gamma(1-a)$$And since $a=\frac12\color{red}+ix$ and by the reflection formula it gives that. – Zacky Jan 2 at 11:30

That $$\pi^2+\log^2(x)$$ makes me think to the integral representation for Gregory coefficients:

$$\int_{0}^{+\infty}\frac{dx}{(1+x)^n (\pi^2+\log^2 x)} = \frac{1}{n!}\left[\frac{d^n}{dx^n}\frac{z}{\log(1-z)}\right]_{z=0}=[z^n]\frac{z}{\log(1-z)} \tag{1}$$ which can be seen as a consequence of the Lagrange-Buhrmann inversion theorem. We just need to insert a factor $$\frac{\log x}{\sqrt{x}}$$ in the integrand function appearing in the LHS, so let's go back to the residue theorem.

$$\int_{0}^{+\infty}\frac{\log(x)\,dx}{\sqrt{x}(1+x)^2(\pi^2+\log^2 x)}=\int_{-\infty}^{+\infty}\frac{t e^{-t/2}}{(2\cosh\frac{t}{2})^2 (\pi^2+t^2)}\,dt$$ equals $$-\frac{1}{4}\int_{\mathbb{R}}\frac{t\sinh\frac{t}{2}}{(t^2+\pi^2)\cosh^2\frac{t}{2}}\,dt=-\int_{\mathbb{R}}\frac{t\sinh t}{(4t^2+\pi^2)\cosh^2 t}\,dt.$$ The meromorphic function $$\frac{\sinh t}{\cosh^2 t}=-\frac{d}{dt}\left(\frac{1}{\cosh t}\right)$$ only has double poles with residue zero, hence all the mass of the last integral comes from the singularity at $$\frac{\pi i}{2}$$ and from the behaviour at infinity. The residue theorem grants $$\frac{1}{\cosh x}=\sum_{n\geq 0}(-1)^n \frac{\pi(2n+1)}{\frac{\pi^2}{4}(2n+1)^2+x^2}$$ and $$\frac{\sinh x}{\cosh^2 x} = \sum_{n\geq 0}(-1)^n \frac{2\pi(2n+1)x}{(\frac{\pi^2}{4}(2n+1)^2+x^2)^2}.$$ Since $$\int_{\mathbb{R}}\frac{2\pi(2n+1)x^2}{(\frac{\pi^2}{4}(2n+1)^2+x^2)^2 (\pi^2+4x^2)}\,dx = \frac{1}{2\pi(n+1)^2}$$ our integral equals $$-\frac{1}{2\pi}\eta(2)=\color{red}{-\frac{\pi}{24}}$$ by the dominated convergence theorem, allowing to switch $$\int_{\mathbb{R}}$$ and $$\sum_{n\geq 0}$$. $$\frac{1}{24}$$ is also the coefficient of $$z^3$$ in $$\frac{z}{\log(1-z)}$$, but so far I have not found a direct way to relate the original integral to the $$n=3$$ instance of $$(1)$$.

• Thank you for the answer, I thought too that it can be related to the Gregory coefficients, also I should mention that I learnt about the Plancherel theorem from your answer here:math.stackexchange.com/a/2891545/515527 – Zacky Jan 1 at 19:24
• @Zachary: this is Herglotz trick for $\frac{1}{\cosh}$, followed by termwise differentiation. We have $\frac{1}{\cosh z} = \sum_{\xi} \frac{R_{\xi}}{z-\xi}$ where $\xi$ are the (simple) zeroes of $\cosh$ and $R_\xi$ is the residue at $z=\xi$ of $\frac{1}{\cosh}$. – Jack D'Aurizio Jan 1 at 19:50
• @Zachary: the trick to get my representation is to couple the contribution provided by the poles at $(2n+1)\frac{\pi i}{2}$ for $n=N\in\mathbb{N}$ and $n=-(N+1)$.This cancels the imaginary part and leaves a series on $n\geq 0$. – Jack D'Aurizio Jan 2 at 0:51
• @Zachary: that's my fault, I wrote wrong constants, now fixing. – Jack D'Aurizio Jan 2 at 6:36
• Alright. Can I just say that the coupling of poles method is genius. Before doing that, I had an absolute mess of an infinite series, but thanks to your suggestion I managed to nicely simplify the sum. I really appreciate your answers here and I learn a lot from them. I especially enjoyed this one: math.stackexchange.com/questions/2529614/… :) Now, I'm always ready to use the Laplace "Integration by parts" methods. – Zachary Jan 2 at 7:53

This is not a full answer, but one does not need the full Laplace transform of $$x/\cosh x$$, as the integral can be done by expanding $$1/\cosh x$$ into a geometric series

\begin{aligned} I = \int_{0}^{\infty}\frac{xe^{-x}}{\cosh x}\,\mathrm{d}x &= 2\int_{0}^{\infty}\frac{xe^{-x}}{e^{x}}\frac{\mathrm{d}x}{1+e^{-2x}} = 2\sum_{n=0}^{\infty}(-1)^{n}\int_{0}^{\infty}xe^{-(2+2n)x}\,\mathrm{d}x \\ &= 2\sum_{n=0}^{\infty}\frac{(-1)^{n}}{4(1+n)^{2}}\int_{0}^{\infty}ue^{-u}\,\mathrm{d}u = \frac{1}{2}\sum_{n=0}^{\infty}\frac{(-1)^{n}}{(1+n)^{2}} \\ &= \frac{1}{2}\sum_{n=1}^{\infty}\frac{(-1)^{n-1}}{n^{2}} = \frac{\eta(2)}{2} = \frac{\pi^{2}}{24}\end{aligned}

where $$\eta(s)$$ is the Dirichlet eta function.