Evaluating $\int_0^{\tfrac{\pi}{4}}\ln(\cos x-\sin x)\ln(\cos x) dx - \int_0^{\tfrac{\pi}{4}}\ln(\cos x+\sin x)\ln(\sin x)dx=\frac{G\ln 2}{2}$ In order to compute, in an elementary way,
$\displaystyle \int_0^1 \frac{x \arctan x \log \left( 1-x^2\right)}{1+x^2}dx$
(see Evaluating $\int_0^1 \frac{x \arctan x \log \left( 1-x^2\right)}{1+x^2}dx$ )
i need to show, in a simple way, that:
$\displaystyle \int_0^{\tfrac{\pi}{4}}\ln(\cos x-\sin x)\ln(\cos x) dx - \int_0^{\tfrac{\pi}{4}}\ln(\cos x+\sin x)\ln(\sin x)dx=\dfrac{G\ln 2}{2}$
$G$ being the Catalan constant.
The reason of my interest for this question is, if i am right, that this formula permits to find out a relation between integrals:
$\displaystyle \int_0^1 \dfrac{\ln(1+x)\ln(1+x^2)}{1+x^2}dx$
$\displaystyle \int_0^1 \dfrac{\ln(1+x)^2}{1+x^2}dx$
$\displaystyle \int_0^{\tfrac{\pi}{4}}\big(\ln(\cos x)\big)^2 \dfrac{}{}dx$
and some constants.
 A: Using Simpsons rule we know 
