Question on definite integral How to compute the following:
$$ \int_{0}^{\infty} \frac{\tan^{-1}(ax)}{x(1+x^2)}dx $$
If you could, please, solve it completely, for, I am afraid, a hint won't do for me.

Set $$\vartheta(a)=\int_{0}^{\infty} \frac{\tan^{-1}(ax)}{x(1+x^2)}dx$$
Differentiate and use partial fractions to integrate. 
Spoiler

 $$\vartheta '(a) = \int_0^\infty  {\frac{1}{{1 + {a^2}{x^2}}}\frac{1}{{1 + {x^2}}}} dx$$

and 

 $$\frac{1}{{1 + {a^2}{x^2}}}\frac{1}{{1 + {x^2}}} = \frac{1}{{1 - {a^2}}}\left( {\frac{1}{{1 + {x^2}}} - \frac{{{a^2}}}{{1 + {a^2}{x^2}}}} \right)$$

Then use that 

 $$\int_0^\infty  {\frac{{dx}}{{1 + {x^2}}}} = \frac{\pi}2$$ 

to obtain 

 $$\vartheta '(a) = \frac{1}{{1 - {a^2}}}\left( {\frac{\pi }{2} - a\frac{\pi }{2}} \right) = \frac{{1 - a}}{{1 - {a^2}}}\frac{\pi }{2} = \frac{\pi }{2}\frac{1}{{1 + a}}$$

And I guess you can take it from there.
ADD Note I missed a detail on the integral $$\int_0^\infty  {\frac{{{a^2}}}{{1 + {a^2}{x^2}}}dx} $$ If $a>0$, we have that $$a\int_0^\infty  {\frac{1}{{1 + {{\left( {ax} \right)}^2}}}d\left( {ax} \right)}  = a\int_0^\infty  {\frac{1}{{1 + {t^2}}}dt}  = \frac{{\pi a}}{2}$$ but if $a<0$ $$a\int_0^\infty  {\frac{1}{{1 + {{\left( {ax} \right)}^2}}}d\left( {ax} \right)}  = a\int_0^{ - \infty } {\frac{1}{{1 + {t^2}}}dt}  =  - \frac{{\pi a}}{2}$$ Thus in any case $$\vartheta'(a)=\frac{1}{{1 - {{\left| a \right|}^2}}}\left( {\frac{\pi }{2} - \left| a \right|\frac{\pi }{2}} \right) = \frac{\pi }{2}\frac{1}{{1 + \left| a \right|}}$$
