<s>[INST] Prove that $\int_{-1}^{1}\frac{\log(1+x)}{1+x^2}dx = \frac{\pi}{4}\log(2)-\sum_{n=0}^{\infty}\frac{(-1)^n}{(2n+1)^2}$ I have to prove that
$$
I=\int_{-1}^{1}\frac{\log(1+x)}{1+x^2}dx=\frac{\pi}{4}\log(2)-\sum_{n=0}^{\infty}\frac{(-1)^n}{(2n+1)^2}
$$
I know that 
$$ I_{+}=\int_{0}^{1}\frac{\log(1+x)}{1+x^2}dx=\frac{\pi}{8}\log(2)
$$
and I can write
$$
I= \int_{0}^{1}\frac{\log(1+x)}{1+x^2}dx+\int_{0}^{1}\frac{\log(1-x)}{1+x^2}dx
$$
So I have only to evaluate $$I_{-}=\int_{0}^{1}\frac{\log(1-x)}{1+x^2}dx
$$ 
Using the expansion of the logarithm valid in the range of integration I can also write 
$$I_{-}=-\sum_{n\geq1}\frac{1}{n}\int_{0}^{1}\frac{x^n}{1+x^2}dx
$$
but then I can go any further because I can't find a simple solution that depend only on $n$ for the rational (and solvable) integral under the sum sign .
Maybe is simple to considerate instead of $ I_{-} $ the integral $\int_{0}^{1}\frac{\log(1-x^2)}{1+x^2}dx=I$ because it seems to me that $\int_{0}^{1}\frac{x^{2n}}{1+x^2}dx= \sum_{k=0}^{n-1} (\frac{(-1)^{n+k}}{2k+1} + \frac{\pi}{4}(-1)^n)$ but again I can go further.
Any help would be appreciated.
Thanks 
 [/INST] Yet another way is to use Feynman's trick of differentiating under the integral sign. Let
$$I(a) = \int_{-1}^1 \frac{\ln (1 + ax)}{1 + x^2} \, dx.$$
Note that $I(0) = 0$ and we require $I(1)$. Now
\begin{align}
I'(a) &= \int_{-1}^1 \frac{x}{(1 + ax)(1 + x^2)} \, dx\\
&= \frac{a}{1 + a^2} \int_{-1}^1 \frac{dx}{1 + x^2} + \frac{1}{1 + a^2} \int_{-1}^1 \frac{x}{1 + x^2} \, dx - \frac{a}{1 - a^2} \int_{-1}^1 \frac{dx}{1 + ax}\\
&= \frac{\pi a}{2(1 + a^2)} + \frac{1}{1 + a^2} \ln \left (\frac{1 - a}{1 + a} \right )
\end{align} 
Thus
\begin{align}
I(1) &= \frac{\pi}{4} \int_0^1 \frac{2a}{1 + a^2} \, da + \underbrace{\int_0^1 \ln \left (\frac{1 - a}{1 + a} \right ) \frac{da}{1 + a^2}}_{a \, \mapsto \, (1 - a)/(1 + a)}\\
&= \frac{\pi}{4} \ln 2 + \int_0^1 \frac{\ln a}{1 + a^2} \, da\\
&= \frac{\pi}{4} \ln 2 + \sum_{n = 0}^\infty (-1)^n \int_0^1 a^{2n} \ln x \, da\\
&= \frac{\pi}{4} \ln 2 + \sum_{n = 0}^\infty (-1)^n \frac{d}{ds} \left [\int_0^1 a^{2n + s} \, da \right ]_{s = 0}\\
&= \frac{\pi}{4} \ln 2 + \sum_{n = 0}^\infty (-1)^n \frac{d}{ds} \left [\frac{1}{2n + s + 1} \right ]_{s = 0}\\
&= \frac{\pi}{4} \ln 2 - \sum_{n = 0}^\infty \frac{(-1)^n}{(2n + 1)^2}\\
&= \frac{\pi}{4} \ln 2 - \mathbf{G}
\end{align}
</s>