Evaluating $\int_{0}^{\pi/3}\ln^2 \left ( \sin x \right )\,dx$

\begin{align}\mathcal{I}&=\frac{\ln{2}}{6\sqrt{3}}\psi_1\left(\small{\frac{1}{3}}\right)+\frac{\ln{3}}{12\sqrt{3}}\psi_1\left(\small{\frac{2}{3}}\right)-\frac{\ln{3}}{12\sqrt{3}}\psi_1\left(\small{\frac{1}{3}}\right)-\frac{\ln{2}}{6\sqrt{3}}\psi_1\left(\small{\frac{2}{3}}\right)\\& \ \ \ \ +\frac{\pi}{3}\ln^2{2}-\frac{\pi}{12}\ln^2{3}+\frac{\pi^3}{81}-{\rm Im} \ {\rm Li}_3(1-e^{i2\pi/3}) \end{align}


Disclaimer: I stole this method from Random Variable so I dare not take credit for it.

Note that $$\ln(1-e^{i2x})=\ln(\sin{x})+\ln{2}+i\left(x-\frac{\pi}{2}\right)$$ Square both sides and extract the real part. $${\rm Re}\ln^2(1-e^{i2x})=\ln^2(\sin{x})+2\ln{2}\ln(\sin{x})+\ln^2{2}-\left(x-\frac{\pi}{2}\right)^2$$ Let us first compute $\displaystyle\mathcal{J}=\int^{\frac{\pi}{3}}_0\ln(\sin{x}){\rm d}x$. \begin{align} \mathcal{J} &={\rm Re}\int^{\frac{\pi}{3}}_0\ln(1-e^{i2x}){\rm d}x-\frac{\pi}{3}\ln{2}\\ &=\frac{1}{2}{\rm Im}\int^{e^{i\frac{2\pi}{3}}}_1\frac{\ln(1-z)}{z}{\rm d}z-\frac{\pi}{3}\ln{2}\\ &=-\frac{1}{2}{\rm Im} \ {\rm Li}_2(e^{i2\pi/3})-\frac{\pi}{3}\ln{2}\\ \end{align} Then \begin{align} \mathcal{I} &=\int^{\frac{\pi}{3}}_0\ln^2(\sin{x}){\rm d}x\\ &={\rm Re}\int^{\frac{\pi}{3}}_0\ln^2(1-e^{i2x}){\rm d}x-2\mathcal{J}\ln{2}-\frac{\pi}{3}\ln^2{2}+\frac{13\pi^3}{324}\\ &=\frac{1}{2}{\rm Im}\int^{e^{i\frac{2\pi}{3}}}_1\frac{\ln^2(1-z)}{z}{\rm d}z-2\mathcal{J}\ln{2}-\frac{\pi}{3}\ln^2{2}+\frac{13\pi^3}{324}\\ &=\frac{1}{2}{\rm Im}\left[\frac{i2\pi}{3}\ln^2(1-e^{i2\pi/3})+\int^{e^{i\frac{2\pi}{3}}}_1\frac{2\ln{z}\ln(1-z)}{1-z}{\rm d}z\right]-2\mathcal{J}\ln{2}\\ &\ \ \ \ -\frac{\pi}{3}\ln^2{2}+\frac{13\pi^3}{324}\\\ &=\frac{\pi}{12}\ln^2{3}-\frac{\pi^3}{108}+\frac{1}{2}{\rm Im}\left[2{\rm Li}_2(1-e^{i2\pi/3})\ln(1-e^{i2\pi/3})-2{\rm Li}_3(1-e^{i2\pi/3})\right]\\ &\ \ \ \ +\ln{2} \ {\rm Im} \ {\rm Li}_2(e^{i2\pi/3})+\frac{2\pi}{3}\ln^2{2}-\frac{\pi}{3}\ln^2{2}+\frac{13\pi^3}{324}\\ &=\frac{5\pi^3}{162}+\frac{\pi}{12}\ln^2{3}+\frac{\pi}{3}\ln^2{2}-{\rm Im}\left[{\rm Li}_3(1-e^{i2\pi/3})-{\rm Li}_2(1-e^{i2\pi/3})\ln(1-e^{i2\pi/3})\\ -\ln{2}{\rm Li}_2(e^{i2\pi/3})\right] \end{align}


