# Evaluate $\int_0^\infty\frac{\ln x}{1+x^2}dx$

Evaluate $$\int_0^\infty\frac{\ln x}{1+x^2}\ dx$$
I don't know where to start with this so either the full evaluation or any hints or pushes in the right direction would be appreciated. Thanks.

• Check this. – Mhenni Benghorbal Aug 26 '14 at 19:20
• @ Tunk-Fey A question formulated like this lacks context and it shows no own effort. According to the rules of this forum it should have been closed instead of being edited by the moderation. – Dr. Wolfgang Hintze May 12 '20 at 11:28

Hint

Write $$\int_0^\infty\frac{\ln x}{(1+x^2)}dx=\int_0^1\frac{\ln x}{(1+x^2)}dx+\int_1^\infty\frac{\ln x}{(1+x^2)}dx$$ For the second integral make a change of variable $x=\frac{1}{y}$ and see the beauty of the result.

I am sure that you can take from here.

• This is true elegance, sir! – orion May 25 '14 at 11:36
• woops!! I almost forgot this method (+1) – Santosh Linkha May 25 '14 at 11:38
• @orion. I really appreciate your comment ! What I learnt is that simple is beautiful and vice-versa. And don't forget how old I am ! Cheers. – Claude Leibovici May 25 '14 at 11:41
• @SantoshLinkha. Nice but don't you think that, by the end, we are doing exactly the same thing ? I should enjoy a discussion with you on this topic. Cheers. – Claude Leibovici May 25 '14 at 11:46
• @ClaudeLeibovici I suddenly feel sportive and decided to add another method. By the way, I saw this problem first on Integration Bee on MIT. – Santosh Linkha May 25 '14 at 11:48

In general $$\mathcal{I}(\alpha)=\int_0^\infty\frac{\ln x}{x^2+\alpha^2}\ dx$$ can be evaluated by using substitution $u=\dfrac{\alpha^2}{x}\;\Rightarrow\;x=\dfrac{\alpha^2}{u}\;\Rightarrow\;dx=-\dfrac{\alpha^2}{u^2}\ du$, then \begin{align} \mathcal{I}(\alpha)&=\int_0^\infty\frac{\ln \left(\dfrac{\alpha^2}{u}\right)}{\left(\dfrac{\alpha^2}{u}\right)^2+\alpha^2}\cdot \dfrac{\alpha^2}{u^2}\ du\\ &=\int_0^\infty\frac{2\ln \alpha-\ln u}{\alpha^2+u^2}\ du\\ &=2\ln \alpha\int_0^\infty\frac{1}{\alpha^2+u^2}\ du-\int_0^\infty\frac{\ln u}{u^2+\alpha^2}\ du\\ &=2\ln \alpha\int_0^\infty\frac{1}{\alpha^2+u^2}\ du-\mathcal{I}(\alpha)\\ \mathcal{I}(\alpha)&=\ln \alpha\int_0^\infty\frac{1}{\alpha^2+u^2}\ du. \end{align} The last integral can easily be evaluated since it is a common integral. Using substitution $u=\tan\theta$, the integral turns out to be \begin{align} \mathcal{I}(\alpha)&=\frac{\ln \alpha}{\alpha}\int_0^{\Large\frac\pi2} \ d\theta\\ &=\large\color{blue}{\frac{\pi\ln \alpha}{2\alpha}}. \end{align} Thus $$\mathcal{I}(1)=\int_0^\infty\frac{\ln x}{x^2+1}\ dx=\large\color{blue}{0}.$$

• +1 for generalizing the result, and for your nice typesetting skills :) – David H May 25 '14 at 13:02
• @DavidH Thanks... :) – Tunk-Fey May 25 '14 at 13:08
• @Tunk-Fey. This is very elegant. Thanks for this nice answer. – Claude Leibovici May 25 '14 at 13:14
• @ClaudeLeibovici Thanks Sir. Yours is also elegant... :) – Tunk-Fey May 25 '14 at 13:19
• An easier substitution would have been $x \mapsto au$, with the same points as above =) – N3buchadnezzar Mar 27 '17 at 14:03

Here is one appraoch!!

changing $x = \tan \theta$ $$\int_{0}^{\pi/2} \frac{\log(\tan\theta)}{\sec^2 \theta} \sec^2 \theta d\theta = \int_0^{\pi/2} \log (\sin \theta) d\theta - \int_{0}^{\pi/2} \log (\cos \theta) d\theta$$

By changing $\theta \to \pi/2 - \theta$ on the latter integrand, we get $$\int_0^{\pi/2} \log (\sin \theta) d\theta - \int_{0}^{\pi/2} \log (\cos (\pi/2-\theta)) d\theta = \int_0^{\pi/2} \log (\sin \theta) d\theta - \int_{0}^{\pi/2} \log (\sin \theta) d\theta = 0$$

Here's another general result, consider for $|a|\le 1$:

\begin{align*} I(a,b) &= \int_{0}^{\infty} \, \frac{x^a}{b^2+x^2}\, dx \\ &= \frac{b^{a-1}}{2} \int_{0}^{\infty} \, \frac{t^{(a-1)/2}}{1+t}\, dt \tag{1}\\ &= \frac{b^{a-1}}{2}\, \mathrm{B}\left(\frac{1+a}{2},\frac{1-a}{2}\right) \tag 2\\ &= \frac{b^{a-1}}{2}\, \frac{\pi}{\displaystyle \cos{\left(\frac{\pi}{2}a\right)}} \tag 3 \end{align*} $(1)$ is by subst. $\displaystyle x=b\sqrt{t}$

