TITLE: On the integrals $\int_0^\infty [1-x^n \operatorname{arccot}^n(x)] \, \mathrm{d} x$
QUESTION [9 upvotes]: 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.

REPLY [2 votes]: The following partial answer gives the integrals $(I_n)_{n\in\mathbb{N}}$ in terms of 
$$K_n^{(m)} \equiv \int \limits_0^{\pi/2} t^n \cot^m (t) \, \mathrm{d} t \, , \, n \in \mathbb{N}_0 \, , \, 0 \leq m \leq n \, .$$
A closed-form expression for these integrals is discussed in this question, but in principle they can be evaluated in terms of 
$$K_n^{(0)} = \int \limits_0^{\pi/2} t^n \, \mathrm{d} t = \frac{1}{n+1} \left(\frac{\pi}{2}\right)^{n+1} \, , \, n \in \mathbb{N}_0 $$
and 
\begin{align} 
K_n^{(1)} &= \int \limits_0^{\pi/2} t^n \cot (t) \, \mathrm{d} t = -n \int \limits_0^{\pi/2} t^{n-1} \ln(\sin(t)) \, \mathrm{d} t \\
&= \frac{n!}{2^n} \left[\sum \limits_{l=0}^{\left \lfloor \frac{n-1}{2} \right \rfloor} (-1)^l \frac{\pi^{n-2l}}{(n-2l)!} \eta (2l+1) + \operatorname{1}_{2 \mathbb{N}} (n) (-1)^{\left \lfloor \frac{n+1}{2} \right \rfloor} [\zeta (n+1) + \eta (n+1)]\right]
\end{align}
using the recurrence relation
$$K_n^{(m)} = \frac{n}{m-1} K_{n-1}^{(m-1)} - K_n^{(m-2)} \, , \, n \geq m \geq 2 \, .$$
We start from the representation
$$I_n = n \int \limits_0^{\pi/2} t^n \cot^n (t) \left[\csc^2 (t) - \frac{\cot(t)}{t}\right] ^\, \mathrm{d} t \, , \, n \in \mathbb{N} \, , $$
given by James Arathoon in the comments. Using $\csc^2(t) = 1+\cot^2(t)$ and integrating by parts we find
\begin{align}
I_n &= n K_n^{(n)} + n \int \limits_0^{\pi/2} t^{n-1} \left[t \cot^{n+2}(t) -\cot^{n+1}(t)\right] \, \mathrm{d} t \\
&= n K_n^{(n)} + \int \limits_0^{\pi/2}  \left[(n+2) t^{n+1} \cot^{n+1} (t) \csc^2(t) - t^n \cot^{n+2} (t) - (n+1) t^n \cot^n (t) \csc^2(t)\right] \, \mathrm{d} t \\
&= - K_n^{(n)} + (n+2) \left[K_{n+1}^{(n+1)} + \int \limits_0^{\pi/2}  t^n \left[t \cot^{n+3} (t) - \cot^{n+2} (t)\right] \, \mathrm{d} t \right] \\
&= - K_n^{(n)} + \frac{n+2}{n+1} I_{n+1} \, .
\end{align}
This yields the recurrence relation
$$ I_{n+1} = \frac{n+1}{n+2} (I_n + K_n^{(n)}) \, , \, n \in \mathbb{N}_0 \, ,$$
with the initial condition $I_0 = 0$ , which has the solution
$$ I_n = \frac{1}{n+1} \sum \limits_{l=0}^{n-1} (l+1) K_l^{(l)}$$
for $n \in \mathbb{N}$ .