# Evaluation of $\int_0^{\pi/3} \ln^2\left(\frac{\sin x }{\sin (x+\pi/3)}\right)\,\mathrm{d}x$

I plan to evaluate

$$\int_0^{\pi/3} \ln^2\left(\frac{\sin x }{\sin (x+\pi/3)}\right)\, \mathrm{d}x$$ and I need a starting point for both real and complex methods. Thanks !

Sis.

-
You ask very nice questions; I've learned a LOT from them! –  anon271828 Feb 15 '13 at 22:05
@anon271828: I'm very glad to read that. Thank you :-) –  Chris's sis Feb 15 '13 at 22:08

It turns out that this integral takes on a very simple form amenable to analysis via residues. Let $u = \sin{x}/\sin{(x+\pi/3)}$. We may then find that (+)

$$\tan{x} = \frac{(\sqrt{3}/2)u}{1-(u/2)}$$

A little bit of algebra reveals a very nice form for the differential:

$$dx = \frac{\sqrt{3}}{2} \frac{du}{1-u+u^2}$$

so the original integral takes on a much simpler-looking form:

$$\frac{\sqrt{3}}{2} \int_0^1 du \frac{\log^2{u}}{1-u+u^2}$$

This is not ready for contour integration yet. We may transform this into such an integral by substituting $u=1/v$ and observing that

$$\int_0^1 du \frac{\log^2{u}}{1-u+u^2} = \int_1^\infty du \frac{\log^2{u}}{1-u+u^2} = \frac{1}{2} \int_0^\infty du \frac{\log^2{u}}{1-u+u^2}$$

We may now analyze that last integral via the residue theorem. Consider the integral

$$\oint_C dz \frac{\log^3{z}}{1-z+z^2}$$

where $C$ is a keyhole contour that passes up and back along the positive real axis. It may be shown that the integral along the large and small circular arcs vanish as the radii of the arcs goes to $\infty$ and $0$, respectively. We may then write the integral in terms of positive contributions just above the real axis and negative contributions just below. The result is

$$\oint_C dz \frac{\log^3{z}}{1-z+z^2} = \begin{array}\\ i \left ( - 6 \pi \int_0^\infty du \frac{\log^2{u}}{1-u+u^2} + 8 \pi^3 \int_0^\infty du \frac{1}{1-u+u^2} \right ) \\ + 12 \pi^2 \int_0^\infty du \frac{\log{u}}{1-u+u^2} \end{array}$$

We set this equal to $i 2 \pi$ times the sum of the residues of the poles of the integrand within $C$. The poles are $z \in \{e^{i \pi/3},e^{i 5\pi/3}\}$. The residues are

$$\mathrm{Res}_{z=e^{i \pi/3}} = -\frac{\pi^3}{27 \sqrt{3}}$$

$$\mathrm{Res}_{z=e^{i 5\pi/3}} = \frac{125 \pi^3}{27 \sqrt{3}}$$

$i 2 \pi$ times the sum of these residues is then

$$i \frac{248 \pi^4}{27 \sqrt{3}}$$

Equating imaginary parts of the integral to the above quantity, we see that

$$- 6 \pi \int_0^\infty du \frac{\log^2{u}}{1-u+u^2} + 8 \pi^3 \int_0^\infty du \frac{1}{1-u+u^2} = \frac{248 \pi^4}{27 \sqrt{3}}$$

Now, I will state without proof for now that (++)

$$\int_0^\infty du \frac{1}{1-u+u^2} = \frac{4 \pi}{3 \sqrt{3}}$$

Then with a little arithmetic, we find that

$$\int_0^\infty du \frac{\log^2{u}}{1-u+u^2} = \frac{20 \pi^3}{81 \sqrt{3}}$$

The integral we want is $\sqrt{3}/4$ times this value; therefore

$$\int_0^{\pi/3} dx \log^2{\left [ \frac{\sin{x}}{\sin{(x + \pi/3)}} \right ]} = \frac{5\pi^3}{81}$$

Proof of (++)

Now, to prove (++), we go right back to the observation (+) that

