# Interesting log sine integrals $\int_0^{\pi/3} \log^2 \left(2\sin \frac{x}{2} \right)dx= \frac{7\pi^3}{108}$

Show that

\begin{aligned} \int_0^{\pi/3} \log^2 \left(2\sin \frac{x}{2} \right)dx &= \frac{7\pi^3}{108} \\ \int_0^{\pi/3}x\log^2 \left(2\sin\frac{x}{2} \right)dx &= \frac{17\pi^4}{6480}\end{aligned}

• I can solve $\displaystyle \int_0^\pi \log^2 \left(2\sin \frac{x}{2} \right)dx$ but I don't know what to do if the limits are from $0$ to $\pi/3$.
• I have no idea what to do if the integrand contains an $x$.
• I feel that the Polylogarithm function will be involved however I don't know how it can be implemented here.

It would be really great if someone could take the initiative to prove these.

• Hello, you can see here prove , de.wikibooks.org/wiki/… – math110 Mar 27 '13 at 13:54
• Thanks but it's not written in english. – Anthony Mar 27 '13 at 13:58
• @Anthony. True, it's written in maths, more understandable to me than english ;-) – Jean-Claude Arbaut Mar 27 '13 at 16:57
• By the way, the indefinite integral ${\large\int}\log^2 \left(2\sin \frac{x}{2} \right)dx$ has a closed form. – Vladimir Reshetnikov Jan 2 '16 at 20:54

The best way I see to do the simpler integral (the one without the $x$ in front) is to substitute $u=2 \sin{(x/2)}$ and expand the resulting integrand in a series. To wit, upon doing the substitution, we get

$$\int_0^{\pi/3} dx \: \log^2{[2 \sin{(x/2)}]} = \int_0^1 du \frac{\log^2{u}}{\sqrt{1-u^2/4}}$$

Note that

$$\frac{1}{\sqrt{1-u^2/4}} = \sum_{k=0}^{\infty} \frac{1}{2^{4 k}} \binom{2 k}{k} u^{2 k}$$

Then the integral becomes

$$\sum_{k=0}^{\infty} \frac{1}{2^{4 k}} \binom{2 k}{k} \int_0^1 du\: u^{2 k} \log^2{u}$$

The integral on the right may be done through integration by parts; the process is very interesting, but I leave it to the reader to get the nifty result that

$$\int_0^1 du\: u^{2 k} \log^2{u}=\frac{2}{(2 k+1)^3}$$

Therefore the evaluation of the integral becomes an evaluation of the following sum:

$$2 \sum_{k=0}^{\infty} \frac{1}{2^{4 k}} \binom{2 k}{k}\frac{1}{(2 k+1)^3}$$

To evaluate this sum, define

$$f(z) = 2 \sum_{k=0}^{\infty} \frac{1}{2^{4 k}} \binom{2 k}{k}\frac{z^{2 k+1}}{(2 k+1)^3}$$

The desired integral is $f(1)$. To derive an equation for $f$, recall the binomial series above:

$$\frac{d}{dz}\left [z \frac{d}{dz} \left [ z \frac{d}{dz} f(z)\right ] \right ] = 2 \sum_{k=0}^{\infty} \frac{1}{2^{4 k}} \binom{2 k}{k} z^{2 k} = \frac{2}{\sqrt{1-z^2/4}}$$

The resulting integrations are elementary except for the last one, which results in a nasty generalized hypergeometric function, something like

$$2 _4F_3\left(\frac{1}{2},\frac{1}{2},\frac{1}{2},\frac{1}{2},\frac{3}{2},\frac{3}{2},\frac{3}{2},\frac{1}{4}\right)$$

which in fact does numerically check out.

• Thanks. I like your approach. – Anthony Mar 28 '13 at 8:04
• Hi, I am always in awe of your posts Ron. I'm reading through your answer out of curiosity and I am wondering where your identity for $\frac{1}{\sqrt{1 - \frac{u^2}{4}}}$ comes from. – Chantry Cargill Aug 11 '14 at 3:48
• @ChantryCargill: much appreciated! The identity comes from the Taylor series for $(1-x)^{-1/2}$ about $x=0$. – Ron Gordon Aug 11 '14 at 11:04
• @RonGordon And we can convert this generalized hypergeometric function to a combination of elementary functions and trilogarithms as shown in this answer and comments to it, and then simplify it to get $7\pi^3/216$. – Vladimir Reshetnikov Dec 21 '15 at 21:21
• @VladimirReshetnikov: wow, really good-looking work there. I'll need to go through it in detail so I can learn from it. – Ron Gordon Dec 21 '15 at 21:25

Here's another approach for evaluating the one without the $x$ in front.

First notice that it's equivalent to showing that $$\int_{0}^{\pi /6} \log^{2}(2 \sin x) \ dx = \frac{7 \pi^{3}}{216}.$$

Using the principal branch of the logarithm and assuming that $0 < x < \pi$, we have \begin{align} \log(1-e^{2ix}) &= \log (e^{-ix}-e^{ix}) + \log(e^{ix}) \\ &= \log(-2i \sin x) + ix \\ &= \log(2 \sin x) - \frac{i \pi}{2} + ix. \end{align}

