interesting square of log sin integral

I ran across this challenging log sin integral and am wondering what may be a good approach.

$$\int_{0}^{\frac{\pi}{2}}x^{2}\ln^{2}(2\cos(x))dx=\frac{11{{\pi}^{5}}}{1440}$$

This looks like it may be able to be connected to the digamma or incomplete beta function somehow.

I tried using the identity $$\cos(x)=\frac{e^{ix}+e^{-ix}}{2},$$ but that square threw a wrench in my plans.

Maybe write it as $$(x\ln(2\cos(x)))^{2}=\ln^{2}(2)x^{2}+2\ln(2)x^{2}\ln(\cos(x))+x^{2}\ln^{2}(\cos(x))$$ and expand. I doubt if that does any good though.

Does anyone know of a clever way to approach this? It looks like a fun one if I knew a good starting point.

Is there an identity that goes with $$(2\cos(t))^{a}.$$
If $$t^{2}(2\cos(t))^{a}$$ were differentiated twice w.r.t a, then we would have
$$(2\cos(t))^{a}t^{2}\ln^{2}(2\cos(t))$$ Maybe the trig form of Beta which would give $$2^{a}\cdot B(1/2, \frac{a+1}{2}).$$ Then, differentiate this twice and it would somehow relate to the digamma? $$\frac{1}{2}B(1/2,\frac{a+1}{2})=\frac{\sqrt{\pi}\Gamma(\frac{a+1}{2})}{2\Gamma(\frac{a+2}{2})}.$$ Differentiate twice and obtain some sort of Psi relation.

Cheers Everyone.

-
Well, you can rewrite $2\cos x$ as $(e^{2ix}+1)e^{-ix}$ and use the Taylor expansion of $\log(1+u)$, expand out the square, interchange summation and integration, evaluate some definite integrals of $x^3e^{imx}$ and $x^2e^{imx}$'s and then get some zeta functions and... Well maybe that's not the best route. – anon Mar 12 '12 at 13:02
Thanks. I actually tried that, but to no avail. I could get it if it weren't for that x^2 term. Maybe $$\zeta(4)$$ is in there somewhere?. $$\frac{11\pi}{16}\cdot \frac{{\pi}^{4}}{90}$$ – Cody Mar 12 '12 at 15:32
I spent some time yesterday trying to find an alternative solution to this problem using complex analysis. I haven't succeeded yet, but I've "reduced" the problem to computing either of the integrals $$\int_0^\infty x\log^2(1-e^{-2x})\,dx = -\int_0^\infty \frac{2x^2}{e^{2x} - 1}\log{(1-e^{-2x})}\,dx$$ or $$\int_0^{\pi/2} \log^4{(2\cos{x})}\,dx.$$ I've included some more detail in a recent answer to another question of @Cody. Anyways, if anyone has any ideas... – Nick Strehlke Mar 14 '12 at 2:09

As I remarked in a comment, I have spent a while trying to derive this identity by means of contour integration. Though I have not succeeded at that, (I take great pleasure in striking that out; see my other answer below!) I have found some related identities in my search which surprised me quite a bit, and I think they're worth sharing. For example, using the integral you asked about, I have shown that $$$$\sum_{n = 1}^\infty \frac{H_n}{n^3} = \frac{5}{4}\cdot \frac{\pi^4}{90} = \frac{5}{4} \zeta(4). \tag{1}$$$$ Here $$H_n = \sum_{k = 1}^n \frac{1}{k}$$ is the $n$th harmonic number. Here are a couple more examples. I will use the first to derive $(1)$.

1. With the method from this answer, one can show that $$\int_0^{\pi/2} x^2\log^2(2\cos{x})\,dx = \frac{1}{5}\left(\frac{\pi}{2}\right)^5 + \pi \int_0^\infty y \log^2(1-e^{-2y})\,dy,$$ and it then follows from the result of your question that $$\pi \int_0^\infty y \log^2(1- e^{-2y})\,dy = \frac{11}{45}\left(\frac{\pi}{2}\right)^5 - \frac{1}{5}\left(\frac{\pi}{2}\right)^5 = \frac{\pi}{8} \cdot \frac{\pi^4}{90}.$$
2. I also shared this example in the other answer, but for completeness, let me mention that $$\int_0^{\pi/2} x^2\log^2(2\cos{x})\,dx = \frac{1}{30}\left(\frac{\pi}{2}\right)^5 + \frac{1}{6}\int_0^{\pi/2} \log^4(2\cos{x})\,dx,$$ hence $$\int_0^{\pi/2} \log^4(2\cos{x})\,dx = \frac{19}{15}\left(\frac{\pi}{2}\right)^5.$$

More details about the derivations of 1. and 2. are contained in the answer I referenced above (near the bottom).

