Yet another log-sin integral $\int\limits_0^{\pi/3}\log(1+\sin x)\log(1-\sin x)\,dx$

$$\begin{align}\int_0^{\pi/3}\ln(1+\sin x)\ln(1-\sin x)\,dx=&\frac{29\pi^3}{216}+\frac{5\pi}6\ln^2\left(2+\sqrt3\right)+\frac\pi3\ln^22+\frac{\pi^2}{3\sqrt3}\ln2\\+&\frac{8G}3\ln\left(2+\sqrt3\right)-4 \operatorname{Ti}_3\left(2+\sqrt3\right)-\frac{\psi^{(1)}\!\left(\tfrac13\right)}{2 \sqrt{3}}\ln2,\end{align}$$ where $G$ is the Catalan constant, $\operatorname{Ti}_3(z)=\Im\operatorname{Li}_3(iz)$ is the generalized inverse tangent integral, and $\psi^{(1)}(z)$ is the trigamma function.


Integral expressed in terms of $F_\pm(x,n)$

For $2x\in(-\pi,\pi)$, one may write the integrand as \begin{align} \prod_\pm\ln(1\pm\sin x) &=2f_-(2\bar x,2)-2f_-(\bar x,2)-2f_+(\bar x,2)-2\ln 2f_-(2\bar x,1)+2\bar x(2\bar x-\pi)+\ln^2 2 \end{align} where $4\bar x=\pi-2x$ and $f_\pm(x,n)=\mathrm{Re}\ln^n(1\pm e^{2ix})$. Now note that for $n=1,2$, $f_\pm(x,n)$ has antiderivatives $F_\pm(x,n)$ which can be obtained through integration by parts. To be specific, \begin{align} F_-(x,1)&=\mathrm{Re}\frac i2\mathrm{Li}_2(e^{2ix})\\ F_-(x,2)&=\mathrm{Re}\frac i2\left(2\mathrm{Li}_3(1-e^{2ix})-2\mathrm{Li}_2(1-e^{2ix})\ln(1-e^{2ix})-\ln(e^{2ix})\ln^2(1-e^{2ix})\right)\\ F_+(x,2)&=\mathrm{Re}\frac i2\left(2\mathrm{Li}_3(z)-2\mathrm{Li}_2(z)\ln(z)-\ln^2 z\ln(1-z)+\frac{\ln^3 z} 3\right) \end{align} where $z=(1+e^{2ix})^{-1}$.

As the integrand has no poles in the first quadrant, we are allowed to simply plug in the limits into these antiderivatives. This gives \begin{align} \int^\frac{\pi}{3}_0\prod_\pm\ln(1\pm\sin x)\ dx=&\ 2F_-\left(\tfrac\pi 2,2\right)-2F_-\left(\tfrac\pi 6,2\right)-4F_-\left(\tfrac\pi 4,2\right)+4F_-\left(\tfrac\pi{12},2\right)-4F_+\left(\tfrac\pi 4,2\right)\\&+4F_+\left(\tfrac\pi{12},2\right)-2\ln 2 F_+\left(\tfrac\pi{2},1\right)+2\ln 2 F_+\left(\tfrac\pi{6},1\right)+\frac\pi 3\ln^2 2-\frac{23\pi^3}{324} \end{align} It remains to simplify these polylogarithmic expressions.


Simplification of $F_-\left(\tfrac\pi{2},1\right)$ and $F_-\left(\tfrac\pi{6},1\right)$

Evidently, $F_+\left(\tfrac\pi{2},1\right)=\mathrm{Re}\left(\frac i2\mathrm{Li}_2(-1)\right)=0$, while the value of $$F_+\left(\tfrac\pi{6},1\right)=\mathrm{Re}\left(\tfrac i2\mathrm{Li}_2(e^{\pi i/3})\right)=\frac{-\psi_1\left(\frac 16\right)-\psi_1\left(\frac 13\right)+\psi_1\left(\frac 23\right)+\psi_1\left(\frac 56\right)}{48\sqrt 3}=\frac{\pi^2}{6\sqrt 3}-\frac{\psi_1\left(\frac 13\right)}{4\sqrt 3}$$ can be deduced by writing it as a sum and applying the duplication formula followed by the reflection formula twice.


Simplification of $F_-\left(\tfrac\pi{2},2\right)$ and $F_-\left(\tfrac\pi{6},2\right)$

Use the polylogarithm inversion formulae to deduce that $F_-\left(\tfrac\pi{2},2\right)=0$. Since $1-e^{\pi i/3}=e^{-\pi i/3}$ lies on the unit circle it is easy to verify that $$F_+\left(\tfrac\pi{6},2\right)=\frac{\pi^3}{324}$$ using the known Fourier series identities for $\sum\cos(n\theta)n^{-2}$ and $\sum\sin(n\theta)n^{-3}$.


Simplification of $F_-\left(\tfrac\pi{4},2\right)$ and $F_+\left(\tfrac\pi{4},2\right)$

