Part I
This is a long answer, beyond the allowed maximal size = 30K characters.
So i had to split it.
It's because of the question, but also because details for the performed steps are given, hoping that the text should be accesible, up to some complex analysis issues, to a wider circle of readers. The reader in hurry may want to skip long computations, if she or he knows the pattern.
Also computer checks are provided, so that there is (i.e. was for me while typing) an immediate confirmation for the displayed results.
I will use sage for exact computations, and
pari/gp for quick numerical checks. Most of the time for myself, to have an in between check, and further type with confidence.
(Many arguments were done on paper days before, today i would maybe reshape 80 percent, but time... And maybe it is good to see a bloody computation, there is else too much refactored to fit in a few lines.)
I will use $\operatorname{Li}_1$ for the function $x\to-\log(1-x)$, which has the Taylor expansion
$$
\tag{1}
\operatorname{Li}_1(x) :=
\frac x1+\frac {x^2}2+\frac{x^3}3+\dots
$$
around zero, thus motivating the notation.
There is indeed an "idea" of computation, that can be isolated below:
Use the known primitive to integrate expressions like $\frac 1{x-a}\log^2x$ and $\frac1{x-a}\log^3 x$, then use "polarization"
to obtain $AB$ from the squares $A^2, B^2, (A-B)^2$.
(Doing the same with $A^2B$ and/or $AB^2$ to be obtained from the cubes
$A^3, B^3, (A\pm B)^3$, yes, it is possible. But the integrals
corresponding to $(A\pm B)^3$ are not in the same time easy.)
My feeling of progress decided only when to use a substitution or partial integration or something else, so that integrals of these
functions show up. When they show up, we proceed almost algorithmically.
We define the level of complexity of an integral involving polylog factors
like
$\operatorname{Li}_1(s)$ (or $-\log(1-s)$),
$\operatorname{Li}_2(s)$,
$\operatorname{Li}_3(s)$,
$\operatorname{Li}_4(s)$,
and so on,
by adding the "complexities" of the factors, which are $1,2,3,4,$ and so on. Instead of $s$ we may have an other argument, a rational function of
$s$, usually $\pm s$ or $1\pm s$, et caetera.
As orientation, the following ideas to proceed (somehow) were applied.
Dilogarithm identities are used. For instance:
$$
\tag{2}
$$
$$
\begin{aligned}
\operatorname{Li}_2(x) + \operatorname{Li}_2(-x) &= \operatorname{Li}_2(x^2)\ ,\\
\operatorname{Li}_2(x) + \operatorname{Li}_2(1-x) &= -\log(x) \log(1-x)+\frac 16\pi^2\ ,\\
\end{aligned}
$$
(and combinations of them).
Integrals involving trigonometric expressions in $\sin x$, $\cos x$ may be reshaped using the standard substitution $t = \tan\frac x2$. Then we have formally:
$$
\tag{3}
\tan\frac x2 = t\ ,\
x = 2\arctan t \ ,\
dx =\frac{2\; dt}{1+t^2}\ ,\
\sin x=\frac {2t}{1+t^2}\ ,\
\cos x=\frac{1-t^2}{1+t^2}\ ,
$$
(and so on).
We would like to replace the factor $\operatorname{Li}_2(\cos x)$ of some integral, if possible, with the factor $(\operatorname{Li}_2(\cos x)+\operatorname{Li}_2(-\cos x))$. Then in case of a partial integration w.r.t. "other factors", there is a passage to
$$
\tag{4}
\Big(\ \operatorname{Li}_2(\cos x)+\operatorname{Li}_2(-\cos x)\ \Big)'
=
-\sin x\cdot\Big(\ \operatorname{Li}_1(\cos x)-\operatorname{Li}_2(-\cos x)\ \Big)
\\
=
-\sin x\log\frac{1-\cos x}{1+\cos x}\ ,
$$
and the last expression introduces a "simple $\log$ factor" using the above substitution, since $\frac{1-\cos x}{1+\cos x}
=
\frac{(1+t^2)-(1-t^2)}{(1+t^2)+(1-t^2)}=t^2$.
We try to isolate expressions to be integrated like $\frac 1{x-a}\log(x-b)\log(x-c)$. In case of $b=c$ (and
thus further without restriction $b=c=0$) there is for instance an explicit primitive function:
$$
\tag{5}
G_a(x)
=
\int_0^x\frac{\log^2 t}{t-a}\; dt
=
-\log^2x\cdot\operatorname{Li}_1\left(\frac xa\right)
+2\log x\cdot\operatorname{Li}_2\left(\frac xa\right)
-2\operatorname{Li}_3\left(\frac xa\right)\ .
$$
For different values $b,c$, we may use the "polarization" $BC=\frac 12(B^2+C^2-(B-C)^2)$, with $B=\log(x-b)$, $C=\log(x-c)$.
Note that in the formula for $G_a$, when $x=0$ is plugged in, each $\log x$ is joined with an $O(x)$-function, so the limit is zero. Also, if we plug in $x=1$, then the $\log$-terms are zero, so there is only a contribution from the trilogarithm.
Not used, but it should be recorded here. There is a similar formula for the integral involving $\log^3 t$ (instead of $\log^2t$):
$$
\tag{6}
\int_0^x\frac{\log^3 t}{t-a}\; dt
=
-\log^3x\cdot\operatorname{Li}_1\left(\frac xa\right)
+3\log^2 x\cdot\operatorname{Li}_2\left(\frac xa\right)
+6\log x\cdot\operatorname{Li}_3\left(\frac xa\right)
+6\operatorname{Li}_4\left(\frac xa\right)\ .
$$
To cover products of the shape $B^2C$ with $B,C$ as above, one can use $3(B^2C+BC^2)=(B+C)^3-B^3-C^3$ and $3(B^2C-BC^2)=-(B-C)^3+B^3-C^3$.
The $\arctan$ is also a "kind of logarithm". To make this specific, write
$\frac 1{x^2+1}=\frac 1{2i}\left(\frac1{x-i}-\frac 1{x+i}\right)$, and integrate.
So, formally, $\arctan x=\frac 1{2i}\log \frac {1+it}{1-it}$.
In particular, its "complexity" is also $1$, as the complexity of the $\log$.
Not used, but it should be mentioned here: Parallel to the above relations, we record here:
$$
\tag{7}
$$
$$
\begin{aligned}
\int\frac{\log^2 (x-a)}{1+x^2}\; dx
&=
\log^2(x-a)\cdot(\arctan x-\arctan a)
\\
&\qquad\qquad
+i\log (x-a)\cdot\operatorname{Li}_2\left(\frac {a-x}{a+i}\right)
-i\log (x-a)\cdot\operatorname{Li}_2\left(\frac {a-x}{a-i}\right)
\\
&\qquad\qquad
-i\operatorname{Li}_3\left(\frac {a-x}{a+i}\right)
+i\operatorname{Li}_3\left(\frac {a-x}{a-i}\right)
+C\ ,
\\
\int\frac{\log^3 (x-a)}{1+x^2}\; dx
&=
\log^3(x-a)\cdot(\arctan x-\arctan a)
\\
&\qquad\qquad
+\frac 32i\log^2 (x-a)\cdot\operatorname{Li}_2\left(\frac {a-x}{a+i}\right)
-\frac 32i\log^2 (x-a)\cdot\operatorname{Li}_2\left(\frac {a-x}{a-i}\right)
\\
&\qquad\qquad
-3i\log(x-a)\cdot\operatorname{Li}_3\left(\frac {a-x}{a+i}\right)
+3i\log(x-a)\cdot\operatorname{Li}_3\left(\frac {a-x}{a-i}\right)
\\
&\qquad\qquad
+3i\operatorname{Li}_4\left(\frac {a-x}{a+i}\right)
-3i\operatorname{Li}_4\left(\frac {a-x}{a-i}\right)
+C\ ,
\end{aligned}
$$
It is favorable to compute here formally the integral mentioned above in a relatively general case.
We use the notation $I_A^B(0,b;a)$. The variables $A,B;b;a$ may be complex numbers.
(In case an evaluation for specific values does not make sense, consider the limit for $A,B$ in the expression.
The computation is formal since we do not care which branch of the one or other logarithm is taken. We use one branch,
so that computations make sense. If i am careless, there is a discrete monodromy introduced, also for this reason, there is always a numerical check below.)
$$
\tag{8}
$$
$$
\begin{aligned}
I_A^B(0,b;a)
&:=
\int_A^B\log(t-0)\log(t-b)\cdot\frac 1{t-a}\; dt
\\
&=
\frac 12\int_A^B\Big( \ \log^2 t + \log^2(t-b) - \log^2\frac t{t-b}\ Big)\cdot\frac 1{t-a}\; dt
\ .
\\
&\qquad\text{And now using the primitive function $G_a$ above}
\\
\int_A^B\frac {\log^2 t}{t-a}\; dt
&= [\ G_a(t)\ ]_A^B=G_a(B)-G_a(A)\ ,
\\
\\
\int_A^B\frac {\log^2 (t-b)}{t-a}\; dt
&=
\int_A^B\log^2 u\cdot\frac 1{u-(a-b)}\; du
\\
&=[\ G_{a-b}(t)\ ]_A^B=G_{a-b}(B)-G_{a-b}(A)\ ,
\\
\int_A^B\frac {\log^2 \frac t{t-b}}{t-a}\; dt
&=
\int_{A/(A-b)}^{B/(B-b)}
\log^2 u\frac 1{\frac {ub}{u-1}-a}\cdot\frac{-b}{(u-1)^2}\; du
\\
&=
\int_{A/(A-b)}^{B/(B-b)}
\log^2 u\frac 1{\frac {ub}{u-1}-a}\cdot\frac{-b}{(u-1)^2}\; du
\\
&=
\int_{A/(A-b)}^{B/(B-b)}
\log^2 u\left(\frac 1{u-\frac a{a-b}} - \frac 1{u-1}\right)\; du
\\
&=
[\ G_{a/(a-b)}(t)\ ]_{A/(A-b)}^{B/(B-b)}
-
[\ G_1(t)\ ]_{A/(A-b)}^{B/(B-b)}\ .
\end{aligned}
$$
The given integral can be reshaped as an integral on the one of the intervals $[0,1]$ or $[-1,0]$ or $[0,\infty)$ or... from functions having the complexity at most $3$. Integrals like
$\int_0^1R(t)\log t\; dt$ with a rational function $R$ are considered to be "easy". Its complexity is one. Integrals like
$\int_0^1R(r)\log(1\pm t)\log t\; dt$
or like
$\int_0^1R(r)\arctan t\log t\; dt$
have complexity two, and using $(8)$, they are feasible. It turns out, that such integrals, together with the integral of felt complexity three
$$
K=
\int_0^1\arctan^2 t\cdot \log t\cdot\frac2{1-t^2}\; dt
$$
are enough to solve the issue.
For the integral $K$ displayed above i had to use unusual ideas, so that it is rewritten to have complexity two. This is the only original point
in this answer, else the story is part of the folklore.)
Note that many "pieces" in the final answer are "polylogarithmic periods". For instance $G=\Im\operatorname{Li}_2(i)$. See for instance:
Catalan's constant
- In the same link, there is a trilogarithmic expression, mentioned to have a "simple answer":
$$\frac 1{1^3}-\frac 1{3^3}+\frac 1{5^3}-\frac 1{7^3}+\dots
=\Im\operatorname{Li}_3(i)=\frac 1{32}\pi^3\ .$$
We start the computation, and "do something" first.
The substitution $t=\arctan(x/2)$ needs a smaller interval. So
we shift as a first step the integration from $[0,2\pi]$ to the symmetric
interval $[-\pi,\pi]$, breaking it into even and odd pieces, the odd part vanishes, the even part is twice the integral on $[0,\pi]$.
Let $J$ be the value of the integral to be computed. Then:
$$
\tag{9}
$$
$$
\begin{aligned}
J
&=
\int_0^{2\pi}x^2\;\cos x\; \operatorname{Li}_2(\cos x)\;dx
\\
&=
\int_{-\pi}^{\pi}(x+\pi)^2\;\cos(x+\pi)\; \operatorname{Li}_2(\cos (x+\pi))\;dx
\\
&=
-\int_{-\pi}^{\pi}(x^2+\underbrace{2\pi x}_{\text{odd}}+\pi^2)\;\cos x\; \operatorname{Li}_2(-\cos x)\;dx
\\
% &=
% -\int_{-\pi}^{\pi}x^2\;\cos x\; \operatorname{Li}_2(-\cos x)\;dx
% -\pi^2\int_{-\pi}^{\pi}\cos x\; \operatorname{Li}_2(-\cos x)\;dx
% \\
&=
2
\underbrace{
\int_0^{\pi}-x^2\;\cos x\; \operatorname{Li}_2(-\cos x)\;dx
}_{J_1}
+
2\pi^2
\underbrace{
\int_0^{\pi}-\cos x\; \operatorname{Li}_2(-\cos x)\;dx
}_{J_2}
\\
&=2J_1+2\pi^2 J_2\ .
\end{aligned}
$$
Here, after changing $x\to\pi-x$ we have
$$
\tag{10}
J_2
=
\int_0^{\pi}-\cos x\; \operatorname{Li}_2(-\cos x)\;dx
=
\int_0^{\pi}\cos x\; \operatorname{Li}_2(\cos x)\;dx
=\frac 12\pi^2-\pi\ .
$$
Thus $J_1$ gives the complexity.
For $J_2$, explicitly:
$$
\tag{11}
$$
$$
\begin{aligned}
J_2
&=
\int_0^{\pi/2}\cos x\; \operatorname{Li}_2(\cos x)\;dx
+
\int_0^{\pi/2}\cos (\pi-x)\; \operatorname{Li}_2(\cos(\pi-x))\;dx
\\
&=
\Big[\sin x \operatorname{Li}_2(\cos x)\Big]_0^{\pi/2}
-
\int_0^{\pi/2}\sin x\cdot\frac 1{\cos x}
\operatorname{Li}_1(\cos x)\cdot(-\sin x)\; dx
\\
&\qquad
-\Big[\sin x \operatorname{Li}_2(-\cos x)\Big]_0^{\pi/2}
+\int_0^{\pi/2}\sin x\cdot\frac 1{-\cos x}
\operatorname{Li}_1(-\cos x)\cdot(-\sin x)\; dx
\\
&=\int_0^{\pi/2}\frac {\sin^2 x}{\cos x}
\log\frac{1+\cos x}{1-\cos x}\; dx
\\
&\qquad\text{and with $t=\tan\frac x2$, $x=2\arctan t$, $dx=\frac2{1+t^2}\; dt$,
$\sin x=\frac {2t}{1+t^2}$, $\cos x=\frac{1-t^2}{1+t^2}$}
\\
&=
\int_0^1\frac{4t^2}{(1+t^2)^2}\cdot\frac{1+t^2}{1-t^2}
\cdot\log\left(\frac{(1+t^2)+(1-t^2)}{(1+t^2)-(1-t^2)}\right)
\cdot\frac 2{1+t^2}\; dt
\\
&=
-\int_0^1\frac{8t^2}{(1+t^2)^2(1-t^2)}\cdot\log t^2\; dt
\\
&=
2\int_0^1\left(\frac {2t}{1+t^2}+\log(1-t) - \log(1+t)\right)'
\log t\; dt
\\
&=
-2\int_0^1
\left(\frac {2t}{1+t^2}+\log(1-t) - \log(1+t)\right)\;\frac 1 t
\; dt
\\
&=-4\arctan\Big|_0^1 +2\Big[\operatorname{Li}_2(t) - \operatorname{Li}_2(-t)\Big]_0^1
\\
&=-\pi +\frac 12\pi^2\ .
\end{aligned}
$$
Here,
$\operatorname{Li}_2(1)=\zeta(2)=\frac 16\pi^2$.
And
$\operatorname{Li}_2(-1)=-\operatorname{Li}_2(1)+\frac 12\operatorname{Li}_2(1^2)=
-\frac 1{12}\pi^2$.
Computer check for the value of $J_2$. I will use pari/gp for this.
There are some issues near $0$ and $\pi$, so i will integrate numerically on some interval $[\epsilon, \pi-\epsilon]$.
? \p 50
realprecision = 57 significant digits (50 digits displayed)
? eps = 0.000008;
? J2approx = intnum( x=eps, Pi-eps, cos(x)*dilog(cos(x)) )
%133 = 1.7931898077460863662640447913454517588781602204055
? Pi^2/2 - Pi
%134 = 1.7932095469548860709546021166585726834596803042453
? J2rewritten = intnum( x=0, Pi/2, sin(x)^2/cos(x) * log( (1+cos(x))/(1-cos(x)) ) )
%135 = 1.7932095469548860709546021166585726834596803042453
? J2rewritten2 = -intnum( t=0, 1, 16*t^2/(1+t^2)^2/(1-t^2) * log(t) )
%136 = 1.7932095469548860709546021166585726834596803042453
So the value $\frac 12\pi^2-\pi$ is numerically validated, it is the only way to check using pari/gp.
Using sage, we can "compute" / request an exact value:
sage: var('t');
sage: integral( -16*t^2 / (1+t^2)^2 / (1-t^2) * log(t), t, 0, 1 )
-pi + 1/2*pi^2
sage: integral( sin(x)^2/cos(x) * log( (1+cos(x))/(1-cos(x)) ), x, 0, pi/2 )
-pi + 1/2*pi^2
(Although for the initial form of the integral there are some maxima questions.)
So the integral $J_1$ is the issue.
I will use for the dilog term the identity
$
\operatorname{Li}_2(s)+
\operatorname{Li}_2(-s)=
\frac 12\operatorname{Li}_2(s^2)
$, thus obtaining in part a similar grouping of $\operatorname{Li}_2(\cos x)-\operatorname{Li}_2(-\cos x)$, which is favorable.
$$
\tag{12}
$$
$$
\begin{aligned}
J_1
&=
\int_0^{\pi}-x^2\;\cos x\; \operatorname{Li}_2(-\cos x)\;dx
\\
&=
\frac 12
\int_0^{\pi}-x^2\;\cos x\; \operatorname{Li}_2(-\cos x)\;dx
+
\frac 12
\int_0^{\pi}-x^2\;\cos x\; \operatorname{Li}_2(-\cos x)\;dx
\\
% &=
% \frac 12
% \int_0^{\pi}x^2\;\cos x\; \operatorname{Li}_2(\cos x)\;dx
% +
% \frac 12
% \int_0^{\pi}-x^2\;\cos x\; \operatorname{Li}_2(-\cos x)\;dx
% \\
% &\qquad\qquad
% -\frac 14
% \int_0^{\pi}x^2\;\cos x\; \operatorname{Li}_2(\cos^2 x)\;dx
% \\
&=
\frac 12
\underbrace{
\int_0^{\pi}x^2\;\cos x\; \Big(
\operatorname{Li}_2(\cos x)
- \operatorname{Li}_2(-\cos x)
\Big)
\;dx}_{J_{11}}
\\
&\qquad\qquad
-\frac 14
\underbrace{
\int_0^{\pi}x^2\;\cos x\; \operatorname{Li}_2(\cos^2 x)\;dx
}_{J_{12}}
\\
&=\frac 12 J_{11}-\frac 14 J_{12}\ .
\end{aligned}
$$
Here is a numerical check for the above equality.
eps = 0.000008;
J1 = intnum( x=eps, Pi-eps, -x^2 * cos(x) * dilog(-cos(x)) );
J11 = intnum( x=eps, Pi-eps, x^2 * cos(x) * ( dilog(cos(x)) - dilog(-cos(x)) ) );
J12 = intnum( x=eps, Pi-eps, -x^2 * cos(x) * dilog( cos(x)^2 ) );
And with the above variables, the difference is in the range of the used precision...
? J1 - J11/2 - J12/4
%197 = 3.186183822264904554 E-58
Let us compute the "simpler" integral from above, $J_{12}$, first. We have:
$$
\tag{13}
$$
$$
\begin{aligned}
J_{12}
&=
\int_0^\pi x^2\;\cos x\; \operatorname{Li}_2(\cos^2 x)\;dx
\\
&=
\int_0^\pi (\ 2x\cos x + (x^2-2)\sin x\ )'\; \operatorname{Li}_2(\cos^2 x)\;dx
\\
&=2\pi\cos \pi\operatorname{Li}_2(1)
-
\int_0^\pi (\ 2x\cos x + (x^2-2)\sin x\ )\; \frac 1{\cos^2 x}\operatorname{Li}_1(\cos^2 x)\cdot (\cos^2 x)'\;dx
\\
&=-\frac 13\pi^3
-
2\int_0^\pi (\ 2x\cos x + (x^2-2)\sin x\ )\; \frac {\sin x}{\cos x}\log(\sin^2 x)\;dx
\\
&=
-\frac 13\pi^3
-
8\underbrace{\int_0^\pi x\sin x\log \sin x\;dx}_{\pi(\log 2-1)}
\\
&\qquad\qquad
-
4\int_0^\pi x^2\frac {\sin^2 x}{\cos x}\log \sin x\;dx
+
8\underbrace{
\int_0^\pi \frac {\sin^2 x}{\cos x}\log\sin x\;dx
}_{0\text{ via }x\to\pi-x}
\\
&=
-\frac 13\pi^3
-8\pi\log 2+8\pi
-2\int_0^\pi (x^2-(\pi-x)^2)\frac {\sin^2 x}{\cos x}\log \sin x\;dx
\\
&=
-\frac 13\pi^3
-8\pi\log 2+8\pi
-4\pi\underbrace{\int_0^\pi x\frac {\sin^2 x}{\cos x}\log \sin x\;dx}_{J_{121}}
\\
&=
-\frac 13\pi^3
-8\pi\log 2+8\pi
-
4\pi J_{121}\ ,\text{ where}
\\[2mm]
%
J_{121}
&:=\int_0^\pi x\;\frac {\sin^2 x}{\cos x}\;\log \sin x\;dx
\\
&=-\int_{-\pi/2}^{\pi/2} \left(x+\frac\pi 2\right)\;\frac {\cos^2 x}{\sin^2 x}\;\log \cos x\;\cdot\;\sin x\;dx
\\
&=-\int_{-\pi/2}^{\pi/2} x\;\frac {\cos^2 x}{\sin^2 x}\;\log \cos x\;\cdot\;\sin x\;dx
\\
&=2\int_0^{\pi/2} x\;\frac {\cos^2 x}{\sin^2 x}\;\log \cos x\;\cdot\;d(\cos x)
\\
&=
2\int_1^0 \arccos t\frac{t^2}{1-t^2}\log t\; dt
\\
&=
\int_0^1 2\arccos t\;\frac {(1-t^2)-1}{1-t^2}\;\log t\;dt
\\
&=
\underbrace{\int_0^1 2\arccos t\log t\;dt}_{2\log 2-4}
-
\int_0^1 \arccos t\left(\frac 1{1-t}+\frac 1{1+t}\right)\log t\;dt
\\
&= 2\log2-4
-
\int_0^1 \arccos t\;
(\operatorname{Li}_2(1-t))'\; dt
\\
&\qquad\qquad
+
\int_0^1 \arccos t\;
(\operatorname{Li}_2(1+t))'\; dt
-
\log(-1)
\int_0^1 \arccos t\cdot \frac 1{1+t}\; dt
\\
&=2\log2-4
-\arccos 0\cdot\operatorname{Li}_2(1)
\\
&\qquad\qquad
-
\int_0^1 \frac{\operatorname{Li}_2(1-t)}{\sqrt{1-t^2}}\; dt
+\arccos 0\cdot\operatorname{Li}_2(1)
+
\Re\int_0^1 \frac{\operatorname{Li}_2(1+t)}{\sqrt{1-t^2}}\; dt
\\
&=2\log2-4
-
\int_0^{\pi/2} \frac{\operatorname{Li}_2(1-\cos u)}{\sin u}\; \sin u\;du
+
\Re\int_0^{\pi/2} \frac{\operatorname{Li}_2(1+\cos u)}{\sin u}\; \sin u\; du
\\
&=
2\log2-4
-
\int_0^{\pi/2} \operatorname{Li}_2(1-\cos u)\; du
+
\Re\int_0^{\pi/2} \operatorname{Li}_2(1+\cos u)\; du
\\
&\qquad\text{ and with }
\operatorname{Li}_2(1-c) = -\operatorname{Li}_2(c) + \frac 16\pi^2 -\log(c)\log(1-c)\ ,\\
\\
&\qquad\text{ and with }
\operatorname{Li}_2(1+c) = -\operatorname{Li}_2(-c) + \frac 16\pi^2 -\log(-c)\log(1+c)\ ,\\
\\
&=
2\log2-4
+
\underbrace{
\int_0^{\pi/2} \operatorname{Li}_2(\cos u)\; du
-
\int_0^{\pi/2} \operatorname{Li}_2(-\cos u)\; du
}_{J_{1211}}
\\
&\qquad\qquad
+
\underbrace
{\int_0^{\pi/2} \log\cos u\cdot\log\frac {1-\cos u}{1+\cos u}\; du
}_{J_{1212}}
\ .
\end{aligned}
$$
Well, $J_{1212}$ can be computed "algorithmically", so we eliminate this from the task list first.
Recall, we have a formula to integrate expressions like $\frac 1{x-a}\log^2 x$. Using "polarization",
products $AB$ of different logarithms $A=\log(x-a)$ and $B=\log(x-b)$, can be reshaped to products of the "same" log, use
$AB=\frac 12(A^2+B^2-(A-B)^2)$. This gives:
$$
\begin{aligned}
J_{1212}
&=\int_0^{\pi/2} \log\cos u\cdot\log\frac {1-\cos u}{1+\cos u}\; du\\
&=\int_0^1 \log\frac{1-t^2}{1+t^2}\cdot\log\frac {(1+t^2)-(1-t^2)}{(1+t^2)+(1-t^2)}\; \frac 2{1+t^2}\; dt\\
&=
4\int_0^1 \frac{\log(1-t)\cdot\log t}{1+t^2}\; dt
+4\int_0^1 \frac{\log(1+t)\cdot\log t}{1+t^2}\; dt
-4\int_0^1 \frac{\log(1+t^2)\cdot\log t}{1+t^2}\; dt
\\
&=
4\left(
-\frac 1{128}\pi^3-\frac 1{32}\pi\log^2 2+\Im\operatorname{Li}_3\left(\frac {1+i}2\right)
\right)
+
4
\left(
+\frac {11}{128}\pi^3+\frac 3{32}\pi\log^2 2-2G\log 2-3\Im\operatorname{Li}_3\left(\frac {1+i}2\right)
\right)
\\
&\qquad\qquad
-
4\left(
-\frac {2}{128}\pi^3-\frac 2{32}\pi\log^2 2-G\log 2+2\Im\operatorname{Li}_3\left(\frac {1+i}2\right)
\right)
\\
&=
\frac 38\pi^3
+\frac 12\pi\log^2 2
-4G\log2
-16\Im\operatorname{Li}_3\left(\frac {1+i}2\right)\ .
\end{aligned}
$$
Numerical check:
i = I; pi = Pi; G = imag(dilog(i));
J1212 = intnum( u=0, pi/2, log(cos(u)) * log( (1-cos(u)) / (1+cos(u)) ) );
J1212_claimed = 3/8 * pi^3 + 1/2*pi*log(2)^2 - 4*G*log(2) - 16*imag(polylog(3, (1+i)/2 ));
? J1212
%187 = 0.72121319477695937923367893878228892950489772911404
? J1212_claimed
%188 = 0.72121319477695937923367893878228892950489772911404
To see that we have played a "purely linear game" with (5), here are some computational details.
We tacitly use $\frac 1{t^2+1}=\frac 1{2i} \left(\frac1{t-i}-\frac 1{t+i}\right)$.
$$
\begin{aligned}
\int_0^1 \frac{\log^2 t}{1+t^2}\; dt
&=
\frac 1{2i}\left(
\int_0^1 \frac{\log^2 t}{t-i}\; dt
-
\int_0^1 \frac{\log^2 t}{t+i}\; dt
\right)
\\
&=\frac 1{2i}\Big[\ G_i(t)-G_{-i}(t)\ \Big]_0^1
\\
&=\frac 1{2i}\Big[\ G_i(1)-G_{-i}(1)\ \Big]
\\
&=\frac 1{2i}\left[\
-2\operatorname{Li}_3\left(\frac 1i\right)
+2\operatorname{Li}_3\left(\frac 1{-i}\right)
\ \right]
\\
&=2\Im \operatorname{Li}_3(i)
\\
&=2\cdot \frac 1{32}\pi^3=\frac 1{16}\pi^3\ .
\end{aligned}
$$
Also:
$$
\begin{aligned}
\int_0^1 \frac{\log^2 (1-t)}{1+t^2}\; dt
&=
\frac 1{2i}\left(
\int_0^1 \frac{\log^2 t}{1-t-i}\; dt
-
\int_0^1 \frac{\log^2 t}{1-t+i}\; dt
\right)
\\
&=
\frac 1{2i}\left(
-
\int_0^1 \frac{\log^2 t}{t-(1-i)}\; dt
+
\int_0^1 \frac{\log^2 t}{t-(1+i)}\; dt
\right)
\\
&=\frac 1{2i}\Big[\ G_{1+i}(t)-G_{1-i}(t)\ \Big]_0^1
\\
&=\frac 1{2i}\Big[\ G_{1+i}(1)-G_{1-i}(1)\ \Big]\ ,
\\
&=\frac 1{2i}\left[\
-2\operatorname{Li}_3\left(\frac 1{1+i}\right)
+2\operatorname{Li}_3\left(\frac 1{1-i}\right)
\ \right]
\\
&=2\Im \operatorname{Li}_3\left(\frac {1+i}2\right)
\ .
\end{aligned}
$$
And finally, with the substitution $u=t/(1-t)$:
$$
\begin{aligned}
&\!\!\!\int_0^1 \frac{\log^2 (t/(1-t))}{1+t^2}\; dt
\\
&=
\int_0^\infty \frac{\log^2 u}{1+\frac{u^2}{(1+u)^2}}\; \frac 1{(1+u)^2}\;du
\\
&=
\int_0^1 \frac{\log^2 u} {(1+u)^2+u^2}\;du
+
\int_1^\infty \frac{\log^2 u} {(1+u)^2+u^2}\;du
\\
&=
\int_0^1 \frac{\log^2 u} {(1+u)^2+u^2}\;du
+
\int_0^1 \frac{\log^2 u} {(u+1)^2+1^2}\;du
\\
&=
\int_0^1 \log^2 u\frac 1{2i}\left( \frac 1{u-\frac12(-1+i)} - \frac 1{u-\frac12(-1-i)} \right)\;du
\\
&\qquad\qquad
+
\int_0^1 \log^2 u\frac 1{2i}\left( \frac 1{u-(-1+i)} - \frac 1{u-(-1-i)} \right)\;du
\\
&=
\frac 1{2i}\Big[\ G_{(-1+i)/2}(t) - G_{(-1-i)/2}(t)\ \Big]_0^1
+
\frac 1{2i}\Big[\ G_{-1+i}(t) - G_{-1-i}(t)\ \Big]_0^1
\\
&=
\frac 1{2i}\left(
\
2\operatorname{Li}_3\left(\frac 2{-1-i}\right)
-
2\operatorname{Li}_3\left(\frac 2{-1+i}\right)
+
2\operatorname{Li}_3\left(\frac 1{-1-i}\right)
-
2\operatorname{Li}_3\left(\frac 1{-1+i}\right)
\ \right)
\\
&=
2\Im\operatorname{Li}_3\left(-1+i\right)
+
2\Im\operatorname{Li}_3\left(\frac {-1+i}2\right)
\qquad(z=1-i)
\\
&=
2\Im\Big(\
\operatorname{Li}_3(-z) -
\operatorname{Li}_3(-z^{-1})\ \Big)
=
2\Im\left(-\frac16\log^3 z-\frac 16\pi^2\log z\right)=\dots
\ .
\end{aligned}
$$
(So $\log 2$ and $\pi$ show up soon.)
Here is a quick numerical test for the above. (So that i can further type.)
? intnum( t=0, 1, log(t)^2 / (1+t^2) )
%231 = 1.9378922925187387609672696916938372001390805353678
? Pi^3/16
%232 = 1.9378922925187387609672696916938372001390805353678
? intnum( t=0, 1, log(1-t)^2 / (1+t^2) )
%233 = 1.1401548141775379563912195151801491021262916198375
? 2*imag( polylog(3, (1+i)/2) )
%234 = 1.1401548141775379563912195151801491021262916198375
? intnum( t=0, 1, log( t/(1-t) )^2 / (1+t^2) )
%235 = 2.5167020943309544685663530996649317514086075354493
? 2*imag( polylog(3, -1+i) + polylog(3, (-1+i)/2) )
%236 = 2.5167020943309544685663530996649317514086075354493
? z=1-I; 2*imag( -1/6*log(z)*(log(z)^2+pi^2) )
%237 = 2.5167020943309544685663530996649317514086075354493
In the following related post, pisco also computed these integrals using different methods.
Please compare to have an alternative view.
Computation of integrals, math stackexchange question 3854736
This was $J_{1212}$.
The remained integral $J_{1211}$ is not so simple.
$$
\tag{14}
$$
$$
\begin{aligned}
J_{1211}
&=
\int_0^{\pi/2} u'\operatorname{Li}_2(\cos u)\; du
-
\int_0^{\pi/2} u'\operatorname{Li}_2(-\cos u)\; du
\\
&=
-
\int_0^{\pi/2} u\cdot
\frac{\sin u}{\cos u}\cdot\log\frac{1-\cos u}{1+\cos u}\; du
\\
&=
-\int_0^1 2\arctan t
\;\frac{2t}{1-t^2}\; \log t^2\;\frac 2{1+t^2}\; dt
\\
&=
-4
\int_0^1 \left(
\frac 1{1-t} - \frac 1{1+t} +\frac{2t}{1+t^2}
\right)\cdot
\arctan t\cdot
\log t\; dt
\\
&=-4(J_{1211a} - J_{1211b} + J_{1211c})\ .
\end{aligned}
$$
Here, $J_{1211a}$, $J_{1211b}$, $J_{1211c}$ are the correspondingly integrals obtained by dissolving the parentheses.
One can show using either $(8)$, or the linked related computations, the formulas for the integrals indexed $1211a$, $1211b$, $1211c$:
$$
\tag{15}
$$
$$
\begin{aligned}
J_{1211a} &= \frac 1{16}\left[\ -\pi^3-\pi\log^2 2+ 8G\log2 + 32\Im\operatorname{Li}_3\left(\frac {1+i}2\right)\ \right]\ ,\\
J_{1211b} &= \frac 1{64}\Big[\ -\pi^3 + 32G\log2\ \Big]\ ,\\
J_{1211c} &= \frac 1{16}\left[\ \pi^3+2\pi\log^2 2 -64\Im\operatorname{Li}_3\left(\frac {1+i}2\right)\ \right]\ ,
\\[3mm]
J_{1211} &= \frac 1{16}\left[\ -\pi^3-4\pi\log^2 2 +128\Im\operatorname{Li}_3\left(\frac {1+i}2\right)\ \right]\ ,
\\
J_{1212} &= \frac 1{16}\left[\ 6\pi^3+8\pi\log^2 2 -64G\log 2 - 256\Im\operatorname{Li}_3\left(\frac {1+i}2\right)\ \right]\ ,
\\
J_{121} &= 2\log 2-4 + J_{1211} +J_{1212}\\
&=
\frac 1{16}\left[\ 5\pi^3+4\pi\log^2 2 -64G\log 2 - 128\Im\operatorname{Li}_3\left(\frac {1+i}2\right)\ \right]
+2\log 2-4
\ .
\end{aligned}
$$
Numerical checks:
eps = 0.8e-5; pi = Pi; i = I;
G = imag( dilog(i) );
# J1211 = intnum( u=eps, pi/2, dilog(cos(u)) ) - intnum( u=eps, pi/2, dilog(-cos(u)) );
J1211 = intnum( t=0, 1, 4 * ( 1/(1-t) - 1/(1+t) +2*t/(1+t^2) ) * atan(t) * log(t) )
J1211a = intnum( t=0, 1, atan(t) * log(t) / (1-t) );
J1211b = intnum( t=0, 1, atan(t) * log(t) / (1+t) );
J1211c = intnum( t=0, 1, atan(t) * log(t) * 2*t / (1+t^2) );
J1211a - (-pi^3 - pi*log(2)^2 + 8*G*log(2) + 32*imag(polylog(3, (1+i)/2))) / 16
J1211b - (-pi^3 + 32*G*log(2) ) / 64
J1211c - (+pi^3 + 2*pi*log(2)^2 - 64*imag(polylog(3, (1+i)/2))) / 16
J1211
4*J1211a - 4*J1211b + 4*J1211c
Yes, the differences in the second block are covered by the precision used,
and we have a final answer for $J_{1211}$.
To have an example of calculation:
$$
\begin{aligned}
J_{1211b} &=
\frac 1{2i}
\int_0^1
\log t\cdot\log\frac {1+it}{1-it}\cdot\frac 1{t+1}\; dt\ ,
\\
\int_0^1
\frac {\log^2 t}{t+1}\; dt
&=
[\ G_{-1}(t)\ ]_0^1=-2\operatorname{Li}_3(-1)=\frac 32\zeta(3)
\ ,\text{ (but not needed)}
\\
\int_0^1
\frac {\log^2 (1+it)}{t+1}\; dt
&=
\int_1^{1+i}
\log^2 u\;\cdot\frac 1{(u-1)+i}\; du
\\
&=
[ \ G_{1-i}(t)\ ]_1^{1+i} =G_{1-i}(1+i)-G_{1-i}(1)
\\
&=
-\log(1+i)^2\cdot\operatorname{Li}_1(i)
+2\log(1+i)\cdot\operatorname{Li}_2(i)
\ ,
\\
\int_0^1
\frac {\log^2 (1-it)}{t+1}\; dt
&=\text{the complex conjugate of the above}\ ,
\\
\int_0^1
\frac {\log^2 \frac t{1+it}}{t+1}\; dt
&=
-
\int_0^{1/(1+i)}
\log^2 u\;\cdot\frac 1{\frac {iu}{u+i}+1}\; \frac 1{(u+i)^2}\; du
%
% u = t/(1+it), u + uit = t, t = u/(1-ui) = ui/(u+i)
\\
&=
\int_0^{1/(1+i)}
\log^2 u\;\cdot\left(\frac 1{u+\frac 12(1+i)} - \frac 1{u+i}\right)
\\
&=[\ G_{-(1+i)/2}(u)-G_{-i}(u)\ ]_0^{1/(1+i)} =
G_{-(1+i)/2}\left(\frac{1-i}2\right)-G_{-i}\left(\frac{1-i}2\right)
\\
&=
-\log^2\frac{1-i}2\cdot \operatorname{Li}_1(i)
+2\log\frac{1-i}2\cdot \operatorname{Li}_2(i)
-2\operatorname{Li}_3(i)
\\
&\qquad\qquad
-\log^3\frac{1-i}2
- 2\log\frac{1-i}2 \cdot\operatorname{Li}_2\left(\frac{1+i}2\right)
+ 2\operatorname{Li}_3\left(\frac{1+i}2\right)
\ .
\\
\int_0^1
\frac{\log^2 \frac t{1-it}}{t+1}\; dt
&=\text{the complex conjugate of the above value.}
\\
J_{1211b} &=
\frac 1{2i}
\int_0^1
\log t\;\log\frac {1+it}{1-it}\cdot\frac 1{t+1}\; dt
\\
&=
\frac 1{4i}
\int_0^1
\Bigg(\log^2(1+it)-\log^2(1-it)
\\
&\qquad\qquad\qquad\qquad
-\log^2\frac t{1+it} +\log^2\frac t{1-it}\Bigg)\cdot\frac 1{t+1}\; dt
\ ,
\end{aligned}
$$
and the computation leads to the claimed result.
to be continued...
(Please look around for the second part of the answer.)