Let me now turn to deriving $(1)$. Taking $x = - e^{-2y}$ in the series expansion $$\log{(1+x)} = \sum_{n = 1}^\infty \frac{(-1)^{n+1}x^n}{n}$$ and inserting the result into the integral evaluated in 1. gives \begin{align} \frac{1}{8}\cdot\frac{\pi^4}{90} &= \int_0^\infty y \log^2(1 - e^{-2y})\,dy \\ & = \int_0^\infty y \left(\sum_{n = 1}^\infty \frac{e^{-2ny}}{n}\right)^2\,dy \\ & = \sum_{m = 1}^\infty\sum_{n = 1}^\infty\frac{1}{nm} \int_0^\infty y e^{-2(n + m)y}\,dy \\ & = \frac{1}{4}\sum_{m = 1}^\infty\sum_{n = 1}^\infty \frac{1}{nm(n+m)^2}. \tag{2} \end{align} Now put $r = m+n$ and $s=n$ in order to write \begin{align} \sum_{m = 1}^\infty\sum_{n = 1}^\infty \frac{1}{nm(n+m)^2} & = \sum_{r = 2}^\infty \frac{1}{r^2}\sum_{s = 1}^{r-1} \frac{1}{s(r-s)} = 2 \sum_{r=2}^\infty \frac{1}{r^3} \sum_{s=1}^{r-1}\frac{1}{s}, \tag{3} \end{align} with the last equation a consequence of the identity $\frac{1}{s(r-s)} = \frac{1}{r}\left(\frac{1}{s}+ \frac{1}{r-s}\right)$. Insert $(3)$ into $(2)$ and multiply both sides by $2$ to get $$\frac{1}{4} \cdot \frac{\pi^4}{90} = \sum_{r=2}^\infty \frac{1}{r^3} \sum_{s=1}^{r-1}\frac{1}{s} = \sum_{r=2}^\infty \frac{H_{r-1}}{r^3}.$$ Since $H_r - H_{r-1} = 1/r$, the identity $(1)$ now follows from the equations $$\frac{\pi^4}{90} = \sum_{r=1}^\infty \frac{1}{r^4} = \sum_{r = 1}^\infty \frac{H_r}{r^3} - \sum_{r=2}^\infty \frac{H_{r-1}}{r^3} = \sum_{r = 1}^\infty \frac{H_r}{r^3} - \frac{1}{4}\cdot\frac{\pi^4}{90}.$$

-
Very good answer! – Daniel Montealegre Mar 22 '12 at 6:20

With a little time on my hands these past couple of days, I have finally succeeded in computing this integral through contour integration; the method is very similar in spirit to my answer here. The only background needed is knowledge of Cauchy's integral theorem and the fact that $\zeta(4) = \pi^4/90$. I've made a few remarks on generalization towards the bottom.

The strategy is as follows. We integrate the principal branch of $f(z) = z\log^3{(1+e^{2i z})}$ over an appropriately chosen contour in order to prove \begin{align} \int_{-\pi/2}^{\pi/2}x^2\log^2{(2\cos{x})}\,dx & = \int_{-\pi/2}^{\pi/2}x^4\,dx-\frac{\pi}{3}\int_0^\infty \log^3{(1-e^{-2y})}\,dy. \tag{1} \end{align} This leaves us in good shape; due to the fact that the integrand is even, the left-hand side is twice the integral we wish to evaluate. The first integral on the right is easily computed as $\pi^5/80$. To evaluate the second integral, put $e^{-v} = 1-e^{-2y}$; mild computations give $-(e^v - 1)^{-1}\,dv = dy$, and then \begin{align} -\frac{\pi}{3}\int_0^\infty \log^3{(1-e^{-2y})}\,dy & = \frac{\pi}{6}\int_0^\infty\frac{v^3}{e^v - 1}\,dv = \pi\zeta(4). \tag{2} \end{align} The last equation follows from the well-known identity $$\Gamma(s)\zeta(s) = \int_0^\infty \frac{v^{s-1}}{e^{v}-1}\,dv$$ which holds for $\text{Re}\,s > 1$ and can be derived easily by developing the integrand in a geometric series. Upon inserting $(2)$ into $(1)$ and simplifying we arrive at the desired result.

It remains to prove $(1)$; as mentioned, the argument is entirely analogous to one I gave in this answer to another of Cody's questions. For completeness, I include it here. Consider the region obtained from $\mathbb C$ by removing the half-lines on which $\text{Re}\,z$ is an integer multiple of $\pi/2$ and $\text{Im}\,z \leq 0$. On this region, we can define a branch of $\log{(1+e^{2iz})} = \log{(2e^{iz}\cos{z})}$; we choose the branch with imaginary part between $-\pi$ and $\pi$. Having done this, let $f(z) = z\log^3{(1+e^{2iz})}$. We wish to integrate $f(z)$ over the contour obtained by removing the corners from the rectangle determined by $-\pi/2$ and $\pi/2 + iR$, where $R > 0$. To complete the contour we replace the bottom corners with quarter-circles of radius $\delta >0$. The intention is to let $R \to \infty$ and $\delta \to 0$. ${}$