$$x = \int \frac{du}{1-u+u^2} \implies \tan{\left ( \frac{\sqrt{3}}{2} x \right )} = \frac{(\sqrt{3}/2)u}{1-(u/2)}$$

Therefore

$$\int_0^1 \frac{du}{1-u+u^2} = \frac{2}{\sqrt{3}} \left [ \arctan \left ( \frac{(\sqrt{3}/2) u}{1-(u/2)} \right ) \right ]_0^1 = \frac{2}{\sqrt{3}} \frac{\pi}{3}$$

and we showed that this is $1/2$ the integral over $[0,\infty)$, and

$$\int_0^\infty \frac{du}{1-u+u^2} = \frac{4 \pi}{3 \sqrt{3}}$$

QED

-
That's an awesome proof. –  Chris's sis Feb 16 '13 at 6:57
@rlgordonma: It is a clever choice for the change of variables (+1), –  Mhenni Benghorbal Feb 16 '13 at 15:12
Very nice, as usual, +1. –  1015 Feb 16 '13 at 16:02
This is rather remarkable! +1 for the proof. How do you come up with these ideas for approaches? Experience/exposure? Natural talent? Some other ingredient I can try to incorporate into my life? :) –  anon271828 Feb 19 '13 at 1:55
@anon271828 (and Mhenni): I wanted a contour integral with the $\log^2{u}$ term, so I tried that change of variables without any expectations. It was simply a guess, nothing more, and an obvious one at that. That it worked out so beautifully was a pleasant surprise. What was very nice was that the same change in variable applied to both integrals that needed to be evaluated. –  Ron Gordon Feb 19 '13 at 9:13

Here is a start, using the change of variables $x=\arctan(t)$, we have

$$\int_0^{\pi/3} \ln^2\left(\frac{\sin x }{\sin (x+\pi/3)}\right)\, \mathrm{d}x = \int _{0}^{\sqrt {3}}\!{\frac { \left( \ln \left( 2 \right) +\ln \left( t \right) -\ln \left( t+\sqrt {3} \right) \right) ^{2}}{1+{t }^{2}}}{dt}$$

$$= \int _{0}^{\sqrt {3}}\!{\frac { \left( \ln \left( \frac{2t}{t+\sqrt {3}} \right)\right)^{2}}{1+{t }^{2}}}{dt} = \frac{\sqrt{3}}{2}\int _{0}^{1}\!{\frac { \left( \ln \left( y\right) \right) ^{2}}{1-y+{y }^{2}}}{dt}.$$

The later integral follows by using the change of variables $\frac{2t}{t+\sqrt {3}}=y$. Now, to evaluate the last integral, you need to use some techniques that have been used before such as partial fraction decomposition combined with the use of polylogarithm function. Here are some links link 1, link 2.

-
thank you for the clever way! (+1) –  Chris's sis Feb 16 '13 at 6:58
@Chris'ssisterandpals: You are welcome. –  Mhenni Benghorbal Feb 16 '13 at 15:07


