Integration of $\int_0^a \frac{\log\left|x^2 - 1\right|}{1 - x^2} dx$ I am trying to integrate something and after some changes of variable and an integration by parts I am stuck with this integral:
$$\int_0^a \frac{\log\left|x^2 - 1\right|}{1 - x^2} dx$$
I know that $a < 1$.
My question is twofold:


*

*Is it legal, as I know that $a < 1$ to say: Okay, $a < 1$ so $x^2 < 1$, so I can transform the integral into:


$$\int_0^a \frac{\log\left(1 - x^2\right)}{1 - x^2} dx$$


*How can I solve it?


Thanks in advance!
 A: After some hours and a change of variable more I have been able to
'solve' the integral, although its result is in terms of the Polylogarithm,
as some of you have pointed out.
I was suggested in Twitter to try the expansion $log(1-x^2) = log(1-x) + log(1+x)$
and then the change $1-x = \exp(t)$ in the first case and $1+x = \exp(t)$ in
the second.
In the first case we have:
$$1-x = \exp(t); x = 1 - \exp(t); t = \log(1-x); dx = - \exp(t) dt$$
\begin{align}
\int_0^a \frac{\log(1-x)}{1-x^2} dx & = - \int_0^{\log(1-a)} \frac{t}{2 - \exp(t)} dt \\
 & = -\frac{1}{4}\left[t\left(t - 2 \log\left(1 - \frac{\exp(t)}{2}\right)\right) - 2 Li_2\left(\frac{\exp(t)}{2}\right)\right]_0^{\log\left(1-a\right)}
\end{align}
In the second case we have:
$$1+x = \exp(t); x = \exp(t) - 1; t = \log(1+x); dx = \exp(t) dt$$
\begin{align}
\int_0^a \frac{\log(1+x)}{1-x^2} dx & = \int_0^{\log(1+a)} \frac{t}{2 - \exp(t)} dt \\
 & = \frac{1}{4}\left[t\left(t - 2 \log\left(1 - \frac{\exp(t)}{2}\right)\right) - 2 Li_2\left(\frac{\exp(t)}{2}\right)\right]_0^{\log\left(1+a\right)}
\end{align}
Calling what's inside the brackets $f(y)$ we can see that our integral is:
\begin{align}
4I & = -\left[f(y)\right]_0^{\log(1-a)} - \left[f(y)\right]_{\log(1+a)}^0 \\
   & = -\left[f(\log(1-a)) - f(0) + f(0) - f(\log(1+a))\right]\\
   & = f(\log(1+a)) - f(\log(1-a))
\end{align}
Substituying back the logarithms inside $f$ we get:
\begin{align}
4I = & +\log(1+a)\left[\log(1+a) - 2 \log(1 - \frac{1+a}{2})\right] - 2 Li_2\left(\frac{1+a}{2}\right)\\
     & -\log(1-a)\left[\log(1-a) - 2 \log(1 - \frac{1-a}{2})\right] + 2 Li_2\left(\frac{1-a}{2}\right)
\end{align}
We can now operate inside the brackets to get:
\begin{align}
\log(1+a) - 2 \log(1 - \frac{1+a}{2}) = & \log(1+a) - 2 \log(\frac{1-a}{2}) \\
                                         = & \log(1+a) - \log(1-a) - \log(1-a) + 2 \log(2) \\
                                         = & \log(\frac{1+a}{1-a}) - \log(1-a) + 2 \log(2) \\
                                         = & 2 \tanh^{-1}(a) - \log(1-a) + 2 \log(2)
\end{align}
We can operate in the same way for $\log(1-a)$ term and get a similar
result but with the opposite sign for the $\tanh^{-1}$ and a $\log(1+a)$ term
instead of $\log(1-a)$.
Substituting back in the integral we get:
\begin{align}
4I = & + 2 \log(1+a) \tanh^{-1}(a) - \log(1+a) \log(1-a) + 2 \log(1+a) \log(2)\\
     & + 2 \log(1-a) \tanh^{-1}(a) + \log(1-a) \log(1+a) - 2 \log(1-a) \log(2)\\
     & + 2 \left[Li_2\left(\frac{1-a}{2}\right) - Li_2\left(\frac{1+a}{2}\right)\right] \\ \\
   = & + 2 \tanh^{-1}(a) \left(\log(1+a) + \log(1-a)\right)\\
     & + 2 \log(2)       \left(\log(1+a) - \log(1-a)\right)\\
     & + 2 \left[Li_2\left(\frac{1-a}{2}\right) - Li_2\left(\frac{1+a}{2}\right)\right] \\ \\
   = & + 2 \tanh^{-1}(a) \log(1-a^2)\\
     & + 4 \tanh^{-1}(a) \log(2)\\
     & + 2 \left[Li_2\left(\frac{1-a}{2}\right) - Li_2\left(\frac{1+a}{2}\right)\right]
\end{align}
And that's mostly it... now you just calculate the Dilogarithm as you can and
have the answer.
