<s>[INST] Integral $\int_0^\infty \frac{\arctan(x) }{x(1+x^2)}\,dx$? How would one evaluate the integral $$\int_0^\infty \frac{\arctan(x) }{x(1+x^2)}\,dx$$?
I was told it had a nice closed form and could have been solved with differentiation under the integral sign; however, I tried to set $$I(\alpha) = \int_0^\infty \frac{\arctan(\alpha x)}{x(1+x^2)}~dx$$ and got nowhere (the resulting integral was very messy). Is there a much more clever substitution that can be used to tackle the integral?
 [/INST] Note
$$\int_0^\infty \frac{\arctan(x) }{x(1+x^2)}\,dx=\frac12\int_0^\infty \frac1x d\arctan^2(x)=\frac12\int_0^\infty \frac{\arctan^2(x)}{x^2} \,dx.$$
Now define
$$ I(a,b)=\int_0^\infty \frac{\arctan(ax)\arctan(bx)}{x^2} \,dx $$
and then
\begin{eqnarray}
\frac{\partial^2I(a,b)}{\partial a\partial b}&=&\int_0^\infty \frac{1}{(1+a^2x^2)(1+b^2x^2)} \,dx\\
&=&\frac{1}{a^2-b^2}\int_0^\infty\bigg(\frac{a^2}{1+a^2x^2}-\frac{b^2}{1+b^2x^2}\bigg)\;dx\\
&=&\frac{\pi}{2(a+b)}.
\end{eqnarray}
So
$$ \int_0^\infty \frac{\arctan(x) }{x(1+x^2)}\,dx=\frac12\int_0^\infty \frac{\arctan^2(x)}{x^2} \,dx=\frac\pi4\int_0^1\int_0^1\frac{1}{a+b}=\frac{\pi}{2}\ln2. $$
</s>