# Work out $\int_{0}^{\infty}x\left(1-x\operatorname{arccot}x\right)\left(2+x\operatorname{arccot}x\right)\operatorname{arccot}x dx$

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$$

• @MarkViola $\text{arccot}(\cot(y))$ does not simplify into $y$. It's a pointless substitution. – Von Neumann Jul 27 '18 at 15:58
• @VonNeumann Yes, I know that. I asked if the OP has tried it, in which case that epiphany would emerge. – Mark Viola Jul 27 '18 at 16:04
• @bonjour What motivated this question? Do you believe that the integral converges? It does converge; do you understand why? – Mark Viola Jul 27 '18 at 16:55
• I know that the answer is a rational $32/25$ – user565198 Jul 27 '18 at 17:03
• I hope that is the correct answer – user565198 Jul 27 '18 at 17:10

Splitting the integral

We can write \begin{align} I &\equiv \int \limits_0^\infty x \operatorname{arccot}(x) [1-x \operatorname{arccot}(x)][2+x \operatorname{arccot}(x)] \, \mathrm{d} x \\ &= \int \limits_0^\infty x \operatorname{arccot}(x) [1-x \operatorname{arccot}(x)] \, \mathrm{d} x + \int \limits_0^\infty x \operatorname{arccot}(x) [1-x^2 \operatorname{arccot}^2(x)] \, \mathrm{d} x \\ &= f_1 (1) + f_2(1) \, , \end{align} where for $a>0$ we let \begin{align} f_1(a) &\equiv \int \limits_0^\infty x \operatorname{arccot}(a x) [1-x \operatorname{arccot}(x)] \, \mathrm{d} x \, , \\ f_2(a) &\equiv \int \limits_0^\infty x \operatorname{arccot}(a x) [1-x^2 \operatorname{arccot}^2(x)] \, \mathrm{d} x \, . \\ \end{align}

Computation of $f_1(1)$

Differentiating under the integral sign yields \begin{align} f_1 '(a) &= -\int \limits_0^\infty \frac{x^2}{1+a^2 x^2} [1-x \operatorname{arccot}(x)] \, \mathrm{d} x \\ &= -\frac{1}{a^2}\left[\int \limits_0^\infty [1-x \operatorname{arccot}(x)] \, \mathrm{d} x - \int \limits_0^\infty \frac{1-x \operatorname{arccot}(x)}{1+a^2 x^2} \, \mathrm{d} x \right] \\ &\equiv -\frac{I_1 + g_1 (a)}{a^2} \, . \end{align} We integrate by parts to find \begin{align} I_1 &= \lim_{r \to \infty} \left[r-\frac{r^2}{2} \operatorname{arccot}(r) - \frac{1}{2} \int \limits_0^r \frac{x^2}{1+x^2} \, \mathrm{d} x\right] \\ &= \lim_{r \to \infty} \left[\frac{r-r^2 \operatorname{arccot}(r)}{2}+ \frac{1}{2} \int \limits_0^r \frac{\mathrm{d} x}{1+x^2} \right] \\ &= \frac{\pi}{4} \, . \end{align} Another integration by parts reduces $g_1(a)$ to $$g_1(a) = -\frac{\pi}{2 a} + \frac{1}{2a^2} \int \limits_0^\infty \frac{\ln(1+a^2 x^2)}{1+x^2} \, \mathrm{d} x \, .$$ The remaining integral can be evaluated using differentiation under the integral sign and a partial fraction decomposition. We find $$g_1(a) = -\frac{\pi}{2 a} + \frac{\pi \ln(1+a)}{2a^2} \, .$$ Since $f_1(\infty) = 0$, we can integrate to get \begin{align} f_1(1) &= \int \limits_\infty^1 f_1'(a) \, \mathrm{d} a = \int \limits_1^\infty \left[\frac{\pi}{4a^2} - \frac{\pi}{2 a^3} + \frac{\pi}{2 a^4} \ln(1+a)\right] \, \mathrm{d} a \\ &= \frac{\pi}{3}\ln(2) - \frac{\pi}{12} \, . \end{align}

Computation of $f_2(1)$

