How to find $I=\int_0^1\frac{\arctan^2x}{1+x}\left(\frac{\ln x}{1-x}+\ln(1+x)\right)dx$

Partial solution:

$$\mathcal{I}=\int_0^1\frac{\arctan^2(x)\ln(x)}{1-x^2}dx+\int_0^1\frac{\arctan^2(x)\ln(1+x)}{1+x}dx$$

$$\mathcal{I}=\mathcal{I}_1+\mathcal{I}_2$$


Evaluation of $\mathcal{I}_2$:

Let $x\mapsto\frac{1-x}{1+x}$

$$\mathcal{I}_2=\int_0^1\arctan^2(x)\frac{\ln(1+x)}{1+x}dx=\int_0^1\left(\frac{\pi}{4}-\arctan(x)\right)^2\ \frac{\ln(2)-\ln(1+x)}{1+x}dx$$

$$=\ln(2)\underbrace{\int_0^1\frac{\left(\frac{\pi}{4}-\arctan(x)\right)^2}{1+x}dx}_{x\mapsto (1-x)/(1+x)}-\int_0^1\frac{\left(\frac{\pi}{4}-\arctan(x)\right)^2\ln(1+x)}{1+x}dx$$

if we expand the second integral we get a symmetry

$$2\mathcal{I}_2=\ln(2)\underbrace{\int_0^1\frac{\arctan^2(x)}{1+x}dx}_{IBP}-\frac{\pi^2}{16}\int_0^1\frac{\ln(1+x)}{1+x}dx+\frac{\pi}{2}\underbrace{\int_0^1\frac{\arctan(x)\ln(1+x)}{1+x}dx}_{IBP}$$

$$\small{2\mathcal{I}_2=\frac{\pi^2}{16}\ln^2(2)-2\ln(2)\int_0^1\frac{\arctan(x)\ln(1+x)}{1+x^2}dx-\frac{\pi^2}{32}\ln^2(2)+\frac{\pi^2}{16}\ln^2(2)-\frac{\pi}{4}\int_0^1\frac{\ln^2(1+x)}{1+x^2}dx}$$

$$\mathcal{I}_2=\frac{3\pi^2}{64}\ln^2(2)-\ln(2)\int_0^1\frac{\arctan(x)\ln(1+x)}{1+x^2}dx-\frac{\pi}{8}\int_0^1\frac{\ln^2(1+x)}{1+x^2}dx\tag1$$


For the first integral, we use the equality

$$\int_0^1\frac{\arctan(x)}{1+x^2}\ln\left(\frac{1+x^2}{1+x}\right)dx=\frac{3\pi^2}{64}\ln(2)-\frac{\pi}{8}G$$

which can be proved easily through $x\mapsto\frac{1-x}{1+x}.$

allowing us to write

$$\int_0^1\frac{\arctan(x)\ln(1+x)}{1+x^2}dx=\int_0^1\frac{\arctan(x)\ln(1+x^2)}{1+x^2}dx-\frac{3\pi^2}{64}\ln(2)+\frac{\pi}{8}G$$ where

$$\int_0^1\frac{\arctan(x)\ln(1+x^2)}{1+x^2}dx\overset{x=\tan(\theta)}{=}-2\int_0^{\pi/4} \theta\ln(\cos\theta)d\theta=\frac{21}{64}\zeta(3)+\frac{\pi^2}{16}\ln(2)-\frac{\pi}{4}G$$

where the last result follows from using the Fourier series of $$\ln(\cos x)=-\ln(2)-\sum_{n=1}^\infty \frac{(-1)^n\cos(2nx)}{n}$$

then

$$\int_0^1\frac{\arctan(x)\ln(1+x)}{1+x^2}dx=\frac{21}{64}\zeta(3)+\frac{\pi^2}{64}\ln(2)-\frac{\pi}{8}G\tag2$$

As for the second integral, it is already calculated here where some results of harmonic series were used:

