TITLE: Work out $ \int_{0}^{\infty}x\left(1-x\operatorname{arccot}x\right)\left(2+x\operatorname{arccot}x\right)\operatorname{arccot}x dx$
QUESTION [6 upvotes]: I would like to evaluate this integral,

$$\large \int_{0}^{\infty}x\left(1-x\operatorname{arccot}x\right)\left(2+x\operatorname{arccot}x\right)\operatorname{arccot}x\mathrm{d}x$$

$\large u=x\operatorname{arccot}x$
$\mathrm du=\operatorname{arccot}x-\frac{x}{1+x^2}\mathrm{d}x$
I try substitution, it is not going well.
or 
$$\int_{0}^{\infty}2x\operatorname{arccot}x+x^2\operatorname{arccot}^2x-x^3\operatorname{arccot}^3x\mathrm{d}x$$
Doing integration by parts 
$\large u=\operatorname{arccot}x$
$\mathrm du=-\frac{1}{1+x^2}\mathrm{d}x$
$\mathrm dv=x\mathrm dx$
$v=\frac{x^2}{2}$
$$\large \int 2x\operatorname{arccot}x\mathrm {d}x=x+x^2\operatorname{arccot}x-\operatorname{arccot}x$$
but this, it is hard to simplify down 
$$ \int x^2\operatorname{arccot}^2x-x^3\operatorname{arccot}^3x\mathrm{d}x$$

REPLY [4 votes]: I have found a much easier way to evaluate the integral. For $n \in \mathbb{N}$ define
$$ I_n = \int \limits_0^\infty [1- x^n \operatorname{arccot}^n (x)] \, \mathrm{d} x \, . $$
For $a \in \mathbb{R}$ we have
$$ a (1-a) (2+a) = (1-a^3) + (1-a^2) - 2 (1-a) \, , $$
so $ I = I_3 + I_2 - 2 I_1$ . 
$I_n$ can be evaluated by integrating by parts $n$ times. In my other answer I have derived the values $I_1 = \frac{\pi}{4}$ and $I_2 = \frac{\pi [2 \ln(2)+1]}{6}$. After computing $I_3 = \frac{\pi[32 \ln(2)+ 4 - \pi^2]}{32}$ we immediately obtain
$$ I = \frac{4\pi}{3} \ln(2) - \frac{5\pi}{24} - \frac{\pi^3}{32} \, . $$