Solve this integral:$\int_0^\infty\frac{\arctan x}{x(x^2+1)}\mathrm dx$

I just want to seek ways that have nothing to do with $\ln (\sin x)$.

Hint. You may consider $$ I(a):=\int_0^\infty\frac{\arctan (ax)}{x(x^2+1)}\:\mathrm dx,\quad 0<a<1, \tag1 $$ and obtain $$ I'(a)=\int_0^\infty\frac1{(x^2+1)(a^2x^2+1)}\:\mathrm dx. $$ By using partial fraction decomposition, we have $$ \frac1{(x^2+1)(a^2x^2+1)}=\frac1{\left(1-a^2\right) \left(x^2+1\right)}-\frac{a^2}{\left(1-a^2\right) \left(a^2 x^2+1\right)} $$ giving $$ \begin{align} I'(a)&=\frac1{\left(1-a^2\right)}\int_0^\infty\!\frac1{x^2+1}\:\mathrm dx-\frac{a^2}{\left(1-a^2\right)}\int_0^\infty\frac1{a^2x^2+1}\:\mathrm dx\\\\ &=\frac1{\left(1-a^2\right)}[\arctan x]_0^\infty-\frac{a^2}{\left(1-a^2\right)}\left[\frac{\arctan (ax)}a\right]_0^\infty\\\\ &=\frac1{\left(1-a^2\right)}\frac{\pi}2-\frac{a}{\left(1-a^2\right)}\frac{\pi}2\\\\ &=\frac{\pi}2\frac1{1+a} \tag2 \end{align} $$ Since $I(0)=0$, by integrating $(2)$, you easily get

$$ \int_0^\infty\frac{\arctan (ax)}{x(x^2+1)}\:\mathrm dx=\frac{\pi}2\: \ln (a+1), \qquad 0\leq a <1, $$

from which, by letting $a \to 1^-$, you deduce

$$ \int_0^\infty\frac{\arctan x}{x(x^2+1)}\:\mathrm dx=\frac{\pi}2 \ln 2 $$

as announced.


Before providing my solution, I'd must admit that Oliver Oloa provides the way to calculate this integral. I merely provide a different approach, using Fourier transforms.

First a comment. I tried to use a symmetry argument saying that $$ \int_0^{+\infty}f(x+1/x)\arctan x\frac{dx}{x} =\frac{\pi}{4}\int_0^{+\infty} f(x+1/x)\frac{dx}{x}, $$ but I was not able to put this integral into that form. Now to the solution:

Since the integrand is even, our integral equals $$ \frac{1}{2}\int_{-\infty}^{+\infty}\frac{\arctan x}{x(1+x^2)}\,dx. $$ We need to know the Fourier transforms $$ \mathcal F\Bigl[\frac{1}{1+x^2}\Bigr](\xi)=\sqrt{\frac{\pi}{2}}e^{-|\xi|}\quad\text{and}\quad \mathcal F\Bigl[\frac{\arctan x}{x}\Bigr](\xi)=\sqrt{\frac{\pi}{2}}\int_{|\xi|}^{+\infty}\frac{e^{-t}}{t}\,dt. $$ By Parseval's formula, $$ \int_0^{+\infty}\frac{\arctan x}{x(1+x^2)}\,dx= \frac{1}{2}\sqrt{\frac{\pi}{2}}\sqrt{\frac{\pi}{2}} \int_{-\infty}^{+\infty} e^{-|\xi|}\int_{|\xi|}^{+\infty} \frac{e^{-t}}{t}\,dt\,d\xi. $$ The integrand is even in $\xi$, so we get $$ \frac{\pi}{2}\int_0^{+\infty}e^{-\xi}\int_{\xi}^{+\infty}\frac{e^{-t}}{t}\,dt\,d\xi. $$ Changing the order of integrations, and calculating the inner one, we get $$ \frac{\pi}{2}\int_0^{+\infty}\frac{e^{-t}}{t}\int_0^t e^{-\xi}\,d\xi \,dt= \frac{\pi}{2}\int_0^{+\infty}\frac{e^{-t}}{t}(1-e^{-t})\,dt $$ Now, the last integral is a Frullani integral that equals $\log 2$, so we finally get that $$ \int_0^{+\infty}\frac{\arctan x}{x(1+x^2)}\,dx=\frac{\pi}{2}\log 2. $$


Another chance is given by the following representation associated with the cotangent function $$ 1-x\cot x=\sum_{n\geq 1}\left(\frac{x}{\pi n-x}-\frac{x}{\pi n+x}\right)\tag{1} $$ that comes from applying $\frac{d}{dx}\log(\cdot)$ to the Weierstrass product for the sine function.
If you integrate both sides of $(1)$ over $\left(0,\frac{\pi}{2}\right)$ the original integral is transformed into a series that is easy to handle through summation by parts and Stirling's inequality. The final outcome is $$ \int_{0}^{\pi/2}\left(1-x\cot x\right)\,dx = \frac{\pi}{2}\left(1-\log 2\right)\tag{2} $$ that is equivalent to the claim. Anyway, there is a well-known symmetry trick for computing $\int_{0}^{\pi/2}\log\sin(x)\,dx$, that probably gives the slickest approach.