$$\int_0^1\frac{\ln^2(1+x)}{1+x^2}\ dx=4\Im\operatorname{Li}_3(1+i)-\frac{7\pi^3}{64}-\frac{3\pi}{16}\ln^22-2G\ln2$$

but I don't think its a good idea to use this closed form as it has an imaginary term, so we better leave the integral as is hoping it cancels out with one of the sub-integrals of $$\mathcal{I}_1=\int_0^1\frac{\arctan^2(x)\ln(x)}{1-x^2}dx.$$


so by plugging $(2)$ in $(1)$ we get

$$\mathcal{I}_2=\frac{\pi^2}{32}\ln^2(2)-\frac{21}{64}\ln(2)\zeta(3)+\frac{\pi}{8}\ln(2)G-\frac{\pi}{8}\int_0^1\frac{\ln^2(1+x)}{1+x^2}dx$$


Continuing on @AliShather's argument, let's focus on the integral \begin{align*} I_1&=\int_0^1\frac{\arctan^2 x\ln x}{1-x^2}dx\\ &\overset{\rm IBP}=-\int_0^1\frac{\arctan^2 x\mathop{\rm artanh} x}{x}+2\underbrace{\frac{\arctan x\mathop{\rm artanh} x \ln x}{1+x^2}}_{x\mapsto \frac{1-x}{1+x}}dx\\ &=-\int_0^1\frac{\arctan^2 x\mathop{\rm artanh} x}{x}-2{\frac{\left(\arctan x-\frac{\pi}{4}\right)\mathop{\rm artanh} x \ln x}{1+x^2}}dx\\ &=-\int_0^1\frac{\arctan^2 x\mathop{\rm artanh} x}{x}dx-\frac{\pi}{4}\int_0^1\frac{\mathop{\rm artanh} x\ln x}{1+x^2}dx\\ &=-A-\frac{\pi}{4}B \end{align*} where $\mathop{\rm artanh}x=\frac{1}{2}\ln\left(\frac{1+x}{1-x}\right)$.

By converting into multiple integrals then integrating back, \begin{align*} A&=\int_{[0,1]^4}\frac{x^2}{\left(1-s^2x^2\right)\left(1+t^2x^2\right)\left(1+u^2x^2\right)}dV\\[3px] &=\mbox{*Partial fractions*}\\[3px] &=-\int_0^1\frac{\mathop{\rm artanh}x}{x}\left(2\arctan x-\arctan\frac{1}{x}\right)\arctan\frac{1}{x}\,dx\\ &=-\frac{\pi^4}{64}+\pi\underbrace{\int_0^1\frac{\arctan x \mathop{\rm artanh}x}{x}dx}_{J} \end{align*} where we used the identity $\arctan x+\arctan\frac{1}{x}=\frac{\pi}{2}$.

By $x\mapsto\frac{1-x}{1+x}$, $$J=\int_0^1\frac{\left(\arctan x-\frac\pi 4\right)\ln x}{1-x^2}dx=\frac{\pi^3}{32}+\int_0^1\frac{\arctan x\ln x}{1-x^2}dx$$ Then by using IBP directly to J, \begin{align*} J&=-\int_0^1\frac{\arctan x\ln x}{1-x^2}+\frac{\mathop{\rm artanh}x \ln x}{1+x^2}dx\\&=\frac{\pi^3}{64}-\frac{1}{2}\underbrace{\int_0^1\frac{\mathop{\rm artanh}x \ln x}{1+x^2}dx}_B \end{align*}

By here, $$I_1=\frac\pi 4 B=\frac{3\pi^4}{256}-\frac{G\pi\ln 2}{4}-\frac \pi 2\mathfrak{I}\mathop{\rm Li_3}\frac{1+i}{2}+\frac{\pi^2\ln^2 2}{64}$$

Finally using the closed form of $I_2$ by @AliShather and $I=I_1+I_2$ we should get the desired identity, where of course the closed form of B was not necessary and can be replaced by the partial steps used in the evaluation of B.