TITLE: Simple Integral $\int_0^\infty (1-x\cot^{-1} x)dx=\frac{\pi}{4}$.
QUESTION [6 upvotes]: Hellow I am trying to prove this result.
$$
I:=\int_0^\infty (1-x\cot^{-1} x)dx=\frac{\pi}{4}.
$$
The indefinite integral exists for this integral.
The function $\cot^{-1} x$ is the arc-cotangent function, not the multiplicative inverse.  Note, we can not just break the integral up into two pieces because we will have problems with divergence.  
Using the relation 
$$
x\cot^{-1} x=x \tan^{-1} \frac{1}{x},\to \quad  I=\int_0^\infty \left(1-x\tan^{-1} \frac{1}{x}\right)dx
$$
may be of help to some but didn't help me.  I am not sure if I am missing a clever substitution, perhaps integration by parts will work, I obtained using this method
$$
I=(x-x^2\cot^{-1} x)\big|^\infty_0-\int_0^\infty \frac{x^2}{x^2+1}dx+\int_0^\infty x\cot^{-1} x \, dx
$$
but this is clearly a problem since we have divergence issue now.
The indefinite integral is given by
$$
\int (1-x\cot^{-1} x ) dx =\frac{1}{2}\left(x+\tan^{-1} x-x^2 \cot^{-1} x\right)
$$
but I am unable to prove this result.  Thanks.

REPLY [2 votes]: Inverting $x\to1/x$ gives
$$\int_0^\infty(1-x\cot^{-1}x)dx=\int_0^\infty{x-\arctan x\over x^3}dx$$
Integration by parts with $u=x-\arctan x$ and $dv=dx/x^3$ turns this into
$${x-\arctan x\over2x^2}\Big|_0^\infty+{1\over2}\int_0^\infty{1\over1+x^2}dx$$
The final integral easily gives the desired $\pi/4$, so it remains to check that
$$\lim_{x\to0}{x-\arctan x\over2x^2}=\lim_{x\to\infty}{x-\arctan x\over2x^2}=0$$
But these limits are easy L'Hopital computations:
$${(x-\arctan x)'\over(2x^2)'}={1-\displaystyle{1\over1+x^2}\over4x}={x\over4(1+x^2)}$$