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.
 A: 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|}}$$
A: Let $\displaystyle I(a) = \int_{0}^{\infty}\frac{\tan^{-1}(ax)}{x.(1+x^2)}dx$
Now Diff. both side w.r.to $a$ , We Get
$\displaystyle \frac{dI(a)}{da} = \int_{0}^{\infty}\frac{1}{(1+a^2x^2).x.(1+x^2)}.x.dx$
$\displaystyle \frac{dI(a)}{da} = \int_{0}^{\infty}\frac{1}{(1+x^2).(1+a^2x^2)}dx$
$\displaystyle \frac{dI(a)}{da} = \frac{1}{(a^2-1)}\int_{0}^{\infty}\left(\frac{a^2}{1+a^2x^2}-\frac{1}{1+x^2}\right)dx$
$\displaystyle \frac{dI(a)}{da}= \frac{a}{(a^2-1)}.\frac{\pi}{2}-\frac{1}{(a^2-1)}.\frac{\pi}{2}$
$\displaystyle \frac{dI(a)}{da} = \frac{\pi}{2}.\frac{1}{a+1}$
Now $\displaystyle \int \frac{dI(a)}{da}da = \frac{\pi}{2}\int\frac{1}{a+1}da$
$\displaystyle I(a) =\frac{\pi}{2}.\ln |a+1|+C$
