I was working on this rather challenging log-sine integral:
$$ \int_{0}^{2\pi}x^{2}\ln^{2}\left(2\sin\left(x \over 2\right)\right)\,{\rm d}x = {13\pi^{5} \over 45} $$
The upper limit is a waiver from the norm of $\frac{\pi}{2}$. Anyway, when integrating log-sin integrals one can often times use the famous identity
$$\displaystyle -\ln(2\sin(x/2))=\sum_{k=1}^{\infty}\frac{\cos(kx)}{k}$$
by switching sum and integral, integrating, then evaluating the sums. However, this is only valid when $x\neq \pm \pi,\pm2\pi,\ldots$. So, just for the heck of it, I decided to do something I thought would not be viable but have done it anyway. I integrated $$\displaystyle \int_{0}^{2\pi}\frac{x^{2}\cos^{2}(kx)}{k^{2}},$$ evaluated the resulting sums and arrived at $\displaystyle \frac{41{\pi}^{5}}{180}$.
Now, take the integral $$\displaystyle \int_{0}^{\pi}x^{2}\ln^{2}(2\cos(x/2))dx=\frac{11{\pi}^{5}}{180}.$$ This one can be done by using Cauchy's cosine formula, differentiating, and so on. Anyway, note that when I add the two results, the correct result for the integral at hand is obtained.
$$\displaystyle \frac{41{\pi}^{5}}{180}+\frac{11{\pi}^{5}}{180}=\frac{13{\pi}^{5}}{45}.$$
By quandary/query is why does this happen to work?. A fluke? Does that cosine sum represent something that when evaluated and added to the above log-cos integral happens to be equivalent to the log-sine integral in question?.
See what I am trying to explain?. I done something I knew I was not supposed to, but it happened to work out. If viable, what would $\displaystyle \int_{0}^{2\pi}\frac{x^{2}\cos^{2}(kx)}{k^{2}}$ represent such that when it is added to $\displaystyle \int_{0}^{\pi}x^{2}\ln^{2}(2\cos(x/2))dx=\frac{11{\pi}^{5}}{180}$ equals $\displaystyle \int_{0}^{2\pi}x^{2}\ln^{2}(2\sin(x/2))dx=\frac{13{\pi}^{5}}{45}$.
I knew I could not just square the cosine and multiply by $x^2$. But,sometimes it can be done due to Parseval, i.e., $\displaystyle \ln^{2}(2\sin(x/2))=\sum_{n=1}^{\infty}\sum_{k=1}^{\infty}\frac{\cos(nx)\cos(kx)}{nk}$. Then, because $\displaystyle \int_{0}^{\pi}\cos(nx)\cos(kx)dx=0, \;\ n\neq k$, one can integrate $\displaystyle \int_{0}^{\pi}\frac{\cos^{2}(kx)}{k^{2}}$, then sum.
This works for $2\pi$ as well, but that $x^2$ term tends to throw a wrench in things But I do not think I can do this in my case because of the $x^2$ term. Or can I?. I was surprised when I saw this. I thought perhaps I stumbled onto a cool way to evaluate this, but I am not entirely sure what I have.
Or, if anyone has their own clever method?.
EDIT: I managed to evaluate this integral by considering the identity
$$\ln\left(2\sin\left(\frac{x}{2}\right)\right)=\ln(1-e^{ix})+\frac{i}{2}(\pi -x)$$