How to evaluate $\int_{0}^{1}{\frac{x\ln(1+x)\ln(1+x^2)}{1+x^2}}dx$ 
How to evaluate
  $$\int_{0}^{1}{\frac{x\ln(1+x)\ln(1+x^2)}{1+x^2}}dx$$

My attempt
$$\begin{align}\int_{0}^{1}{\frac{x\ln(1+x)\ln(1+x^2)}{1+x^2}}dx&=\frac{1}{4}\int_{0}^{1}{\ln(1+x)}d(\ln^2(1+x^2))\\ &=\frac{1}{4}(\ln(1+x)\ln^2(1+x^2)|_0^1-\int_{0}^{1}{\ln^2(1+x^2)}d\ln(1+x))\\ &=\frac{1}{4}(\ln^32-\int_{0}^{1}\frac{\ln^2(1+x^2)}{1+x}dx)\\
\end{align}$$
$$\begin {align} 
&\int_{0}^{1} \frac{\ln ^{2}\left(1+x^{2}\right)}{1+x} d x\\=&\int_{0}^{1} \frac{\ln ^{2}\left(1-y^{2}\right)}{1+i y} i d y-\int_{0}^{\frac{\pi}{2}} \frac{\ln ^{2}\left(1+e^{i 2 \theta}\right)}{1+e^{i \theta}} i e^{i \theta} d\theta\\
=&\int_{0}^{1} \frac{y \ln ^{2}\left(1-y^{2}\right)}{1+y^{2}} dy+\frac{1}{2} \int_{0}^{\frac{\pi}{2}} \tan \left(\frac{\theta}{2}\right) \ln ^{2}(2 \cos \theta)d\theta+\int_{0}^{\frac{\pi}{2}} \theta \ln (2 \cos \theta)d\theta\\&-\frac{1}{2} \int_{0}^{\frac{\pi}{2}} \theta^{2} \tan \left(\frac{\theta}{2}\right)d\theta
 \end {align}$$

But how to evaluate
  $$\int_{0}^{1}\frac{\ln^2(1+x^2)}{1+x}dx$$

The answer from Mathematica is $$\frac{1}{96}(24\pi\mathbf{G}+\pi^2\ln2+8\ln^32-60\zeta(3))$$
$\mathbf{G}$ is Catalan's constant.
My answer


 A: I hope you won't mind my attempt to the indefinite integral using polylogarithms. NOT AN ANSWER
