Background
When I first met the integral
$$I=\int_0^{\infty} \frac{\tan ^{-1}(a x)-\tan ^{-1}(x)}{x} d x,$$
I tried to use Feynman’s Technique by considering the integral with parameter $a$ $$ I(a)=\int_0^{\infty} \frac{\tan ^{-1}(a x)-\tan ^{-1}(x)}{x} d x, \quad \textrm{ where } a>0 $$ Differentiating $I(a)$ gives $$ \begin{aligned} I^{\prime}(a) & =\int_0^{\infty} \frac{1}{1+a^2 x^2} dx\\ & =\frac{1}{a}\left[\tan ^{-1}(a x)\right]_0^{\infty} \\ & =\frac{\pi}{2 a} \end{aligned} $$ Integrating $I^{\prime}(a) $ from $a=1$ to $e$ gives $$ \begin{aligned} I(e)-I(1) & =\int_0^e \frac{\pi}{2 x} d x =\frac{\pi}{2}[\ln x]_1^e \\I=I(e)& =\frac{\pi}{2} \end{aligned} $$
Then I discovered that $I$ can be also evaluated as a double integral, Frullani’s integral etc., I started to try similarly but failure to evaluate the following general integral $$I(a)=\int_0^{\infty} \frac{\tan ^{-1}(e x)-\tan ^{-1}(x)}{x^a} d x,$$ where $0<a<1.$
Investigation by Beta function
In order to convert $I$ into a Beta function, I use integration by parts on $\frac{1}{x^a}$ as below: $$ \begin{aligned} I(a) & =\frac{1}{-a+1} \int_0^{\infty}\left(\tan ^{-1}(e x)-\tan ^{-1} x\right) d\left(x^{-a+1}\right) \\ & =\frac{1}{-a+1}\left[x^{-a+1}\left(\tan ^{-1}(e x)-\tan ^{-1} x\right)\right]_0^{\infty} -\frac{1}{-a+1} \int_0^{\infty}\left(\frac{x^{-a+1} e}{1+e^2 x^2}-\frac{x^{-a+1}}{1+x^2}\right) d x\\&= \frac{e}{1-a} \int_0^{\infty} \frac{x^{1-a}}{1+e^2 x^2} d x+\frac{1}{1-a} \int_0^{\infty} \frac{x^{1-a}}{1+x^2} d x\\& \stackrel{ex\mapsto x}{=} -\frac{1}{(1-a) e^{1-a}} \int_0^{\infty} \frac{x^{1-a}}{1+x^2} d x+\frac{1}{1-a} \int_0^{\infty} \frac{x^{1-a}}{1+x^2} d x\\&= \frac{1}{1-a}\left(1-\frac{1}{e^{1-a}}\right) \int_0^{\infty} \frac{x^{1-a}}{1+x^2} d x \end{aligned} $$ Using the result in the post,we have $$ \boxed{I(a)=\frac{\pi(1-e^{a-1})}{2(1-a)}\csc \left(\frac{\pi a}{2}\right)} $$
For examples,
$$ \begin{aligned} I\left(\frac{1}{2}\right) & =\frac{\pi}{2 \times \frac{1}{2}} \csc \left(\frac{\pi}{4}\right)\left(1-\frac{1}{\sqrt{e}}\right) =\pi \sqrt{2}\left(1-\frac{1}{\sqrt{e}}\right) \\ I\left(\frac{1}{3}\right) & =\frac{3 \pi}{4} \csc \left(\frac{\pi}{6}\right)\left(1-\frac{1}{e^{\frac{2}{3}}}\right) =\frac{3 \pi}{2}\left(1-\frac{1}{e^{\frac{2}{3}}}\right) \end{aligned} $$
Fortunately, the original integral $I=\lim _{a \rightarrow 1} I(a)=\frac{\pi}{2}.$
My Question: Can we evaluate $I(a)$ using Feynman’s, Frullani’s or double integral without Beta functions?
Let's take
\begin{align} F(a,b) & = \int_0^{\infty} \frac{\tan ^{-1}(b x)-\tan ^{-1}(x)}{x^a} dx\\ \dfrac{\partial F}{\partial b} & = \int_0^{\infty} \frac{x^{1-a}}{1+b^2x^2} dx\\ & = b^{a-2} \int_0^{\infty} \frac{u^{1-a}}{1+u^2} du \hspace{1cm} [u = bx]\\ & = \dfrac \pi 2 b^{a-2} \sec (\dfrac \pi 2 (1-a)) \hspace{0.7cm} [\text{for |1-a|<1 }] \hspace{4mm}(*)\\ & = \dfrac \pi 2 b^{a-2} \csc (\dfrac {\pi a} 2 )\\ \text{Then, } I(a) & = F(a,e)-F(a,1) = \int_1^e \dfrac \pi 2 b^{a-2} \csc (\dfrac {\pi a} 2 ) db \\ & = \dfrac \pi 2 \dfrac{e^{a-1}-1}{a-1} \csc (\dfrac{\pi a}2) \end{align}
which gives $\lim\limits_{a \rightarrow 1} I(a) = \dfrac \pi 2$
* Using the result in the post
Hope this helps you!