Integral $\int_0^1 \ln\left(\frac{1-x}{1+x}\right)\ln\left(\frac{1-x^2}{1+x^2}\right)\frac{dx}{x}$

Greetings I saw here (among the last integrals) that: $$\int_0^1 \ln\left(\frac{1-x}{1+x}\right)\ln\left(\frac{1-x^2}{1+x^2}\right)\frac{dx}{x}=\pi C$$ Where $C$ is Catalan's constant. Did this integral appear here before? (my quick search did not found anything).

I gave it a try and got stuck. Denoting the integral as $I$ and using that $\ln \left(\frac ab\right)=\ln a- \ln b\ $ we have: $$I=K(1,1)-K(1,-1)-K(-1,1)+K(-1,-1)$$ Where $$K(a,b)=\int_0^1\frac{\ln(1+ax)\ln(1+bx^2)}{x}dx$$ Differentiating under the integral sign: $$\frac{\partial^2}{\partial a \partial b}K(a,b)=\int_0^1 \frac{x^2}{(1+ax)(1+bx^2)}\,dx$$ By partial fractions we get: $$\frac{1}{a^2+b}\left(\int_0^1 \frac{ax}{bx^2+1}\,dx -\int_0^1 \frac{1}{bx^2+1}\,dx +\int_0^1 \frac{1}{ax+1} \,dx\right)$$ $$=\frac{1}{a^2+b}\left(\frac{a\ln(1+b)}{2b}-\frac{\arctan \left(\sqrt b\right)}{\sqrt{b}} +\frac{\ln(1+a)}{a}\right) $$ And now since $K(0,b)=K(a,0)=0$ $$K(a,b)=\frac12\int_0^a \int_0^b \frac{x\ln(1+y)}{y(x^2+y)}\,dy\,dx-\int_0^a \int_0^b \frac{\arctan \left(\sqrt y\right)}{\sqrt{y}(x^2+y)}\,dy\,dx +\int_0^a \int_0^b \frac{\ln(1+x)}{x(x^2+y)}\,dy\,dx$$ Is there a clever way to solve this? Another way is to start by using: $$-\frac12\ln\left(\frac{1-x}{1+x}\right)=\sum_{n=1}^\infty \frac{x^{2n+1}}{2n+1}$$ $$I=4\sum_{n,k=1}^\infty \frac{1}{(2n+1)(2k+1)}\int_0^1 x^{4n+2k+2}\,dx=4\sum_{n,k=1}^\infty \frac{1}{(2n+1)(2k+1)(4n+2k+3)}$$ But I dont know how to deal with this series. I would appreciate some help with this integral!


Solution 1:

Since the integrand is an even function, we can write

$$ I = \frac{1}{2}\int_{-1}^{1} \log\left(\frac{1-x}{1+x}\right)\log\left(\frac{1-x^2}{1+x^2}\right)\,\frac{dx}{x}. $$

Now deforming the line contour $[-1, 1]$ to the semicircular contour from $-1$ to $1$ and substituting $x = e^{i\theta}$,

$$ I = -\frac{i}{2} \int_{0}^{\pi} \log(-i\tan(\theta/2)) \log(-i\tan \theta) \, d\theta, $$

where we utilized the identity $\frac{1-e^{i\theta}}{1+e^{i\theta}} = -i\tan(\theta/2)$. Now we note that, for $\theta \in (0, \pi/2) \cup (\pi/2, \pi)$,

  • $\log(-i\tan(\theta/2)) = \log\tan(\theta/2) - \frac{i\pi}{2}$,

  • $\log(-i\tan\theta) = \log\lvert\tan\theta\rvert - \operatorname{sign}(\tan\theta)\frac{i\pi}{2}$.

  • $\int_{0}^{\pi} \log\lvert\tan\theta\rvert \, d\theta = 2 \int_{0}^{\pi/2} (\log\sin\theta - \log\cos\theta) \, d\theta = 0$.

Plugging these back and taking real parts only (since we know that $I$ is real),

