Evaluate the integral $\int_{0}^{+\infty}\frac{\arctan \pi x-\arctan x}{x}dx$ Compute improper integral : $\displaystyle I=\int\limits_{0}^{+\infty}\dfrac{\arctan \pi x-\arctan x}{x}dx$.

With
\begin{eqnarray*}
\lim_{x \to \infty}\left\lbrack\arctan\left(\pi x\right) - \arctan\left(x\right)\right\rbrack
\ln\left(x\right)
& = &
\lim_{x \to \infty}
\left\lbrack\arctan\left(1 \over x\right) - \arctan\left(1 \over \pi x\right)\right\rbrack
\ln\left(x\right)
\\
& = &
\left(1 - {1 \over \pi}\right)\lim_{x \to \infty}{\ln\left(x\right) \over x}
\\
& = &
\left(1 - {1 \over \pi}\right)\lim_{x \to \infty}{1/x \over 1} = 0
\end{eqnarray*}
and
\begin{eqnarray*}
\lim_{x \to 0}\left\lbrack\arctan\left(\pi x\right) - \arctan\left(x\right)\right\rbrack
\ln\left(x\right)
& = &
\left(\pi - 1\right)\lim_{x \to 0}
\left\lbrack x\ln\left(x\right)\right\rbrack
\\
& = &
\left(\pi - 1\right)\lim_{x \to 0}{\ln\left(x\right) \over 1/x}
\\
& = &
\left(\pi - 1\right)\lim_{x \to 0}{1/x \over -1/x^{2}} = 0
\end{eqnarray*}
we have
\begin{eqnarray*}\color{#66f}{\large\int_{0}^{\infty}%
{\arctan\left(\pi x\right) - \arctan\left(x\right) \over x}\,{\rm d}x}
& = &
-\int_{0}^{\infty}\ln\left(x\right)\left\lbrack
{\pi \over \left(\pi x\right)^{2} + 1}
-
{1 \over x^{2} + 1}
\right\rbrack\,{\rm d}x
\\
& = &
-\int_{0}^{\infty}\left\lbrack\ln\left(x \over \pi\right) - \ln\left(x\right)\right\rbrack
{1 \over x^{2} + 1}\,{\rm d}x
\\
& = &
\ln\left(\pi\right)
\underbrace{\quad\int_{0}^{\infty}
{1 \over x^{2} + 1}\,{\rm d}x\quad}_{=\ \pi/2}
=
\color{#66f}{\large{\pi \over 2}\,\ln\left(\pi\right)} \approx {\tt 1.7981}
\end{eqnarray*}