Squaring both sides and integrating, $$\int_{0}^{\pi /6} \left(\log(2 \sin x) - \frac{i \pi}{2} + ix \right)^{2} \ dx = \int_{0}^{\pi /6} \log^{2} (1-e^{2ix}) \ dx .$$

Then equating the real parts on both sides of the equation, we get

\begin{align} \int_{0}^{\pi /6} \log^{2}(2 \sin x) \ dx &= \int_{0}^{\pi/6} \left(x- \frac{\pi}{2} \right)^{2} \ dx + \text{Re} \int_{0}^{\pi /6} \log^{2}(1-e^{2ix}) \ dx \\ &= \frac{19 \pi^{3}}{648} +\text{Re} \int_{C} \log^{2}(1-z) \frac{dz}{2iz} \\ &=\frac{19 \pi^{3}}{648} + \frac{1}{2} \ \text{Im} \int_{C} \frac{\log^{2}(1-z)}{z} \ dz \end{align}

where $C$ is the portion of the unit circle from $z=1$ to $z=e^{ \pi i /3}$.

But since $\frac{\log^{2}(1-z)}{z}$ is analytic for $\text{Re}(z) <1$,

\begin{align} \int_{C} \frac{\log^{2}(1-z)}{z} \ dz &= \int_{1}^{e^{\pi i /3}} \frac{\log^{2}(1-z)}{z} \ dz . \end{align}

Then integrating by parts twice, we get

\begin{align} \text{Im} \int_{1}^{e^{\pi i /3}} \frac{\log^{2}(1-z)}{z} \ dz &= \text{Im} \ \log^{2}(1-z) \log(z) \Bigg|^{e^{\pi i /3}}_{1} + 2 \ \text{Im} \int_{1}^{e^{\pi i /3}} \frac{\log(1-z) \log (z)}{1-z} \ dz \\ &= \text{Im} \ \log^{2}(e^{-\pi i /3}) \log(e^{\pi i /3}) + 2 \ \text{Im} \ \log(1-z) \text{Li}_{2}(1-z) \Bigg|^{e^{\pi i / 3}}_{1} \\ &+ 2 \ \text{Im} \int_{1}^{e^{\pi i / 3}} \frac{\text{Li}_{2}(1-z)}{1-z} \ dz \\ &=- \frac{ \pi^3}{27} - \frac{2 \pi }{3}\text{Im} \ i \ \text{Li}_{2} (e^{- \pi i /3}) - 2 \ \text{Im} \ \text{Li}_{3}(1-z) \Bigg|^{e^{\pi i/3}}_{1} \\ &= - \frac{ \pi^3}{27} - \frac{2 \pi }{3}\text{Im} \ i \ \text{Li}_{2} (e^{- \pi i /3}) - 2 \ \text{Im} \ \text{Li}_{3}(e^{ -\pi i /3}) \\ &= - \frac{\pi^3}{27} - \frac{2 \pi }{3} \sum_{n=1}^{\infty} \frac{\cos (n \pi /3)}{n^{2}} +2 \sum_{n=1}^{\infty} \frac{\sin (n \pi /3)}{n^3}. \end{align}

Integrating both sides of the Fourier series $$\sum_{n=1}^{\infty} \frac{\sin (k \theta)}{k} = \frac{\pi - \theta}{2} \ , \ 0 < \theta < 2 \pi$$

we get

$$\sum_{n=1}^{\infty} \frac{\cos (k \theta)}{k^{2}} = \frac{\theta^{2}}{4} - \frac{\pi \theta}{2} + \frac{\pi^{2}}{6} .$$

And integrating a second time, $$\sum_{n=1}^{\infty} \frac{\sin (k \theta)}{k^{3}} = \frac{\theta^{3}}{12} - \frac{\pi \theta^{2}}{4} + \frac{\pi^{2} \theta}{6}.$$

Therefore,

$$\sum_{n=1}^{\infty} \frac{\cos (n \pi /3)}{n^{2}} = \frac{\pi^{2}}{36}$$

and $$\sum_{n=1}^{\infty} \frac{\sin (n \pi /3)}{n^{3}} = \frac{5 \pi^{3}}{162}.$$

So finally we have

\begin{align} \int_{0}^{\pi /6} \log^{2}(2 \sin x) \ dx &= \frac{19 \pi^{3}}{648} + \frac{1}{2} \left[ - \frac{ \pi^{3}}{27} - \frac{2 \pi }{3} \left(\frac{\pi^{2}}{36} \right) + 2 \left( \frac{5 \pi^{3}}{162} \right) \right] \\ &= \frac{7 \pi^{3}}{216} . \end{align}

• Random Variable, your solution is very nice. But in your answer and the one form de.wikibooks.org/wiki/…, complex analysis is used. I do not know if there is a way to use only real analysis to solve the problem. – xpaul Dec 7 '14 at 16:19