# On the integrals $\int_0^\infty [1-x^n \operatorname{arccot}^n(x)] \, \mathrm{d} x$

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:

1. How can we find a closed-form expression for $I_n$ or $J_n$ , $n \in \mathbb{N}$ ?
2. 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.

• $$I_n=\int_0^{\frac{\pi }{2}} \csc ^2(y) \left(1-y^n \cot ^n(y)\right) \, dy$$ $$I_n=-\int_0^{\frac{\pi }{2}} y^n \cot ^n(y) \, dy+\int_0^{\frac{\pi }{2}} \cot ^2(y) \left(1-y^n \cot ^n(y)\right) \, dy+\frac{\pi }{2}$$ – James Arathoon Jul 29 '18 at 13:54
• $$I_n=n \int_0^{\frac{\pi }{2}} y^n \cot ^n(y) \left(\csc ^2(y)-\frac{\cot (y)}{y}\right) \, dy$$ – James Arathoon Jul 29 '18 at 16:32
• @JamesArathoon Thank you! I like the last form, in which the 'problematic' factor with the cancelling poles does not contain $n$-th powers anymore. That definitely makes an approach based on Laurent series seem less intimidating. – ComplexYetTrivial Jul 29 '18 at 20:05

Cool problem. Both proposed asymptotic forms are correct. I'm only going to do a first order calc for both, and for $J_n$ I'll say where the proof needs some work. For $I_n$ use the expression given by Arathoon's first note. Observe that $t\cot(t)$ is unimodal decreasing and at $t=0$ has the value 1. Thus by raising it to a high power we expect it to become more sharply peaked. In fact it is gaussian because $$t\cot(t) = 1-t^2/3-t^4/45... \sim \exp(-t^2/3)(1-7/90t^4 + ...)$$ Therefore $$I_n = \int_0^{\pi/2} \frac{dt}{\sin^2t} \big(1-(t\cot(t))^n \big) \sim \int_0^{\pi/2} \frac{dt}{\sin^2t} \big(1-\exp{(-n\,t^2/3)} \big).$$ Because $n \to \infty$ and because of the $\csc^2t,$ it is seen that the most important region is near $t=0.$ The trick now is to recognize that $\tan^2t = t^2 + O(t^4).$ Replace $t^2$ in the exponential with $\tan^2t$ because it just so happens (Mathematica knows it too) that $$\int_0^{\pi/2} \frac{dt}{\sin^2t} \big(1-\exp{(-a\,\tan^2t)} \big)=\sqrt{a \pi}.$$ With $a=n/3,$ we indeed have $I_n \sim \sqrt{n \pi /3}.$
For $J_n$ I used a technique call $\textit{depoissonization}.$ Make an exponential power series, $$\sum_{n=0}^\infty \frac{y^n}{n!}J_n = \sum_{n=0}^\infty\frac{y^n}{n!} \int_0^{\infty}(1-t\cot^{-1}(t))^n\, dt = e^y\int_0^{\infty}\exp{(-y\,t\,\cot^{-1}{t} )} \, dt.$$ Since $t\cot^{-1}t$ is monotonically increasing, all we need is the behavior near $0$ to asymptotically estimate the integral. In fact, $t\cot^{-1}t = \pi\,t/2 +O(t^2).$ Using the first term we therefore find $$J(y) := e^{-y}\sum_{n=0}^\infty \frac{y^n}{n!}J_n \sim \int_0^{\infty} \exp{(-\pi\,y\,t/2)} \, dt = \frac{2}{\pi\,y}.$$ By depoissonization, $J_n \sim J(n) =2/(\pi n)$ as long as the next term in the sequence is smaller than this first term. I don't intend to show that. One thing that makes this problem interesting is that in fact it can be shown that $I_n = \sum_{k=1}^n(-1)^{k+1}\binom{n}{k}J_k$ so that $I_n$ and $J_n$ are binomial transforms. Putting in the first order asymptotic for for either $I_n$ or $J_n$ will $\textit{not}$ give you the asymptotics of its transform.
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}$ .