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

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 .


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. )