When answering this question I came across the integrals
$$ I_n \equiv \int \limits_0^\infty [1-x^n \operatorname{arccot}^n(x)] \, \mathrm{d} x \, , ~n \in \mathbb{N} \, . $$
I needed $I_1 = \frac{\pi}{4}$ , $I_2 = \frac{\pi}{6}[2 \ln(2)+1]$ and $I_3 = \frac{\pi}{32}[32 \ln(2)+ 4 -\pi^2]$ in my answers. They can be evaluated by writing $$ I_n = \lim_{r \to \infty} \left[r - \int \limits_0^r x^n \operatorname{arccot}^n (x) \, \mathrm{d} x \right] $$ and using repeated integration by parts to reduce the remaining integral to a few terms that cancel the $r$ in the limit and some well-known integrals.
This calculation should work for any $n \in \mathbb{N}$, but it gets more tedious for larger values of course. Mathematica gives reasonably nice expressions for the integrals in terms of $\pi$ , $\ln(2)$ and values of the zeta function (for example $I_4 = \frac{\pi}{40} [4 + 80 \ln(2) - \pi^2 (3 + 4 \ln(2)) + 18 \zeta(3)]$), so it might be possible to evaluate the integrals in terms of suitable special functions in general.
However, I have not yet found a way to transform them into such an expression. The obvious substitution $x = \cot (t)$ leads to $$ I_n = \int \limits_0^{\pi/2} \frac{\sin^n (t) - t^n \cos^n (t)}{\sin^{n+2}(t)} \, \mathrm{d} t \, ,$$ which does not seem to help much. We can use $$ 1 - a^n = (1-a) \sum \limits_{k=0}^{n-1} a^k = \sum \limits_{k=0}^{n-1} \sum \limits_{l=0}^k (-1)^l {k \choose l} (1-a)^{l+1} $$ for $n \in \mathbb{N}$ and $a \in \mathbb{R}$ to obtain $$ I_n = \sum \limits_{k=0}^{n-1} \sum \limits_{l=0}^k (-1)^l {k \choose l} J_{l+1} $$ in terms of $$ J_n \equiv \int \limits_0^\infty [1-x \operatorname{arccot}(x)]^n \, \mathrm{d} x \, , ~n \in \mathbb{N} \, . $$ Interchanging the sums, using $\sum_{k=l}^{n-1} {k \choose l} = {n \choose l+1}$ (which apparently is known as the hockey-stick identity) and defining $I_0 = J_0 = 0$ , we find that the two sequences are binomial transforms of each other (except for a minus sign): $$I_n = - \sum \limits_{m=0}^n (-1)^m {n \choose m} J_m \, , \, n \in \mathbb{N}_0 \, . $$ I do not know which of the two families of integrals is easier to evaluate though. Note that the same method enables us to compute $$ \int \limits_0^\infty [1-x \operatorname{arccot}(x)] P[x \operatorname{arccot}(x)] \, \mathrm{d} x $$ for any polynomial $P$ once we know $(I_n)_{n \in \mathbb{N}}$ or $(J_n)_{n \in \mathbb{N}}$.
I am also interested in the asymptotic behaviour of the integrals. Numerical calculations and plots suggest that we have \begin{align} I_n &\sim \sqrt{\frac{\pi n}{3}} \, , \, n \to \infty \, , \\ J_n &\sim \frac{2}{\pi n} \, , \, n \to \infty \, , \end{align} but I have no idea how to prove that.
Therefore I am left with the following two questions:
- How can we find a closed-form expression for $I_n$ or $J_n$ , $n \in \mathbb{N}$ ?
- What can we say about the asymptotics of $I_n$ or $J_n$ as $n \to \infty$ ?
Any hints or (partial) solutions to either of them would be greatly appreciated.