How to solve $\int_0^{\infty}\frac{\log^n(x)}{1+x^2}dx$?

As an exercise for myself I constructed the Integral

$$\int_0^{\infty}\frac{\log^n(x)}{1+x^2}dx$$

with $$n\in \mathbb{N}$$. With the help of Mathematica I found the analytical result

$$\int_0^{\infty}\frac{\log^n(x)}{1+x^2}dx=\frac{1+(-1)^n}{4^{n+1}}\Gamma(n+1)\left[\zeta\left(n+1,\frac{1}{4}\right)-\zeta\left(n+1,\frac{3}{4}\right)\right].$$

For $$n=1$$ (and probably $$n\in \mathbb{N}$$) one can employ the methods of complex analysis and find a result. For $$n\in \mathbb{N}$$ I encountered a nasty recursion relation. I can provide details if needed. Is there another way how to solve the integral at hand?

• $\displaystyle \beta(n+1)=\frac{1}{4^{n+1}}\left[\zeta\left(n+1,\frac{1}{4}\right)-\zeta\left(n+1,\frac{3}{4}\right)\right]\enspace$ where $\beta(s)$ is the Dirichlet beta function . – user90369 Nov 23 '18 at 16:32

Referring to this answer, $$I_n=\frac{\pi}2\frac{d^n}{dx^n}\sec\left(\frac{\pi x}2\right)\bigg\vert_{x=0}$$

or equivalently,

$$\int^\infty_0\frac{\log^n(x)}{x^2+1}dx=\left(\frac{\pi}2\right)^{n+1}\sec^{(n)}(0)$$

$$\int^\infty_0\frac{\log^{2n}(x)}{x^2+1}dx=(-1)^nE_{2n}\left( \frac{\pi}2\right)^{2n+1}$$

The integral is zero for odd $$n$$.

• @Schnarco : $E_n$ are called Euler numbers . – user90369 Nov 23 '18 at 11:14
• Thank you both! – Schnarco Nov 23 '18 at 13:04

Let, for $$n$$, a natural integer,

\begin{align}J_n=\int_0^\infty \frac{\ln^n x}{1+x^2}\,dx\end{align}

First, observe that if $$n$$ is odd then $$J_n=0$$ (perform the change of variable $$y=\dfrac{1}{x}$$ )

Consider, for $$n$$, a natural integer,

\begin{align}K_n=\int_0^\infty \int_0^\infty\frac{\ln^n(xy)}{(1+x^2)(1+y^2)}\,dx\,dy\end{align}

Observe that,

\begin{align}K_{2n}&=\sum_{k=0}^{2n}\binom{2n}{k} J_kJ_{2n-k}\\ &=\sum_{k=0}^{n}\binom{2n}{2k} J_{2k}J_{2(n-k)} \end{align}

On the other hand,

Perform the change of variable $$u=xy$$ ($$x$$ variable, $$y$$, a "parameter"),

\begin{align}K_n&=\int_0^\infty \int_0^\infty\frac{y\ln^n u}{(1+y^2)(u^2+y^2)}\,du\,dy\\ &=\frac{1}{2}\int_0^\infty \left[\ln\left(\frac{1+y^2}{u^2+y^2}\right)\right]_{y=0}^{y=\infty}\frac{\ln^{n} u}{u^2-1}\,du\\ &=\int_0^\infty \frac{\ln^{n+1} u}{u^2-1}\,du\\ &=\int_0^1 \frac{\ln^{n+1} u}{u^2-1}\,du+\int_1^\infty \frac{\ln^{n+1} u}{u^2-1}\,du\\ \end{align}

In the second integral perform the change of variable $$v=\dfrac{1}{u}$$,

\begin{align}K_n&=\int_0^1 \frac{\ln^{n+1} u}{u^2-1}\,du+\int_0^1 \frac{\ln^{n+1} u}{u^2-1}\,du\\ &=\int_0^1 \frac{\left(1+(-1)^n\right)\ln^{n+1} u}{u^2-1}\,du\\ &=\left(1+(-1)^n\right)\int_0^1 \frac{\ln^{n+1} u}{u-1}\,du-\left(1+(-1)^n\right)\int_0^1\frac{u\ln^{n+1} u}{u^2-1}\,du\\ \end{align}

In the latter integral perform the change of variable $$y=u^2$$,

\begin{align}K_n&=\left(1+(-1)^n\right)\int_0^1 \frac{\ln^{n+1} u}{u-1}\,du-\frac{1+(-1)^n}{2^{n+2}}\int_0^1 \frac{\ln^{n+1} u}{u-1}\,du\\ &=\left(1+(-1)^n\right)\left(1-\frac{1}{2^{n+2}}\right)\int_0^1 \frac{\ln^{n+1} u}{u-1}\,du\\ &=\left(1+(-1)^n\right)\left(1-\frac{1}{2^{n+2}}\right)(-1)^{n+2}(n+1)!\zeta(n+2) \end{align}

Therefore, one obtains a recursion relation,

\begin{align} \boxed{\sum_{k=0}^{n}\binom{2n}{2k} J_{2k}J_{2(n-k)}=2\left(1-\frac{1}{2^{2n+2}}\right)(2n+1)!\zeta(2n+2)} \end{align}

Observe that,

\begin{align}J_0=\frac{\pi}{2}\end{align}