How to prove $\int_0^1\tan^{-1}\left[\frac{\tanh^{-1}x-\tan^{-1}x}{\pi+\tanh^{-1}x-\tan^{-1}x}\right]\frac{dx}{x}=\frac{\pi}{8}\ln\frac{\pi^2}{8}?$

How can one prove that $$\int_0^1 \tan^{-1}\left[\frac{\tanh^{-1}x-\tan^{-1}x}{\pi+\tanh^{-1}x-\tan^{-1}x}\right]\frac{dx}{x}=\frac{\pi}{8}\ln\frac{\pi^2}{8}?$$


Solution 1:

I re-posted larry's question on MathOverflow, and the FINAL ANSWER posted by Prof. Juan Arias de Reyna(here and here) comes after a month!

Solution 2:

I wouldn't characterize my answer as a "solution to the integral", at least in the expected sense. What I will do, (also because it is a pity for this question to not have even one answer), is to use various transformations related to mathematical statistics and random variables, to transform the problem into one of proving existence and uniqueness of an expected (specific) value. At least in the end, no integral will be in sight.

Following notation established in the comments, let $S(x)=\tanh^{-1}(x)-\tan^{-1}(x)$. Our integral can be written (to prepare also for integration by parts)

$$I=\int_0^1 \tan^{-1}\left[\frac{S(x)}{\pi+S(x)}\right]\left(\frac{d\ln x}{dx}\right)dx$$ Integration by parts gives

$$I = \tan^{-1}\left[\frac{S(x)}{\pi+S(x)}\right]\ln x\Big|_0^1 - \int_0^1 \frac {d\tan^{-1}\left[\frac{S(x)}{\pi+S(x)}\right]}{dx}\ln xdx$$

$$= 0-\int_{0}^{1}\frac{\pi}{(\pi+S(x))^{2}+S(x)^{2}}\frac {dS(x)}{dx}\ln xdx$$

where for later use $\frac {dS(x)}{dx}=\frac {2x^2}{1-x^4}$.

Now consider the variable $Z=S(X)$. We first show that the term $\frac{1}{(\pi+z)^{2}+z^{2}} $ is the density of a Cauchy random variable. In general, this density is

$$f_Z(z) = \frac 1{\pi}\frac {\gamma}{(z-m)^2+\gamma^2} $$ where $m$ is the median/mode and $\gamma >0$ is a real scale parameter. If we set $m=-\pi/2,\;\; \gamma = \pi/2$ we obtain

$$f_Z(z;m=-\pi/2,\gamma=\pi/2) = \frac 1{\pi}\frac {\pi/2}{(z+\pi/2)^2+\pi^2/4}=\frac{1}{(\pi+z)^{2}+z^{2}}$$

So indeed, the variable $Z=S(X)$ can be seen as a Cauchy$(m=-\pi/2,\gamma=\pi/2)$ random variable with the above density. Now reverse the direction of thought: if $Z$ is a random variable, so is $X$, defined by $X=S^{-1}(Z)$. When we define a random variable as a function of another, if the function is strictly monotone, we have available the change-of-variable formula to derive the density of the former. The function $S(x)$ is strictly increasing and therefore so is its inverse. Inverting the relation we have $Z = (S^{-1})^{-1}(X) = S(X)$. The change-of-variable formula gives

$$f_X(x) = \left|\frac {dS(x)}{dx}\right|\cdot f_Z(S(x)) = \frac {dS(x)}{dx}\cdot f_Z(S(x))=\frac {dS(x)}{dx}\frac{1}{(\pi+S(x))^{2}+S(x)^{2}}$$

But this last expression exists already in our integral. Substituting we obtain

$$I = -\pi\int_{0}^{1}f_X(x)\ln xdx$$

This last expression could be the expected value of $\ln x$, (by the so called "Law of Unconscious Statistician"), if only the density $f_X(x)$ integrates to unity over $[0,1]$.

Note that $$\int_{0}^{1}f_X(x)dx = \int_{0}^{\infty}f_Z(z)dz = \int_{0}^{\infty}\frac{1}{(\pi+z)^{2}+z^{2}}dz $$ Adopting to our case a formula from Gradshteyn and Ryzhik 7th ed. (3.252(1), p.325) we find that

$$\int_{0}^{\infty}f_Z(z)dz = \frac 14 = \int_{0}^{1}f_X(x)dx \Rightarrow \int_{0}^{1}4f_X(x)dx =1$$

So it is the random variable with density $\tilde f_X(x) = 4f_X(x)$ that has the (truncated) support $[0,1]$ that validates the treatment of our intergal as an expected value: $$I = -\frac {\pi}{4}\int_{0}^{1}4f_X(x)\ln xdx = -\frac {\pi}{4}E[\ln X]$$

What have we accomplished (if anything)? We have transformed the problem: from

"prove that $I =\frac{\pi}{8}\ln\frac{\pi^2}{8}$"

we now must somehow prove that

"There exists a random variable $X$ with support $[0,1]$ whose logarithm has expected value equal to $-\frac{1}{2}\ln\frac{\pi^2}{8}$".

If this sentence can be proven in general (for existence and uniqueness), then we have "solved the integral".

Another way to try to prove this is to try to match the $\tilde f_X(x)$ density with some known distribution. As an example, we observe that the integral is evaluated in $[0,1]$ which is the support of a Beta distribution. Also, if we can match our density with a Beta distribution, then we know the expression for the expected value of its logarithm : $E[\ln X]=\psi(a) - \psi(a+b)$, where $\psi()$ is the digamma function. Therefore, if we postulate a Beta density for $X$, $$4f_X(x) = \frac {x^{a-1}(1-x)^{b-1}}{\operatorname{B}(a,b)},\; a,b>0$$ the integral should satisfy
$$I = -\frac {\pi}{4}\Big(\psi(a) - \psi(a+b)\Big)$$

Here, the task has become to determine $a^*>0,b^*>0$ such that

$$ -\frac {\pi}{4}\Big(\psi(a^*) - \psi(a^*+b^*)\Big) = \frac{\pi}{8}\ln\frac{\pi^2}{8}\qquad [A]$$ and that they also satisfy

$$\frac {x^{a^*-1}(1-x)^{b^*-1}}{\operatorname{B}(a^*,b^*)} = \frac{4}{(\pi+S(x))^{2}+S(x)^{2}}\frac {2x^2}{1-x^4},\;\; \forall x\in [0,1]\qquad [B]$$

Note that the second equation must hold for the whole interval $x\in [0,1]$. If existence and uniqueness of the solution to this system of non-linear equations can be proven, we have essentially "solved the integral". If non-existence is proved, then the postulate of a beta-distributed $X$ is rejected. A comment has already shown that this postulate should be rejected, but I leave it as an example of the approach.

But the general approach, and the transformation of the integral into an expected value of $\ln X$ remains valid.