TITLE: Integral $\int_0^\pi \theta^2 \ln^2\big(2\cos\frac{\theta}{2}\big)d \theta$.
QUESTION [29 upvotes]: I am trying to calculate
$$
I=\frac{1}{\pi}\int_0^\pi \theta^2 \ln^2\big(2\cos\frac{\theta}{2}\big)d \theta=\frac{11\pi^4}{180}=\frac{11\zeta(4)}{2}.
$$
Note, we can expand the log in the integral to obtain three interals, one trivial, the other 2 are not so easy, any ideas?  We will use
$$
\left( \ln 2 +\ln \cos \frac{\theta}{2} \right)^2=\ln^2(2)+\ln^2\cos\frac{\theta}{2}+2\ln (2)\ln \cos\big(\frac{\theta}{2}\big)
$$ and re-write I as
$$
\pi I=\ln^2(2)\int_0^\pi \theta^2d\theta  +\int_0^\pi\theta^2 \ln^2 \cos \frac{\theta}{2}d\theta+2\ln 2 \int_0^\pi\theta^2 \ln \cos{\frac{\theta}{2}}d\theta.
$$
Simplfying this further by using $y=\theta/2$ we obtain
$$
\pi I=\frac{\pi^3\ln^2(2)}{3}+16\ln(2)\int_0^{\pi/2} y^2 \ln \cos (y) dy+8\int_0^{\pi/2} y^2 \ln^2 \cos (y) dy
$$
Any Idea how to approach these two integrals? I know that 
$$
\int_0^{\pi/2} \ln \cos y dy= \frac{-\pi\ln(2)}{2}\approx -1.08879
$$
but I am unsure how to use that here.  I do not think partial integration will work, Also the Riemann Zeta function is given by 
$$
\zeta(4)=\sum_{n=1}^\infty \frac{1}{n^4}=\frac{\pi^4}{90}.
$$
Thanks!

REPLY [3 votes]: One way to go about this is to use the identity:
$$\int_{0}^{\frac{\pi}{2}}\cos^{p-1}(x)\cos(ax)dx=\frac{\pi}{2^{p}}\cdot \frac{\Gamma(p)}{\Gamma\left(\frac{a+p+1}{2}\right)\Gamma\left(\frac{p-a+1}{2}\right)}....(1)$$
Then, diff this twice w.r.t 'a', and let a=0.
Then, diff twice w.r.t p and let p=1.
The diffing on the right side may be a little tedious, but get tech to do it.
diffing once w.r.t p will give you $$\int_{0}^{\frac{\pi}{2}}x^{2}\ln(\cos(x))dx=\frac{-\pi^{3}}{24}\ln(2)-\frac{\pi}{3}\zeta(3)$$.
Then, diff again to get the integral in question. 
a fun way to go about evaluating this integral is to use contours.
consider $$f(z)=zlog^{3}(1+e^{2iz})$$ over a rectangular contour with vertices $$-\frac{\pi}{2}, \;\ \frac{\pi}{2}, \;\ \frac{\pi}{2}+Ri, \;\ \frac{-\pi}{2}+Ri$$, with quarter-circle indents around $\pm \frac{\pi}{2}$. 
A good while back, Nick Strehle wrote up a nice post on this method of evaluating log-trig integrals via residues. It is on the site somewhere if you nose around.