Amazingly this integral appears in my Advanced Calculus book so the credit is not mine (though I wish it was).
First you must say $\displaystyle 0<b<a$. Confirm it is uniformly continous and do the following double integral trick.
$\displaystyle \int_0^{\infty} \frac{\tan^{-1} ax - \tan^{-1} bx}{x} dx = \int_0^{\infty} \int_b^a \frac{1}{t^2 x^2 + 1} \ dt \ dx$.
Change order,
$\displaystyle \int_b^a \int_0^{\infty} \frac{1}{t^2x^2+1} \ dx \ dt = \int_b^a \frac{\tan^{-1} tx}{t} \big|_0^{\infty} \ dx = \int_a^b \frac{\pi}{2t} dt = \frac{\pi}{2} \ln \frac{a}{b}$
More generally
If $\displaystyle f'(x)$ is continuous and the integral converges,
$\displaystyle \int_0^\infty\frac{f(ax)-f(bx)}x\,dx=(f(0)-f(\infty))\ln\frac ba$
This beautiful result is called Frullani's Integral.
Nice, isn't it?
Yes it is nice . Where did you get that from? It seems MathWorld has it while Wikipedia does not.
You should also state the conditions on the function* and limits. Perhaps $\displaystyle a>b>0$.
*)Maybe it should also be uniformly continous and having a limit at infinity?
I found (not mine) a proof of Frullani's Integral, and I'd like to share it
Let
$\displaystyle \int_\varphi ^\tau {\frac{{f(ax) - f(bx)}}
{x}\,dx}.$
So
$\displaystyle \int_\varphi ^\tau {\frac{{f(ax) - f(bx)}}
{x}\,dx} = \int_\varphi ^\tau {\frac{{f(ax)}}
{x}\,dx} - \int_\varphi ^\tau {\frac{{f(bx)}}
{x}\,dx} = \int_{a\varphi }^{a\tau } {\frac{{f(x)}}
{x}\,dx} - \int_{b\varphi }^{b\tau } {\frac{{f(x)}}
{x}\,dx} .$
And
$\displaystyle \int_\varphi ^\tau {\frac{{f(ax) - f(bx)}}
{x}\,dx} = \int_{a\varphi }^{b\varphi } {\frac{{f(x)}}
{x}\,dx} - \int_{a\tau }^{b\tau } {\frac{{f(x)}}
{x}\,dx} = \int_a^b {\frac{{f(u\varphi )}}
{u}\,du} - \int_a^b {\frac{{f(u\tau )}}
{u}\,du} .$
Now let $\displaystyle \varphi \to 0,\,\tau \to \infty ,$
$\displaystyle \int_a^b {\frac{{f(0)}}
{u}\,du} = f(0)\ln \frac{b}
{a}$ & $\displaystyle \int_a^b {\frac{{f(\infty )}}
{u}\,du} = f(\infty )\ln \frac{b}
{a}.$
The conclusion follows.