I re-wrote $\log^2(1+x^2)$ as
$$\log^2(1+ix)(1-ix)=\log^2(1+ix) + 2\log(1+ix)\log(1-ix) + \log^2(1-ix).$$
Therefore you can write
\begin{eqnarray}
\mathcal I &=& \int\frac{\log^2(1+x^2)}{1+x}dx=\\
&=& \underbrace{\int\frac{\log^2(1+ix)}{1+x}dx}_{\mathcal I_1} + 2\underbrace{\int\frac{\log(1+ix)\log(1-ix)}{1+x}dx}_{\mathcal I_2}+\\
& &+\underbrace{\int\frac{\log^2(1-ix)}{1+x}dx}_{\mathcal I_3}\tag{*}\label{3}
\end{eqnarray}
I first concentrated on the integral
$$\mathcal I_1 = \int \frac{\log^2(1+ix)}{1+x}dx$$
for which I used the change of variables
$$\omega = \frac{x+1}{2} -i \frac{x+1}{2},$$
that gives
$$ x = (1+i)\omega -1,$$
$$1+ix = (1-i)(\omega + 1),$$
and
$$dx = (1+i)d\omega.$$
So we get
\begin{eqnarray}
\mathcal I_1 &=& \int \frac{\left[\log(1-i)+\log(1+\omega)\right]^2}{\omega}d\omega=\\
&=&\log^2(1-i)\log \omega +2\log(1-i) \text{Li}_2(-\omega) +\underbrace{\int\frac{\text{Li}_1^2(-\omega)}{\omega}d\omega}_{\mathcal A(\omega)}.
\end{eqnarray}
Integrating by parts $\mathcal A$ yields
\begin{eqnarray}
\mathcal A(\omega) &=& \text{Li}_1^2(-\omega)\log(-\omega) + 2\int\frac{\text{Li}_1(-\omega)\log(-\omega)}{1+\omega}d\omega=\\
&=&\text{Li}_1^2(-\omega)\log(-\omega) + 2\int \text{Li}_1(-\omega)d\text{Li}_2(1+\omega)=\\
&=&\text{Li}_1^2(-\omega)\log(-\omega)+2\text{Li}_1(-\omega)\text{Li}_2(1+\omega) + 2\int \frac{\text{Li}_2(1+\omega)}{1+\omega}d\omega=\\
&=&\text{Li}_1^2(-\omega)\log(-\omega)+2\text{Li}_1(-\omega)\text{Li}_2(1+\omega) + \text{Li}_3(1+\omega).
\end{eqnarray}
Thus we get
\begin{eqnarray}
\mathcal I_1 &=&\log^2(1-i)\log \omega +2\log(1-i) \text{Li}_2(-\omega) +\\
&&+\text{Li}_1^2(-\omega)\log(-\omega)+2\text{Li}_1(-\omega)\text{Li}_2(1+\omega) + \text{Li}_3(1+\omega)
\end{eqnarray}
Now, using the same change of variable in $\mathcal I_3$ we get
\begin{eqnarray}
\mathcal I_3 &=&  \int \frac{\left[\log(1+i)+\log(1-i\omega)\right]^2}{\omega}d\omega=\\
&=&\log^2(1+i)\log \omega +2\log(1+i) \text{Li}_2(i\omega) +\underbrace{\int\frac{\text{Li}_1^2(i\omega)}{\omega}d\omega}_{\mathcal B(\omega)}.
\end{eqnarray}
Observe that
$$\mathcal B(\omega) = i\mathcal A(-i\omega).$$
Thus we can use the results already obtained to get
\begin{eqnarray}
\mathcal I_3 &=& \log^2(1+i)\log \omega +2\log(1+i) \text{Li}_2(i\omega) +\\
&&+i\text{Li}_1^2(i\omega)\log(i\omega)+2i\text{Li}_1(i\omega)\text{Li}_2(1-i\omega) + i\text{Li}_3(1-i\omega)
\end{eqnarray}
Again the same change on variables yields, for $\mathcal I_2$,
\begin{eqnarray}
\mathcal I_2 &=& \int\frac{[\log(1-i)+\log(1+\omega)][\log(1+i)+\log(1-i\omega)}{\omega}d\omega=\\
&=& \log 2 \log \omega + \log(i-1)\text{Li}_2(i\omega)+\\
&&+\log(i+1)\text{Li}_2(-\omega)+\underbrace{\int\frac{\log(1-i\omega)\log(1+\omega)}{\omega}d\omega}_{\mathcal C}.
\end{eqnarray}
$\mathcal C$ is the trickiest part. Haven't completed it yet.
A: You already used contour integration to split the integral into four parts:
$$\begin {align} 
&\int_{0}^{1} \frac{\ln ^{2}\left(1+x^{2}\right)}{1+x}dx\\
=&\int_{0}^{1} \frac{x \ln ^{2}\left(1-x^{2}\right)}{1+x^{2}} dx+\frac{1}{2} \int_{0}^{\pi/2} \tan \left(\frac{x}{2}\right) \ln ^{2}(2 \cos x)dx+\int_{0}^{\pi/2} x \ln (2 \cos x)dx\\&-\frac{1}{2} \int_{0}^{\pi/2} x^{2} \tan \left(\frac{x}{2}\right)dx
 \end {align}$$

Denote those four integrals by $I_1,\cdots, I_4$. 
$$I_1 = \frac{1}{2}\int_0^1 \frac{\ln^2(1-x)}{1+x}dx = \frac{1}{2}\int_0^1 \frac{\ln^2(x)}{2-x}dx = \text{Li}_3(\frac{1}{2}) = \frac{\ln^2 3}{6}-\frac{\pi^2}{12}\ln 2 +\frac{7}{8}\zeta(3)$$
For $I_2$, tangent-half substitution gives
$$I_2 = \int_0^1\frac{2t\ln^2(2\frac{1-t^2}{1+t^2})}{1+t^2}dt = \int_0^1 \frac{\ln^2(2\frac{1-t}{1+t})}{1+t}dt = \int_0^1 \frac{\ln^2 (2t)}{1+t}dt = \frac{3\zeta(3)}{2}+\ln^3 2 -\frac{\pi^2}{6}\ln 2$$
where the penultimate step involves $t\mapsto (1-t)/(1+t)$.
For $I_3$, integration by part gives
$$I_3 = \int_0^{\pi/2} (\frac{\pi}{2}-x)\ln(2\sin x) dx = -\frac{\pi^2}{8}\ln 2+\frac{1}{2}\int_0^{\pi/2} x^2 \cot x dx $$
Use the identity
$$\sum_{n=1}^N \sin(nx) = \frac{1}{2}\cot\frac{x}{2}-\frac{\cos(N+1/2)x}{2\sin(x/2)}$$
letting $N\to \infty$, and the remainder $\to 0$ by Riemann-Lebesuge lemma, so 
$$\int_0^{\pi/2} x^2\cot x dx = 2\sum_{n=1}^\infty \int_0^{\pi/2} x^2\sin(2nx) dx = \frac{\pi^2}{4}\ln 2 -\frac{7\zeta(3)}{8}$$ Note that each summand can be evaluated explicitly. Therefore $I_3 = -7\zeta(3)/16$.
For $I_4$, use the same identity, gives
$$I_4 = 2\sum_{n=1}^\infty \int_0^{\pi/2} x^2\sin[n(\pi-x)]dx = 2\sum_{n=1}^\infty (-1)^{n+1} \int_0^{\pi/2} x^2\sin (nx)dx$$ the series definition of Catalan constant immediately gives
$$I_4 = 2\pi G - \frac{21\zeta(3)}{8} - \frac{\pi^2}{4}\ln 2$$
Combining all these should give you the result.
