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

closed-formdefinite integralsintegration

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!

Best Answer

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 .