The 3 facts \begin{align} \mathrm{Li}_2(1-i)&=\frac{\pi^2}{16}-i\left(\frac{\pi}{4}\ln 2+G\right)\\ \mathrm{Li}_2\left(\frac{1-i}2\right)&=\frac{5\pi^2}{96}-\frac{\ln^2 2}{8}+i\left(\frac{\pi}{8}\ln 2-G\right)\\ -\mathrm{Im}\ \mathrm{Li}_3\left(\frac{1-i}2\right)&=\mathrm{Im}\ \mathrm{Li}_3(1-i)+\frac{7\pi^3}{128}+\frac{3\pi}{32}\ln^2 2 \end{align} (which respectively follow from the dilogarithm reflection formula and Landen's di/trilogarithm identities) allow us to conclude, after some algebra, $$F_-\left(\tfrac\pi{4},2\right)=-F_+\left(\tfrac\pi{4},2\right)=-\mathrm{Im}\ \mathrm{Li}_3(1-i)-\frac{G}{2}\ln 2-\frac{\pi^3}{32}-\frac{\pi}{16}\ln^2 2$$ So $F_-\left(\tfrac\pi{4},2\right)+F_+\left(\tfrac\pi{4},2\right)=0$ - a surprisingly convenient equality indeed.


Simplification of $F_-\left(\tfrac\pi{12},2\right)+F_+\left(\tfrac\pi{12},2\right)$

This is the most tedious part of the evaluation. We have the identity \begin{align} \mathrm{Li}_3\left(\frac{1-z}{1+z}\right)-\mathrm{Li}_3\left(-\frac{1-z}{1+z}\right)= &\ 2\mathrm{Li}_3\left(1-z\right)+2\mathrm{Li}_3\left(\frac{1}{1+z}\right)-\frac12\mathrm{Li}_3\left(1-z^2\right)\\ &\ -\frac{\ln^3(1+z)}{3}+\frac{\pi^2}6\ln(1+z)-\frac{7\zeta(3)}4 \end{align} and it so happens that when $z=e^{\pi i/6}$, $(1-z)(1+z)^{-1}=-(2-\sqrt 3)i$ is purely imaginary and $1-z^2$ lies on the unit circle. Therefore \begin{align} 4\mathrm{Im}\left(\mathrm{Li}_3\left(1-e^{\pi i/6}\right)+\mathrm{Li}_3\left(\frac{1}{1+e^{\pi i/6}}\right)\right)&=-4\mathrm{Ti}_3\left(2-\sqrt 3\right)-\frac{17\pi^3}{288}+\frac{\pi}{24}\ln^2(2-\sqrt 3)\\ &=4\mathrm{Ti}_3\left(2+\sqrt 3\right)-\frac{89\pi^3}{288}-\frac{23\pi}{24}\ln^2(2+\sqrt 3) \end{align} since $16\mathrm{Ti}_3(z)+16\mathrm{Ti}_3(z^{-1})=\pi^3+4\pi\ln^2 z$ . Furthermore, it is not hard to get $$\mathrm{Li}_2\left(e^{\pi i/6}\right)=\frac{13\pi^2}{144}+i\left(\frac{\psi_1\left(\frac 13\right)}{8\sqrt 3}+\frac{2G}3-\frac{\pi^2}{12\sqrt 3}\right)$$ by applying its definition, so by the dilogarithm reflection formula, $$\mathrm{Li}_2\left(1-e^{\pi i/6}\right)=\frac{\pi^2}{144}+i\left(\frac{\pi^2}{12\sqrt 3}-\frac{\psi_1\left(\frac 13\right)}{8\sqrt 3}-\frac{2G}3+\frac{\pi}{12}\ln(2+\sqrt 3)\right)$$ By a similar process we obtain $$\mathrm{Li}_2\left(\frac{1}{1+e^{\pi i/6}}\right)=\frac{23\pi^2}{288}-\frac{\ln^2(2+\sqrt 3)}{8}+i\left(\frac{\psi_1\left(\frac 13\right)}{8\sqrt 3}-\frac{\pi^2}{12\sqrt 3}-\frac{2G}3+\frac{\pi}{24}\ln(2+\sqrt 3)\right)$$ after an application of the inversion formula to $z=1+e^{\pi i/6}$. After some further manipulations using these values, we eventually arrive at $$4F_-\left(\tfrac\pi{12},2\right)+4F_+\left(\tfrac\pi{12},2\right)=-4\mathrm{Ti}_3\left(2+\sqrt 3\right)+\frac{8G}{3}\ln(2+\sqrt 3)+\frac{5\pi}{6}\ln^2(2+\sqrt 3)+\frac{137\pi^3}{648}$$


The Closed Form

Assimilating all our results, we indeed get \begin{align}\int^\frac{\pi}{3}_0\prod_\pm\ln(1\pm\sin x)\ dx=&-4 \mathrm{Ti}_3\left(2+\sqrt3\right)-\frac{\psi_1\left(\frac13\right)}{2 \sqrt{3}}\ln 2+\frac{8G}3\ln\left(2+\sqrt3\right)+\frac{29\pi^3}{216}\\ &\ \ +\frac{5\pi}6\ln^2\left(2+\sqrt3\right)+\frac\pi3\ln^22+\frac{\pi^2}{3\sqrt3}\ln2\\ \end{align} as Cleo announced.


Another way is to use Maclaurin series: $$\log(1\pm \sin x) = \pm\sin x +\dfrac12 \sin^2x\pm \dfrac13 \sin^3x +\dfrac14\sin^4x\pm \dfrac15\sin^5x+\dfrac16\sin^6x+\dots,$$where $\sin^2 x<\dfrac 34.$ Expression $$ \int\limits_0^{\dfrac{\pi}3}\left(\dfrac14\sin^4x\left(1+ \dfrac12\sin^2x+\dfrac13\sin^4x+\dfrac14\sin^6x+\dots\right)^2 - {\sin^2x\left(1 + \dfrac13 \sin^2x + \dfrac15 \sin^4x + \dfrac17\sin^4x+\dots\right)^2}\right)dx$$ looks convenient to approximate calculations.