For fixed values of $\delta$ and $R$, Cauchy's theorem says that $f(z)$ integrates to zero over the contour. As $R \to \infty$, the contribution from the upper horizontal side tends to $0$ because $f(x+iR) \to 0$ uniformly for $-\pi/2 \leq x \leq \pi/2$. By writing $1+e^{2i z} = 1- e^{2i(z-\pi/2)}$ one sees that $1+e^{2i z} = O(z-\pi/2)$, and therefore that $\log{(1+e^{2iz})} = O(\log{|z-\pi/2|})$ as $z \to \pi/2$. It follows that the contribution from the left quarter-circle is $O(\delta^2\log^3{\delta})$, hence that it vanishes in the limit $\delta \to 0$. The same argument applies to the other quarter-circle, and we are left with the contributions from the vertical sides and the lower horizontal side.

After taking limits, the contribution from the vertical sides is \begin{align} i\int_0^\infty f(iy+\pi/2)\,dy -i\int_0^\infty f(iy - \pi/2)\,dy = i\pi\int_0^\infty\log^3{(1-e^{-2y})}\,dy. \tag{3} \end{align} Now for $x$ between $-\pi/2$ and $\pi/2$, the quantity $2\cos{x}$ is positive. This means that the unique value of $\arg{(2e^{ix}\cos{x})}$ which lies between $-\pi$ and $\pi$ is simply $x$. As we have chosen the principle branch, we obtain $\log{(2e^{ix}\cos{x})} = \log{(2\cos{x})}+ix$. Therefore the contribution from the lower horizontal side may be written $$\int_{-\pi/2}^{\pi/2} f(x)\,dx = \int_{-\pi/2}^{\pi/2}x\left(\log{(2\cos{x})} + ix\right)^3\,dx. \tag{4}$$ By the preceding analysis, $(3)$ and $(4)$ sum to zero. Since $(3)$ is purely imaginary, this means in particular that the imaginary part of $(4)$ is equal to the negative of $(3)$. The last statement is equivalent to $(1)$.

Because I have spent quite some time with this question, I would like to make a few remarks in the direction of a generalization. By taking $g(z) = p(z) \log^m(1+e^{2iz})$ in place of $f(z)$ above, where $p(z)$ is a polynomial and $m \in \mathbb N$, one finds by repeating the same arguments that \begin{align} \int_{-\pi/2}^{\pi/2} p(x)&\left(\log{(2\cos{x})} + ix\right)^m\,dx \\ &= -i \int_0^\infty \left(p(iy + \pi/2)-p(iy - \pi/2)\right)\log^m{(1-e^{-2y})}\,dy. \tag{5} \end{align} Clever choices of $p$ and $m$ then furnish a number of integral and series identities. Moreover, the identities $$\int_0^\infty y^n \log{(1-e^{-2y})}\,dy = -\frac{1}{2^{n+1}}\Gamma(n+1)\zeta(n+2) \tag{6}$$ and $$\int_0^\infty \log^m{(1-e^{-2y})}\,dy = \frac{(-1)^{m}}{2}\int_0^\infty \frac{y^m}{e^y - 1}\,dy = \frac{(-1)^m}{2}\Gamma(m+1)\zeta(m+1) \tag{7}$$ provide a connection between the integrals on the left-hand side of $(5)$ and the values taken by $\zeta$ at positive integers $n\geq2$. Here $(6)$ is derived by expanding $\log{(1-e^{-2y})}$ in powers of $e^{-2y}$ while $(7)$ is derived in the same way as $(2)$.

-
This is truly great stuff. – Antonio Vargas Mar 31 '12 at 3:17
Thanks Antonio. – Nick Strehlke Mar 31 '12 at 8:45
Wow, Nick. Beautiful. Thank you. I am sorry I did not get back sooner. This was an older thread and I just noticed your wonderful response. – Cody Apr 6 '12 at 16:01
I know it has been a long time since you answered this, but I wanted to thank you again for the time you took to post all this. I have recently begun studying CA and your post has proven valuable. Absolute genius. – Cody May 30 '12 at 17:10
Thank you for the kind words Cody. I really enjoyed this problem, and I'm glad you found my answer useful! – Nick Strehlke Jun 2 '12 at 3:26

I found the solution to this problem. If anyone is interested, see here:

http://de.wikibooks.org/wiki/Formelsammlung_Mathematik:_Bestimmte_Integrale:_Form_R%28x,log,cos%29#0.2

-
 Very nice collection, in most cases with proofs. Thanks. – vesszabo Aug 29 '12 at 14:21