\begin{align}&\color{#c00000}{% \int_{0}^{\pi/3}\ln^{2}\pars{\sin\pars{x} \over \sin\pars{x + \pi/3}}\,\dd x} =\int_{-\pi/6}^{\pi/6}\ln^{2}\pars{\sin\pars{x + \pi/6} \over \cos\pars{x}}\,\dd x \\[3mm]&=\int_{-\pi/6}^{\pi/6}\ln^{2}\pars{{\root{3} \over 2}\tan\pars{x} + \half} \,\dd x \end{align}

$$t\equiv{\root{3} \over 2}\tan\pars{x} + \half\quad\imp\quad \left\lbrace\begin{array}{rcl} x & = & \arctan\pars{2t - 1 \over \root{3}} \\ \dd x & = & {\root{3} \over 2}\,{\dd t \over t^{2} - t + 1} \end{array}\right.$$

$$\color{#c00000}{% \int_{0}^{\pi/3}\ln^{2}\pars{\sin\pars{x} \over \sin\pars{x + \pi/3}}\,\dd x} ={\root{3} \over 2}\int_{0}^{1}{\ln^{2}\pars{t} \over t^{2} - t + 1}\,\dd t$$ $\ds{t^{2} - t + 1 = 0}$ roots are given by $\ds{t_{\rm r} = {1 + \root{3}\ic \over 2} = \expo{\ic\pi/3}}$ and $\ds{t_{\rm r}^{*} = { 1 \over t_{\rm r}}}$ such that: \begin{align}&\color{#c00000}{% \int_{0}^{\pi/3}\ln^{2}\pars{\sin\pars{x} \over \sin\pars{x + \pi/3}}\,\dd x} ={\root{3} \over 2}\int_{0}^{1} {\ln^{2}\pars{t} \over \pars{t - t_{\rm r}}\pars{t - t_{\rm r}^{*}}}\,\dd t \\[3mm]&={\root{3} \over 2}{1 \over 2\ic\,\Im\pars{t_{\rm r}}} \int_{0}^{1}\ln^{2}\pars{t} \pars{{1 \over t - t_{\rm r}} - {1 \over t - t_{\rm r}^{*}}}\,\dd t =\Im\int_{0}^{1}{\ln^{2}\pars{t} \over t_{\rm r}^{*} - t}\,\dd t \\[3mm]&=\Im\int_{0}^{t_{\rm r}}{\ln^{2}\pars{t_{\rm r}^{*}t} \over 1 - t}\,\dd t =\Im\int_{0}^{t_{\rm r}}\ln\pars{1 - t}\bracks{% 2\ln\pars{t_{\rm r}^{*}t}\,{1 \over t}}\,\dd t \\[3mm]&=-2\Im\int_{0}^{t_{\rm r}}{{\rm Li}_{1}\pars{t} \over t}\,\ln\pars{t_{\rm r}^{*}t} \,\dd t \end{align} where $\ds{{\rm Li}_{\rm s}\pars{z}}$ is a PolyLogarithm Function.

By using the recursive property of those functions: \begin{align}&\color{#c00000}{% \int_{0}^{\pi/3}\ln^{2}\pars{\sin\pars{x} \over \sin\pars{x + \pi/3}}\,\dd x} =-2\Im\int_{0}^{t_{\rm r}}\totald{{\rm Li}_{2}\pars{t}}{t}\, \ln\pars{t_{\rm r}^{*}t}\,\dd t =2\Im\int_{0}^{t_{\rm r}}{{\rm Li}_{2}\pars{t} \over t}\,\dd t \\[3mm]&=2\Im\int_{0}^{t_{\rm r}}\totald{{\rm Li}_{3}\pars{t}}{t}\,\dd t =2\ \Im{\rm Li}_{3}\pars{t_{\rm r}} \end{align}

\begin{align}&\color{#c00000}{% \int_{0}^{\pi/3}\ln^{2}\pars{\sin\pars{x} \over \sin\pars{x + \pi/3}}\,\dd x} =-\ic\bracks{% {\rm Li}_{3}\pars{\expo{\ic\pi/3}} - {\rm Li}_{3}\pars{\expo{-\ic\pi/3}}} \\[3mm]&=-\ic\bracks{-\,{\pars{2\pi\ic}^{3} \over 3!}\,{\rm B}_{3}\pars{1 \over 6}} ={4 \over 3}\,\pi^{3}\ \overbrace{\bracks{% \pars{1 \over 6}^{3} - {3 \over 2}\,\pars{1 \over 6}^{2} +\half\,\pars{1 \over 6}}}^{\ds{=\ {5 \over 108}}} \end{align} where we used Jonquiere Inversion Formula and $\ds{{\rm B}_{n}\pars{x}}$ is a Bernoulli Polynomial with $\ds{{\rm B}_{3}\pars{x} = x^{3} - {3 \over 2}\,x^{2} + \half\,x}$.

$$\color{#66f}{\large% \int_{0}^{\pi/3}\ln^{2}\pars{\sin\pars{x} \over \sin\pars{x + \pi/3}}\,\dd x ={5\pi^{3} \over 81}} \approx 1.9140$$

-
Good job (+1). :-) –  Chris's sis Jun 9 at 8:23