Evaluating $\int_0^{\infty} \frac{\tan^{-1} x}{x(1+x^2)} dx$ The question is to evaluate $$\int_0^{\infty} \frac{\tan^{-1} x}{x(1+x^2)} dx$$
I used the substitution $x=\tan a$ then the given integral becomes $\int_0^{\pi/2} \frac{\tan^{-1}(\tan a)}{\tan a} da$
Now $\tan^{-1} (\tan a)=a \forall a \in [0,\pi /2]$ so that the integrand becomes $a/ \tan a$.i am facing trouble evaluating this.i tried using $a \to \pi/2 -a$ but couldn't simplify.Any ideas?

Proceeding by your method:
$\int_0^{\pi/2}\cfrac{a}{\tan(a)}da=\int_0^{\pi/2}a \tan(a)da$ [Now use Integration by Parts]
$= [a\log(\sin(a))]_0^{\pi/2} - \int_0^{\pi/2}\log\sin(a)da$
$= 0 - \int_0^{\pi/2}\log\sin(a)da$
$= \cfrac{\pi\ln(2)}{2}$
