Find the direct expression of $f(t)$ I am trying to find the direct expression of the function $f(t)$ given by $$f(t)= \int_{1}^\infty \frac{\arctan (tx)}{x^2\sqrt{x^2-1}}dx$$
It's hard for me to calculate the integration directly.Should I try the method of interchanging $\frac{d}{dx}$ with$\int$ or$\int$ with $\int$ ? Thanks for help.
 A: Here is an answer obtained by maple
$$ -\frac{\pi}{2} \, \left( -1-t+\sqrt {1+{t}^{2}} \right) . $$
A: Presumably this was intended to be done with pen and paper, so here is what they might have had in mind. First note that convergence is excellent, so we may differentiate with respect to $t$ to obtain
$$ f'(t) = \int_1^\infty \frac{x}{1+t^2x^2} \frac{1}{x^2\sqrt{x^2-1}} dx.$$
Now let $x^2-1 = u^2$ so that $x\, dx = u\, du$ and
$$ f'(t) = \int_0^\infty \frac{u}{1+t^2(u^2+1)} \frac{1}{(u^2+1)\sqrt{u^2}} du =
\int_0^\infty \frac{1}{1+t^2(u^2+1)} \frac{1}{u^2+1} du.$$
Putting $$ g(u) = \frac{1}{2} \frac{1}{1+t^2(u^2+1)} \frac{1}{u^2+1}
\quad \text{we seek to evaluate} \quad
\int_{-\infty}^\infty g(u) du.$$
This may be done with the Cauchy Residue theorem applied to a half-circle contour in the upper half plane of radius $R$ (the contribution of the circle vanishes in the limit), giving
$$ 2 \pi i 
\left(\operatorname{Res}_{u=i} g(u) + 
\operatorname{Res}_{u=\sqrt{-\frac{1}{t^2}-1}} g(u)  \right).$$
These poles are both simple and we obtain
$$ 2\pi i \left(- \frac{1}{4} i - \frac{1}{4} \frac{1}{\sqrt{-\frac{1}{t^2}-1}}\right) =
\frac{\pi}{2} - i \frac{\pi}{2}\frac{1}{\sqrt{-\frac{1}{t^2}-1}} =
\frac{\pi}{2} - \frac{\pi}{2}\frac{t}{\sqrt{t^2+1}} \quad( t\geqslant 0)$$
Integrating we have
$$ f(t) = C + \frac{\pi}{2} t - \frac{\pi}{2} \sqrt{t^2+1}.$$ 
Finally, to determine $C$, note that $f(0) = 0$ or
$$ 0 = C - \frac{\pi}{2} $$ and hence $C = \frac{\pi}{2}$ giving  the result
$$ f(t) = \frac{\pi}{2} ( 1 + t - \sqrt{t^2+1} ).$$
When $t<0,$same calculation shows
$$ f(t)= \frac{\pi}{2}(-1 + t +\sqrt{t^2+1})$$