$$\cos(x)-\sin(x)=\sqrt{2}\sin\left(\frac{\pi}{4}-x\right)$$ and 
$$\cos(x)+\sin(x)=\sqrt{2}\cos\left(\frac{\pi}{4}-x\right)$$
Plugging this in the original integrals yields:
$$\int_0^{\frac{\pi}{4}}\ln\left(\sqrt{2}\sin\left(\frac{\pi}{4}-x\right)\right)\ln\left(\cos(x)\right)\mathrm{d}x-
\int_0^{\frac{\pi}{4}}\ln\left(\sqrt{2}\cos\left(\frac{\pi}{4}-x\right)\right)\ln\left(\sin(x)\right)\mathrm{d}x$$
Splitting the logarithms and rearranging yields:
$$\int_0^{\frac{\pi}{4}}\ln(\sqrt{2})\left(\ln(\cos(x))-\ln(\sin(x)\right)\mathrm{d}x+\\
+\left(\int_0^{\frac{\pi}{4}}\ln\left(\sin\left(\frac{\pi}{4}-x \right)\right)\ln(\cos(x)) \mathrm{d}x-\int_0^{\frac{\pi}{4}}\ln\left(\cos\left(\frac{\pi}{4}-x \right)\right)\ln(\sin(x)) \mathrm{d}x  \right)$$
The first part yields 
$$\int_0^{\frac{\pi}{4}}\ln(\sqrt{2})\left(\ln(\cos(x))-\ln(\sin(x)\right)\mathrm{d}x = \ln(\sqrt{2})G=\frac{G\ln(2)}{2}$$
and because $$\int_0^bf(x)\mathrm{d}x=\int_0^bf(b-x)\mathrm{d}x$$
the second part yields
$$\int_0^{\frac{\pi}{4}}\ln\left(\sin\left(\frac{\pi}{4}-x \right)\right)\ln(\cos(x)) \mathrm{d}x-\int_0^{\frac{\pi}{4}}\ln\left(\cos\left(\frac{\pi}{4}-x \right)\right)\ln(\sin(x)) \mathrm{d}x=0$$
A: \begin{align}
I&:=\int_0^{\tfrac{\pi}{4}}\ln(\cos x-\sin x)\ln(\cos x)\,dx - \int_0^{\tfrac{\pi}{4}}\ln(\cos x+\sin x)\ln(\sin x)\,dx\\
&=\int_0^{\tfrac{\pi}{4}}\ln\left(\sqrt{2}\,\cos\left(x+\frac {\pi}4\right)\right)\ln(\cos x)\,dx - \int_0^{\tfrac{\pi}{4}}\ln\left(\sqrt{2}\,\sin\left(x+\frac {\pi}4\right)\right)\ln(\sin x)\,dx\\
&\ \quad\text{setting}\; x=\frac {\pi}4-y\;\ \text{in the first integral gives}\\
&=\int_0^{\tfrac{\pi}{4}}\ln\left(\sqrt{2}\,\cos\left(\frac {\pi}2-y\right)\right)\ln\left(\cos\left(\frac {\pi}2-\frac {\pi}4-y\right)\right)\,dy - \int_0^{\tfrac{\pi}{4}}\ln\left(\sqrt{2}\,\sin\left(x+\frac {\pi}4\right)\right)\ln(\sin x)\,dx\\
&=\int_0^{\tfrac{\pi}{4}}\ln\left(\sqrt{2}\,\sin\left(y\right)\right)\ln\left(\sin\left(y+\frac {\pi}4\right)\right)\,dy - \int_0^{\tfrac{\pi}{4}}\ln\left(\sqrt{2}\,\sin\left(x+\frac {\pi}4\right)\right)\ln(\sin x)\,dx\\
&=\int_0^{\tfrac{\pi}{4}}\left(\ln(\sqrt{2})+\ln\left(\sin x\right)\right)\ln\left(\sin\left(x+\frac {\pi}4\right)\right) - \left(\ln(\sqrt{2})+\ln\left(\sin\left(x+\frac {\pi}4\right)\right)\right)\ln(\sin x)\;dx\\
&=\ln(\sqrt{2})\int_0^{\tfrac{\pi}{4}}\ln\left(\sin\left(x+\frac {\pi}4\right)\right)-\ln(\sin x)\;dx\\
&=\dfrac{\ln 2}{2}G\\
\end{align}
It remains to prove that $\displaystyle \int_0^{\tfrac{\pi}{4}}\ln\left(\sin\left(x+\frac {\pi}4\right)\right)-\ln(\sin x)\;dx=G$.
This is detailed around $(16)$ in this interesting paper by Jameson and Lord or using :
\begin{align}
\int_0^{\tfrac{\pi}{4}}\ln\left(\sin\left(x+\frac {\pi}4\right)\right)-\ln(\sin x)\,dx&=\int_{\tfrac{\pi}{4}}^{\tfrac{\pi}{2}}\ln\left(\sin x\right)\,dx-\int_0^{\tfrac{\pi}{4}}\ln(\sin x)\,dx\\
&=\int_0^{\tfrac{\pi}{4}}\ln(\cos x)\,dx-\int_0^{\tfrac{\pi}{4}}\ln(\sin x)\,dx\\
&=-\int_0^{\tfrac{\pi}{4}}\ln(\tan x)\,dx\\
&=-\int_0^1\frac{\ln t}{1+t^2}\,dt,\quad\text{integrated by parts}\\
&=-\left.\ln(t)\;\arctan(t)\right|_0^1+\int_0^1\frac{\arctan(t)}{t}\,dt\\
&=\int_0^1\sum_{n=0}^\infty (-1)^n\frac{t^{2n}}{2n+1}\,dt\\
&=\left.\sum_{n=0}^\infty (-1)^n\frac{t^{2n+1}}{(2n+1)^2}\right|_0^1\\
&=G\\
\end{align}
A: Relationship between the proposed integrals.
$\displaystyle \int_0^1 \dfrac{\ln(1+x)^2}{1+x^2}dx$-$\displaystyle \int_0^1 \dfrac{\ln(1+x)\ln(1+x^2)}{1+x^2}dx=-\frac{3\pi}{16}\ln^2{2}+\dfrac{G\ln 2}{2}$
