A logarithmic integral $\int^1_0 \frac{\log\left(\frac{1+x}{1-x}\right)}{x\sqrt{1-x^2}}\,dx$

After the change of variables $x=\tanh u$ (suggested by the square root) this integral reduces to $$\mathcal{I}=\int_0^{\infty}\frac{2u\,du}{\sinh u}.$$ Expanding $\displaystyle\frac{1}{\sinh u}=2\sum_{k=0}^{\infty}e^{-(2k+1)u}$ and exchanging summation and integration, we find that $$\mathcal{I}=4\sum_{k=0}^{\infty}\frac{1}{(2k+1)^2}.$$ Standard manipulations express the last sum in terms of $\zeta(2)=\frac{\pi^2}{6}$: $$\zeta(2)=\sum_{k=0}^{\infty}\frac{1}{(2k+1)^2}+\frac{\zeta(2)}{4}\quad \Longrightarrow \quad \displaystyle\mathcal{I}=3\zeta(2).$$


Let $-1\le a \le 1$ and: \begin{align*} I(a) &= \int_{0}^{1} \, \log\left(\frac{1+a\,x}{1-a\, x}\right)\frac{1}{x\sqrt{1-x^2}}\, dx \tag 1\\ \frac{\partial}{\partial a}I(a) &= \int_{0}^{1} \, \frac{1}{(1+a\, x)\sqrt{1-x^2}} + \frac{1}{(1-a\, x)\sqrt{1-x^2}} \, dx\\ &= \frac{1}{\sqrt{1-a^2}}\, \left(\arcsin\left(\frac{x+a}{1+a\, x}\right)+\arcsin\left(\frac{x-a}{1-a\, x}\right) \right) \Big|_0^1\\ &= \frac{\pi}{\sqrt{1-a^2}}\\ \therefore I(a) &= \pi\, \arcsin{a} + C \tag 2\\ \end{align*} Putting $a=0$, in $(1)$ and $(2)$, we see that $C=0$

Hence, \begin{align*} I(a) &= \int_{0}^{1} \, \log\left(\frac{1+a\,x}{1-a\, x}\right)\frac{1}{x\sqrt{1-x^2}}\, dx = \pi\, \arcsin{a} \end{align*}

and for this problem $$I(1)=\frac{\pi^2}{2}$$


The following approach uses contour integration.

First notice that

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

Now let $$f(z) = \frac{\log (z+1) - \log(z-1)}{z\sqrt{(z+1)(z-1)}}$$ where $ 0 \le \arg(z+1), \arg(z-1) < 2 \pi.$

The above function is continuous across $(1, \infty)$ and is thus a well-defined function on $\mathbb{C} \setminus [-1,1]$.

On both sides of the branch cut, $f(z)$ has a simple pole at $z=0$.

And since $f(z) \sim \mathcal{O} \left(\frac{1}{z^{3}} \right)$ as $|z| \to \infty$, the residue of $f(z)$ at infinity is $0$.

So starting just above the branch cut and integrating clockwise around an indented dog-bone contour, we get

$$ \begin{align} &\operatorname{PV} \int_{-1}^{1} \frac{\log (x+1) - \log(1-x) - \pi i}{x\sqrt{(x+1)(1-x)e^{\pi i}}} \, \mathrm dx+ \operatorname{PV}\int_{1}^{-1} \frac{\log (1+x) + 2 \pi i - \log(1-x) - \pi i }{x\sqrt{(1+x)e^{2 \pi i}(1-x)e^{\pi i}}} \, \mathrm dx \\ &= -2i \int_{-1}^{1} \frac{\log \left(\frac{1+x}{1-x} \right)}{x\sqrt{1-x^{2}}} \, \mathrm dx\\ &= \pi i \ \operatorname{Res}[f(z),0^{\text{above}}] + \pi i \ \operatorname{Res}[f(z), 0_{\text{below}}] \\ &= \pi i (- \pi) + \pi i (- \pi)\\ &= - 2 \pi^{2} i . \end{align}$$

(The notation $0^{\text{above}}$ just means that we're above the branch cut, and the notation $0_{\text{below}}$ just means that we're below the branch cut.)

Therefore,

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