The real part of ${\rm Li}_2(e^{i2\pi/3})$ is \begin{align} {\rm Re} \ {\rm Li}_2(e^{i2\pi/3}) &=\sum^\infty_{n=1}\frac{\cos(2n\pi/3)}{n^2}\\ &=-\frac{1}{4}\sum^\infty_{n=-\infty}\left(\frac{1}{(3n+1)^2}+\frac{1}{(3n+2)^2}\right)+\frac{1}{9}\sum^\infty_{n=1}\frac{1}{n^2}\\ &=\frac{1}{4}\left[\operatorname*{Res}_{z=-1/3}\frac{\pi\cot(\pi z)}{(3z+1)^2}+\operatorname*{Res}_{z=-2/3}\frac{\pi\cot(\pi z)}{(3z+2)^2}\right]+\frac{\pi^2}{54}\\ &=-\frac{\pi^2}{18} \end{align} and its imaginary part is \begin{align} {\rm Im} \ {\rm Li}_2(e^{i2\pi/3}) &=\sum^\infty_{n=1}\frac{\sin(2n\pi/3)}{n^2}\\ &=\frac{\sqrt{3}}{2}\sum^\infty_{n=0}\left(\frac{1}{(3n+1)^2}-\frac{1}{(3n+2)^2}\right)\\ &=\frac{1}{6\sqrt{3}}\psi_1\left(\small{\frac{1}{3}}\right)-\frac{1}{6\sqrt{3}}\psi_1\left(\small{\frac{2}{3}}\right) \end{align} By Euler's reflection formula for the dilogarithm, \begin{align}{\rm Li}_2(1-e^{i2\pi/3}) &=\frac{\pi^2}{6}-\ln(e^{i2\pi/3})\ln(1-e^{i2\pi/3})-{\rm Li}_2(e^{i2\pi/3})\\ &=\frac{\pi^2}{9}+i\left(\frac{1}{6\sqrt{3}}\psi_1\left(\small{\frac{2}{3}}\right)-\frac{1}{6\sqrt{3}}\psi_1\left(\small{\frac{1}{3}}\right)-\frac{\pi}{3}\ln{3}\right)\end{align} Therefore, the imaginary part of ${\rm Li}_2(1-e^{i2\pi/3})\ln(1-e^{i2\pi/3})$ is \begin{align} & \ \ \ \ \ \ \ {\rm Im}\ln(1-e^{i2\pi/3}){\rm Li}_2(1-e^{i2\pi/3})\\ &={\rm Re}\ln(1-e^{i2\pi/3}){\rm Im} \ {\rm Li}_2(1-e^{i2\pi/3})+{\rm Im}\ln(1-e^{i2\pi/3}){\rm Re} \ {\rm Li}_2(1-e^{i2\pi/3})\\ &=-\frac{\pi^3}{54}-\frac{\pi}{6}\ln^2{3}+\frac{\ln{3}}{12\sqrt{3}}\psi_1\left(\small{\frac{2}{3}}\right)-\frac{\ln{3}}{12\sqrt{3}}\psi_1\left(\small{\frac{1}{3}}\right) \end{align}


Plucking these values into our previously obtained result yields \begin{align}\mathcal{I} &=\frac{\ln{2}}{6\sqrt{3}}\psi_1\left(\small{\frac{1}{3}}\right)+\frac{\ln{3}}{12\sqrt{3}}\psi_1\left(\small{\frac{2}{3}}\right)-\frac{\ln{3}}{12\sqrt{3}}\psi_1\left(\small{\frac{1}{3}}\right)-\frac{\ln{2}}{6\sqrt{3}}\psi_1\left(\small{\frac{2}{3}}\right)\\& \ \ \ \ +\frac{\pi}{3}\ln^2{2}-\frac{\pi}{12}\ln^2{3}+\frac{\pi^3}{81}-{\rm Im} \ {\rm Li}_3(1-e^{i2\pi/3})\approx 2.0445154\cdots\\ \end{align}