$(2)$ is by the definition of Beta function: $\displaystyle \mathrm{B}(a,b)=\int_{0}^{\infty} \, \frac{x^{a-1}}{(1+x)^{a+b}} \, dx$

$(3)$ is by using $\displaystyle \mathrm{B}(a,b)=\frac{\Gamma{(a)}\Gamma{(b)}}{\Gamma{(a+b)}}$ and Euler's reflection formula $\displaystyle \Gamma{(a)}\Gamma{(1-a)}=\frac{\pi}{\sin{\displaystyle \left({\pi}\, a\right)}}$

Hence,

\begin{align*} \int_{0}^{\infty} \, \frac{x^a \left(\log{x}\right)^n}{b^2+x^2}\, dx &= \frac{\partial^{n} }{\partial a^n} \left(\frac{b^{a-1}}{2}\, \frac{\pi}{\cos{\displaystyle \left(\frac{\pi}{2}a\right)}}\right) \end{align*} and when $b=1, n=1, a= 0$, the result is $0$

Update:

An even better result:

\begin{align*} \int_{0}^{\infty} \, \frac{x^a \left(\log{x}\right)^n}{b^c+x^c}\, dx &= \frac{\partial^{n} }{\partial a^n} \left(\frac{b^{a+1-c}}{c}\, \frac{\pi}{\sin{\displaystyle \left(\frac{1+a}{c}\pi\right)}}\right) \end{align*} where $\displaystyle 0<\frac{1+a}{c}<1$

• How did you get the value of the integral after "hence"? Where $\log^n$ was added – ClassicStyle Jul 13 '14 at 4:39
• @TylerHG : By differentiating $I(a,b)$ with respect to $a$ $n$ times. – gar Jul 13 '14 at 6:30


$$\imp\ \color{#66f}{\Large I} + \color{#66f}{\Large I}=0\ \imp\ \color{#66f}{\Large I\equiv\int_{0}^{\infty}{\ln\pars{x} \over 1 + x^{2}}\,\dd x =\color{#c00000}{0}}$$

Here's another very short solution.

The substitution $$x \to e^t$$ transforms the integral to

$$\int_{-\infty}^{\infty} \frac{t}{e^t+e^{-t}}\,dt$$

which is zero by the anti-symmetry of the integrand.

• I think the only reason this answer has less upvotes is because it was late to the game... this is very slick!!!! – coreyman317 Mar 31 '19 at 20:36
• @ coreyman317 Thanks for your remark. The voting scheme sometimes produces peculiar results, so it should not be takes too seriously. – Dr. Wolfgang Hintze Apr 2 '19 at 9:25

Another general approach :

Consider $$\int_0^\infty\frac{x^{b-1}}{a^2+x^2}\ dx.\tag1$$ Rewrite $(1)$ as \begin{align} \int_0^\infty\frac{x^{b-1}}{a^2+x^2}\ dx&=\frac1{a^2}\int_0^\infty\frac{x^{b-1}}{1+\left(\frac{x}{a}\right)^2}\ dx.\tag2 \end{align} Putting $x=ay\;\color{blue}{\Rightarrow}\;dx=a\ dy$ yields \begin{align} \int_0^\infty\frac{x^{b-1}}{a^2+x^2}\ dx&=a^{b-2}\int_0^\infty\frac{y^{b-1}}{1+y^2}\ dy, \end{align} where \begin{align} \int_0^\infty\frac{y^{b-1}}{1+y^2}\ dy=\frac{\pi}{2\sin\left(\frac{b\pi}{2}\right)}. \end{align} Hence \begin{align} \int_0^\infty\frac{x^{b-1}}{a^2+x^2}\ dx&=\frac\pi2\cdot\frac{a^{b-2}}{\sin\left(\frac{b\pi}{2}\right)}.\tag3 \end{align} Differentiating $(3)$ with respect to $b$ and setting $b=1$ yields \begin{align} \int_0^\infty\frac{\partial}{\partial b}\left[\frac{x^{b-1}}{a^2+x^2}\right]_{b=1}\ dx&=\frac\pi2\frac{\partial}{\partial b}\left[\frac{a^{b-2}}{\sin\left(\frac{b\pi}{2}\right)}\right]_{b=1}\\ \int_0^\infty\frac{\ln x}{x^2+a^2}\ dx&=\large\color{blue}{\frac{\pi\ln a}{2a}}. \end{align} Thus $$\int_0^\infty\frac{\ln x}{x^2+1}\ dx=\large\color{blue}{0}.$$

• Nice, is there a close form of $I=\int_0^1\dfrac{\ln x}{x^2+1}dx=-\int_1^{+\infty}\dfrac{\ln x}{x^2+1}dx$ ? – user50618 Jul 29 '14 at 12:32
• I have just tried Mathematica and it gave: $\int_0^1 \frac{\ln x}{1+x^2} \, dx=-catalan$, it is a constant defined on wikpedia:en.wikipedia.org/wiki/Catalan's_constant – user50618 Jul 29 '14 at 12:59