TITLE: Integral $\int^{\frac{\pi}{6}}_{0}\ln^2(2\sin \theta)d\theta$
QUESTION [11 upvotes]: Greetings I am trying to find a close form for: $\int^{\frac{\pi}{6}}_{0}\ln^2(2\sin \theta)d\theta$ My first thought was to let $$I(k)=\int_0^{\frac{\pi}{6}} (2sin(\theta))^k d\theta$$ So I would get the answer to the original integral if I evaluate this in terms of k, derivate two times the result and plug $k=0$.  I am struggling with the last one.  $$I(k)=2^k\int_0^{\frac{\pi}{6}} sin^k (\theta) d\theta=2^k \,\Im\int_0^{\frac{\pi}{6}} e^{ik\theta} d\theta= 2^k \,\Im\int_0^{\frac{\pi}{6}}\frac{d}{d\theta}\left(\frac{e^{ik\theta}}{ik}\right)d\theta=\Im2^k\left(\frac{\cos k\frac{\pi}{6}+i\sin\frac{k\pi}{6}-1}{ik} \right)=2^k\frac{{1-\cos\frac{k\pi}{6}}}{k}$$ Is this correct? If not I would appreciate some help with the integral.

REPLY [5 votes]: See the details here from a similar question Evaluating $\int_{0}^{\pi/3}\ln^2 \left ( \sin x \right )\,dx$.
The core idea is to exploit the identity, 
$${\rm Re}\log^2(1-e^{i2x})=\log^2(2\sin{x})-\left(x-\frac{\pi}{2}\right)^2.$$
Alternatively, you may exploit the Fourier series of $\log(\sin(x))$ and work with a double series which is not hard to handle with.
Fourier series of Log sine and Log cos
Additional information: It's easy to show by contour integration that
$$\int_0^1 \frac{\log^2(1-x^2)}{x}\textrm{d}x+i \int_0^{\pi/6}\log^2(1-e^{i2 x})\textrm{d}x-\int_0^1 \frac{\log^2(1-e^{i\pi/3}x^2)}{x}\textrm{d}x=0,$$
from which you may extract the desired value of the integral.