# 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}?$$

-
Just by curiosity: how do you know that the equality is indeed true? –  Matemáticos Chibchas Aug 11 '13 at 9:08
@MatemáticosChibchas Numeric integration in Mathematica tells it is true :) –  Caran-d'Ache Aug 11 '13 at 16:27
This seems to be a very incredible difficult integral. Integration by parts yields $$\int_{0}^{1}\frac{\pi}{(\pi+S(x))^{2}+S(x)^{2}}\frac{2x^{2}}{1-x^{4}}\log xdx,$$ where $S(x)=\tanh^{-1}(x)-\tan^{-1}(x)$. This function satisfies $S(x)=\int_0^x \frac{2u^2}{1-u^4}du$, $iS(ix)=S(x)$, and has nice power series $S(x)=\frac{x^{3}}{3}+\frac{x^{7}}{7}+\frac{x^{11}}{11}+\cdots$, so one might hope to use complex integration. Interestingly the integral can be rewritten as $$\int_0^\infty \frac{\pi}{(\pi+x)^2+x^2}\log(S^{-1}(x))dx,$$ but this is of little due to the $S^{-1}(x)$ term. –  Eric Naslund Aug 20 '13 at 14:06
You might try reading some of Victor Moll's work (or contacting him). e.g. see ams.org/notices/200203/fea-moll.pdf –  John M Aug 22 '13 at 6:35
Standard computation time exceeded... –  Squirtle Dec 3 '13 at 4:39

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!

-
Thanks for sharing!! –  Integrals and Series Mar 3 '14 at 13:02

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.

-
No good. Near $x=1$, we have $\frac{1}{(\pi+S(x))^2 + S(x)^2} \frac{2x^2}{1-x^4} \approx \frac{1}{4} (1-x)^{-1} \log(1-x)^{-2} + \cdots$ where the ellipses are terms of lower order. You can't get that behavior with a $\beta$-distribution. What was the motivation of guessing $X$ would be $\beta$-distributed? –  David Speyer Dec 9 '13 at 5:22
@David Speyer Thanks for the comment. The "beta conjecture" was just an example, superficially motivated by the fact that we are looking at the $[0,1]$ interval, and that the log transformation is a usual phenomenon for beta rv.s. –  Alecos Papadopoulos Dec 9 '13 at 14:42
$$S(x)=\tanh^{-1}(x)-\tan^{-1}(x)=\sum_{n=0}^\infty\frac{x^{4n+3}}{4n+3}$$ –  Lucian Dec 24 '13 at 21:50
@Lucian I think one should add a "$2$" in front of the infinite sum. I find in the books that (for $x^2\le 1$), $\tanh^{-1}(x)=x + \frac {x^3}{3}+\frac {x^5}{5}+...$ while $\tan^{-1}(x)=x - \frac {x^3}{3}+\frac {x^5}{5}-...$ –  Alecos Papadopoulos Dec 24 '13 at 22:20