Problem with Integral attempt Problem: Evaluate:

$$\displaystyle\int_{0}^{\infty} \dfrac{1}{x} \left(\tan^{-1}(\pi x) - \tan^{-1}x\right)dx.$$

Attempt: $$\displaystyle\int_{0}^{\infty} \dfrac{1}{x} \left(\tan^{-1}(\pi x) - \tan^{-1}x\right)dx.$$
$$=\displaystyle\int_{0}^{\infty} \dfrac{tan^-1 (\pi x)}{x} dx -\int_0^\infty  \dfrac{\tan^{-1}x}{x}dx.$$
Consider $$J(b) = \int_0^\infty \dfrac{\tan^-1(bx)}{x} dx$$
Differentiating $J(b)$ w.r.t (b)
$$J'(b)=\int_0^\infty \dfrac{dx}{1+(bx)^2}=\dfrac{\pi}{2b}$$
$$\Longrightarrow J(b) = \dfrac{\pi}{2}\ln b + C$$
Now how do we proceed further to find C? $J(0) = 0$, but $\ln(0)$ is not defined. $$$$
 A: $$\begin{eqnarray*}\int_{0}^{+\infty}\frac{\arctan(\pi x)-\arctan x}{x}\,dx &=& \int_{0}^{+\infty}\frac{1}{x}\int_{1}^{\pi}\frac{x}{1+a^2 x^2}\,da\,dx\\&=&\int_{1}^{\pi}\frac{\pi}{2a}\,da\\&=&\color{red}{\frac{\pi}{2}\log\pi}.\end{eqnarray*}$$
A: What you have done is correct till $J'(b)=\frac{\pi}{2b}$
What you need to find is $J(\pi)-J(1)$
Therefore,integrate $\frac{\pi}{2b}$ over b from 1 to $\pi$
A: Recall Frullani's Integral
$$\int_0^{\infty}\frac{f(\alpha t)-f(\beta t)}{t}dt=\left(f(0)-f(\infty)\right)\log(\beta/\alpha) \tag 1$$
where $f$ is continuous, the integral converges, and $f(\infty)=\lim_{t\to \infty}f(t)$.  
For the integral of interest we have $f=\arctan t$, $\alpha =\pi$, and $\beta =1$.  We therefore have immediately from $(1)$
$$\int_0^{\infty}\frac{\arctan(\pi t)-\arctan( t)}{t}dt=\frac{\pi}{2}\log \pi$$

NOTE:
To answer the question at the end of the original post, we ought not evaluate $J$ since that integral diverges.  This is so since the arctangent function is bounded as approaches $\pi /2$ as $x \to \infty$, while the integral of $1/x$ diverges.   
We could form, however, a new function $K(a)=\int_0^{\infty}\frac{\arctan(ax)-\arctan(x)}{x}dx$.  Differentiating with respect to $a$ gives the result that 
$$K'(a)=\int_0^{\infty}\frac{1}{1+a^2x^2}dx=\frac{\pi}{2a} \tag2$$
Integrating $(2)$ yields $K(a)=\frac{\pi}{2}\log a +C$.
Now, we see that $K(1)=0 \implies C=0$ and thus we have
$$K(\pi)=\frac{\pi}{2}\log \pi$$
as expected!