\begin{align*} I &= -\frac{\pi}{4} \int_{0}^{\pi} \left( \log\lvert\tan\theta\rvert + \operatorname{sign}(\tan\theta)\log\tan(\theta/2) \right) \, d\theta \\ &= -\frac{\pi}{2} \int_{0}^{\pi/2} \log\tan(\theta/2) \, d\theta \\ &= -\pi \int_{0}^{1} \frac{\log u}{1+u^2} \, du, \qquad (u=\tan(\theta/2)) \\ &= \pi C. \end{align*}


Generalization. Utilizing a similar idea s in the computation above, we can prove that

Proposition. Let $p$, $q$ be positive integers. Write $g = \gcd(p,q)$ and assume that $p/g$ and $q/g$ are not simultaneously odd. Then

\begin{align*} &\int_{0}^{1} \log\left(\frac{1-x^p}{1+x^p}\right)\log\left(\frac{1-x^q}{1+x^q}\right)\,\frac{dx}{x} \\ &\hspace{6em} = \pi \sum_{n=0}^{\infty} \frac{1}{(2n+1)^2} \left( \frac{1}{p}\tan\left((2n+1)\frac{\pi p}{2q}\right) + \frac{1}{q} \tan\left((2n+1)\frac{\pi q}{2p}\right)\right) \end{align*}

Of course, the above can be simplified further by using either Hurwitz zeta function or trigamma function .

Solution 2:

It's always the same story,

$$J=\int_0^1 \ln\left(\frac{1-x}{1+x}\right)\ln\left(\frac{1-x^2}{1+x^2}\right)\frac{dx}{x}$$

Perform the change of variable $y=\dfrac{1-x}{1+x}$,

$$ J =2\int_0^1 \frac{\ln\left(\frac{x^2+1}{2x}\right)\ln x}{x^2-1}\,dx $$

For $x\in [0;1]$ define the function $R$,

\begin{align}R(x)&=\int_0^x \frac{\ln t}{t^2-1}\,dt\\ &=\int_0^1 \frac{x\ln( tx)}{t^2x^2-1}\,dt\\ \end{align}

Observe that $R(0)=0$.

\begin{align}J = {} & 2\left[R(x)\ln\left(\frac{x^2+1}{2x}\right)\right]_0^1-2\int_0^1\int_0^1 \frac{(x^2-1)\ln(tx)}{(x^2+1)(t^2x^2-1)}\,dt\,dx\\ = {} & -2\int_0^1\int_0^1 \frac{(x^2-1)\ln(tx)}{(x^2+1)(t^2x^2-1)}\,dt\,dx\\ = {} & -2\int_0^1\int_0^1 \frac{(x^2-1)\ln t}{(x^2+1)(t^2x^2-1)}\,dt\,dx-2\int_0^1\int_0^1 \frac{(x^2-1)\ln x}{(x^2+1)(t^2x^2-1)}\,dt\,dx\\ = {} & \int_0^1\left[\frac{1-t^2}{t(1+t^2)}\ln\left(\frac{1+tx}{1-tx}\right)-\frac{4\arctan x}{t^2+1}\right]_{x=0}^{x=1}\ln t\,dt-{}\\ &\int_0^1 \left[\frac{1-x^2}{x(1+x^2)}\ln\left(\frac{1+tx}{1-tx}\right)\right]_{t=0}^{t=1}\ln x\,dx\\ = {} & 4\times \frac{\pi}{4}\times -\int_0^1\frac{\ln t}{1+t^2}\,dt\\ = {} & \boxed{\pi\text{G}} \end{align}

$\text{G}$ is the Catalan constant.

PS: The idea is always the same, rewrite the integral as $\displaystyle \int_0^1 A(x)\ln x\ln(B(x))\,dx$, $A,B$ rational fraction functions. Then consider $\displaystyle R(x)=\int_0^x A(t)\ln t\,dt$ and finally perform integration by parts. If you know that the result is not too complicated you're pretty sure the process will work ;)

PS2: Actually, $\displaystyle \int_0^1 A(x)\left(\sum_{n=1}^N\beta_n\ln(B_n(x))+\sum_{n=1}^M \delta_n \arctan(C_n(x))\right)\,dx$ with $\beta_n,\delta_n$ real numbers, $A,B_n,C_n$ rational fractional function will work too if the result is supposed to be not too complicated. (see Evaluating $\int_0^1 \frac{\arctan x \log x}{1+x}dx$ for another miraculous evaluation of integral. )