In the same manner we can compute \begin{align} f_2 '(a) &= -\int \limits_0^\infty \frac{x^2}{1+a^2 x^2} [1-x^2 \operatorname{arccot}^2(x)] \, \mathrm{d} x \\ &= -\frac{1}{a^2}\left[\int \limits_0^\infty [1-x^2 \operatorname{arccot}^2(x)] \, \mathrm{d} x - \int \limits_0^\infty \frac{1-x^2 \operatorname{arccot}^2(x)}{1+a^2 x^2} \, \mathrm{d} x \right] \\ &\equiv -\frac{I_2 + g_2 (a)}{a^2} \, . \end{align} We now need to integrate by parts twice to evaluate \begin{align} I_2 &= \frac{1}{3} \left[\int \limits_0^\infty \frac{1}{1+x^2} \, \mathrm{d} x + \int \limits_0^\infty \frac{\ln(1+x^2)}{1+x^2} \, \mathrm{d} x + \lim_{r\to\infty} r \{2-r \operatorname{arccot}(r)[1+r\operatorname{arccot}(r)]\}\right] \\ &= \frac{\pi[2 \ln(2)+1]}{6} \, . \end{align} We can write $$g_2 (a) = - \frac{\pi}{2 a} + \int \limits_0^\infty \frac{x^2 \operatorname{arccot}^2 (x)}{1+a^2 x^2} \, \mathrm{d} x \equiv - \frac{\pi}{2a} + h(a,1)$$ with $$h(a,b) = \int \limits_0^\infty \frac{x^2 \operatorname{arccot}^2 (b x)}{1+a^2 x^2} \, \mathrm{d} x$$ for $a,b >0$. Differentiation under the integral sign and partial fractions reduce the derivative of $h(a,b)$ with respect to $b$ to known integrals: \begin{align} \partial_b h(a,b) &= - 2 \int \limits_0^\infty \frac{x^3 \operatorname{arccot} (b x)}{(1+a^2 x^2)(1+a^2 x^2)} \, \mathrm{d} x \\ &= \frac{2}{a^2-b^2}\left[\int \limits_0^\infty \frac{x \operatorname{arccot} (b x)}{1+a^2 x^2} \, \mathrm{d} x - \int \limits_0^\infty \frac{x \operatorname{arccot} (b x)}{1+b^2 x^2} \, \mathrm{d} x \right] \\ &= \frac{\pi[\ln(a+b)-\ln(2b)]}{a^2(a^2-b^2)} - \frac{\pi \ln(2)}{a^2 b^2} \, . \end{align} After integrating with respect to $a$ and $b$ and evaluating all elementary integrals we are left with $$f_2(1) = \pi \ln(2) - \frac{\pi}{24} - \pi J \, ,$$ where \begin{align} J &= \frac{1}{2} \int \limits_1^\infty \int \limits_1^\infty \frac{b^{-4} \ln(a) - a^{-4} \ln(b)}{a^2-b^2} \, \mathrm{d} a \, \mathrm{d} b \\ &= \frac{1}{2} \int \limits_0^1 \int \limits_0^1\frac{v^4 \ln(u) - u^4 \ln(v)}{u^2-v^2} \, \mathrm{d} u \, \mathrm{d} v \, . \end{align} This integral can be evaluated by introducing the similar integral $$K = \frac{1}{2} \int \limits_0^1 \int \limits_0^1\frac{v^4 \ln(v) - u^4 \ln(u)}{u^2-v^2} \, \mathrm{d} u \, \mathrm{d} v \, .$$ We have \begin{align} K &= - \frac{1}{2} \frac{\mathrm{d}}{\mathrm{d} s} \int \limits_0^1 \int \limits_0^1\frac{u^s - v^s}{u^2-v^2} \, \mathrm{d} u \, \mathrm{d} v ~~ \Bigg \rvert_{s=4} = - \frac{\mathrm{d}}{\mathrm{d} s} \left[\frac{1}{s} \int \limits_0^1 \frac{1-t^s}{1-t^2} \, \mathrm{d} t \right] \\ &= \frac{1}{16} \int \limits_0^1 (1+t^2)\, \mathrm{d} t - \frac{1}{4} \int \limits_0^1 \frac{- \ln(t) t^4}{1-t^2} \, \mathrm{d} t \\ &= \frac{1}{12} - \frac{1}{4} \sum_{k=0}^\infty \frac{1}{(2k+5)^2} = \frac{13}{36} - \frac{\pi^2}{32} \, . \end{align} Since $$J + K = \frac{1}{2} \int \limits_0^1 \int \limits_0^1 - \ln(u v) (u^2+v^2) \, \mathrm{d} u \, \mathrm{d} v = \frac{4}{9} \, ,$$ we conclude that $$J = J + K - K = \frac{1}{12} + \frac{\pi^2}{32} \, .$$ Therefore we arrive at $$f_2(1) = \pi \ln(2) - \frac{\pi}{8} - \frac{\pi^3}{32} \, .$$

Final result

We now obtain the value $$I = f_1(1) + f_2(1) = \frac{4\pi}{3} \ln(2) - \frac{5\pi}{24} - \frac{\pi^3}{32} \, .$$ for the original integral. Note that $I \approx 1.2800035$ is very close but not equal to the rational number $\frac{32}{25} = 1.28$ .

• How did you write this much without MathJax stalling your browser? – Batominovski Jul 28 '18 at 18:52
• @Batominovski I guess I was just lucky. It was not very fun towards the end though. – ComplexYetTrivial Jul 28 '18 at 22:08

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} \, .$$