How to prove $\int_0^1 \ln\left(\frac{1+x}{1-x}\right) \frac{dx}{x} = \frac{\pi^2}{4}$?

Hint. By the change of variable $$ t =\frac{1-x}{1+x} $$ you get $$ \int_0^1 \ln\left(\frac{1+x}{1-x}\right) \frac{dx}{x}=-2\int_0^1 \frac{\ln t}{1-t^2} dt=-2\sum_{n=0}^{\infty}\int_0^1t^{2n}\:\ln t \:dt=2\sum_{n=0}^{\infty}\frac{1}{(2n+1)^2}= \frac{\pi^2}{4}. $$


Setting the convergence issue aside, I'll compute the integral formally using power series.

Note that \begin{eqnarray}\frac{\ln\frac{1+x}{1-x}}{x}=\frac{\ln(1+x)-\ln(1-x)}{x}=\sum_{n=1}^\infty\frac{2x^{2n-2}}{2n-1}\end{eqnarray} Integrating termwise, \begin{eqnarray} \int_0^1\sum_{n=1}^\infty\frac{2x^{2n-2}}{2n-1}=2\sum_{n=1}^\infty\frac{1}{(2n-1)^2} \end{eqnarray} Using the fact that $\displaystyle\sum_{m=1}^\infty\frac{1}{m^2}=\frac{\pi^2}{6}$ and $\sum_{n=1}^\infty\frac{1}{(2n)^2}=\frac{\pi^2}{24}$, we have the required sum is $\displaystyle2\left(\frac{\pi^2}{6}-\frac{\pi^2}{24}\right)=\frac{\pi^2}{4}$.