I am unable to help but, if you want to consider series, let us try from the beginning $$\log(\sin(x))=\log \left(\frac{\sin (x)}{x}\right)+\log(x)$$ Now, square all of that and replace $\frac{\sin (x)}{x}$ by its development around $x=0$; from that, expand $$\log \left(\frac{\sin (x)}{x}\right)=-\frac{x^2}{6}-\frac{x^4}{180}-\frac{x^6}{2835}-\frac{x^8}{37800}-\frac{x^{10}}{46777 5}-\frac{691 x^{12}}{3831077250}-\frac{2 x^{14}}{127702575}+O\left(x^{16}\right)$$

Being patient, the integrand becomes \begin{align} & \log ^2(x)-\frac{1}{3} x^2 \log (x)+x^4 \left(\frac{1}{36}-\frac{\log (x)}{90}\right)+x^6 \left(\frac{1}{540}-\frac{2 \log (x)}{2835}\right)+x^8 \left(\frac{101}{680400}-\frac{\log (x)}{18900}\right) \\ & \hspace{5mm} + x^{10} \left(\frac{13}{1020600}-\frac{2 \log (x)}{467775}\right)+x^{12} \left(\frac{7999}{7072758000}-\frac{691 \log (x)}{1915538625}\right) \\ & \hspace{10mm} + x^{14} \left(\frac{2357}{22986463500}-\frac{4 \log (x)}{127702575}\right)+O\left(x^{16}\right) \end{align} and you are left with integrals $$I_n=\int x^n \log(x)dx=\frac{x^{n+1} ((n+1) \log (x)-1)}{(n+1)^2}$$ $$J=\int \log^2(x)dx=2 x+x \log ^2(x)-2 x \log (x)$$ and so \begin{align} & \int\log^2 \left ( \sin x \right ) \,dx \\ &= x \left(\log ^2(x)-2 \log (x)+2\right)+x^3 \left(\frac{1}{27}-\frac{\log (x)}{9}\right)+x^5 \left(\frac{3}{500}-\frac{\log (x)}{450}\right) \\ & \hspace{5mm} + x^7 \left(\frac{31}{111132}-\frac{2 \log(x)}{19845}\right)+x^9 \left(\frac{1}{58320}-\frac{\log (x)}{170100}\right)+x^{11} \left(\frac{1621}{1358418600}-\frac{2 \log (x)}{5145525}\right) \\ & \hspace{5mm} + x^{13} \left(\frac{17987}{201803238000}-\frac{691 \log (x)}{24902002125}\right) + x^{15} \left(\frac{37}{5304568500}-\frac{4 \log (x)}{1915538625}\right)+O\left(x^{17}\right) \end{align} Now, use bounds; the nightmare is back to you. \begin{align} & \int_0^a \log^2 \left ( \sin x \right )\,dx \\ &= a \left(\log ^2(a)-2 \log (a)+2\right)+\frac{1}{27} a^3 (1-3 \log (a))+a^5 \left(\frac{3}{500}-\frac{\log (a)}{450}\right) \\ & \hspace{5mm} + \frac{a^7 (155-56 \log(a))}{555660}+\frac{a^9 (35-12 \log (a))}{2041200} + \frac{a^{11} (1621-528 \log(a))}{1358418600} \\ & \hspace{5mm} + \frac{a^{13} (1384999-431184 \log(a))}{15538849326000}+\frac{a^{15} (481-144 \log(a))}{68959390500}+O\left(a^{17}\right) \end{align}

I should point out that the computed value is correct : for $a=\pi/3$ this "limited" expansion leads to $2.044515433$ for an exact value of $2.044515435$. What is amazing is the first term is $2.000033847$; is then $$\frac{1}{3} \pi \left(2+\log ^2\left(\frac{\pi }{3}\right)-2 \log \left(\frac{\pi }{3}\right)\right)$$ a good approximation of $2$ ?