# integral $\int_0^{\frac{\pi}{3}}\mathrm{ln}\left(\frac{\mathrm{sin}(x)}{\mathrm{sin}(x+\frac{\pi}{3})}\right)\ \mathrm{d}x$

We want to evaluate

$\displaystyle \int_0^{\frac{\pi}{3}}\mathrm{ln}\left(\frac{\mathrm{sin}(x)}{\mathrm{sin}(x+\frac{\pi}{3})}\right)\ \mathrm{d}x$.

We tried contour integration which was not helpful. Then we started trying to use symmetries, this also doesn't work.

Here is an approach that uses real methods only.

\begin{align*} I &= \int_0^{\pi/3} \ln \left (\frac{\sin x}{\sin \left (x + \frac{\pi}{3} \right )} \right ) \, dx\\ &= \int_0^{\pi/3} \ln (\sin x) \, dx - \int_0^{\pi/3} \ln \left (\sin \left (x + \frac{\pi}{3} \right ) \right ) \, dx. \end{align*} If in the second integral appearing on the right a substitution of $x \mapsto x - \frac{\pi}{3}$ is enforced, one has \begin{align*} I &= \int_0^{\pi/3} \ln (\sin x) \, dx - \int_{\pi/3}^{2\pi/3} \ln (\sin x) \, dx\\ &= 2 \int_0^{\pi/3} \ln (\sin x) \, dx - \int_0^{2\pi/3} \ln (\sin x) \, dx.\tag1 \end{align*}

Now consider the integral $$I(\alpha) = \int_0^\alpha \ln (\sin x) \, dx, \quad 0 < \alpha < \pi.\tag2$$ Taking advantage of the well-known identity $$\ln (\sin x) = -\ln 2 - \sum_{k = 1}^\infty \frac{\cos (2kx)}{k}, \quad 0 < x < \pi,$$ substituting this result into (2), after interchanging the summation with the integration before integrating one finds $$I(\alpha) = -\alpha \ln 2 - \frac{1}{2} \sum_{k = 1}^\infty \frac{\sin (2k \alpha)}{k^2} = -\alpha \ln 2 - \frac{1}{2} \text{Cl}_2 (\alpha).$$ Here $\text{Cl}_2 (\varphi)$ denotes the Clausen function of order two.

In terms of the Clausen function of order two the integral in (1) can be written as $$I = -\text{Cl}_2 \left (\frac{2\pi}{3} \right ) + \frac{1}{2} \text{Cl}_2 \left (\frac{4\pi}{3} \right ).\tag3$$ From the duplication formula for the Clausen function of order two, namely $$\text{Cl}_2 (2\theta) = 2 \text{Cl}_2 (\theta) - 2 \text{Cl}_2 (\pi - \theta), \quad 0 < \theta < \pi,$$ if we set $\theta = 2\pi/3$ in the above duplication formula, as $$\text{Cl}_2 \left (\frac{4\pi}{3} \right ) = 2 \text{Cl}_2 \left (\frac{2\pi}{3} \right ) - 2 \text{Cl}_2 \left (\frac{\pi}{3} \right ),$$ the expression for our integral in (3) can be expressed more simply as $$\int_0^{\pi/3} \ln \left (\frac{\sin x}{\sin \left (x + \frac{\pi}{3} \right )} \right ) \, dx = -\text{Cl}_2 \left (\frac{\pi}{3} \right ).$$

Hint:

As shown in this answer, $$\log(\sin(x))=-\log(2)-\sum_{k=1}^\infty\frac{\cos(2kx)}{k}$$ Therefore, $$\int\log(\sin(x))\,\mathrm{d}x=-x\log(2)-\sum_{k=1}^\infty\frac{\sin(2kx)}{2k^2}$$

Applying the hint: \begin{align} \int_0^{\pi/3}\log\left(\frac{\sin(x)}{\sin(x+\pi/3)}\right)\,\mathrm{d}x &=\int_0^{\pi/3}\log(\sin(x))\,\mathrm{d}x-\int_{\pi/3}^{2\pi/3}\log(\sin(x))\,\mathrm{d}x\\ &=-2\sum_{k=1}^\infty\frac{\sin(2k\pi/3)}{2k^2}+\sum_{k=1}^\infty\frac{\sin(4k\pi/3)}{2k^2}\\ &=-\sum_{k=1}^\infty\frac{\sin(2k\pi/3)}{k^2}+2\sum_{k=1}^\infty\frac{\sin(4k\pi/3)}{4k^2}\\ &=\sum_{k=1}^\infty(-1)^k\frac{\sin(2k\pi/3)}{k^2}\\ &=-\sum_{k=1}^\infty\frac{\sin(k\pi/3)}{k^2}\\ &=-\frac{\sqrt3}2\sum_{k=0}^\infty(-1)^k\left(\frac1{(3k+1)^2}+\frac1{(3k+2)^2}\right) \end{align}


where $\ds{r \equiv {1 \over 2} + {\root{3} \over 2}\,\ic = \exp\pars{{\pi \over 3}\,\ic}}$

\eqref{1} is reduced to \begin{align} &\bbox[10px,#ffd]{\ds{% \int_{0}^{\pi/3}\ln\pars{\sin\pars{x} \over \sin\pars{x + \pi/3}}\,\dd x}} = {\root{3} \over 2}\int_{0}^{1}\ln\pars{t} \pars{{1 \over t - r} - {1 \over t - \bar{r}}}{1 \over r - \bar{r}}\,\dd t \\[5mm] = &\ {\root{3} \over 2}\,{1 \over 2\ic\,\Im\pars{r}}\,2\ic\,\Im\int_{0}^{1}{\ln\pars{t} \over t - r}\,\dd t = -\,\Im\int_{0}^{1}{\ln\pars{t} \over r - t}\,\dd t = -\,\Im\int_{0}^{1/r}{\ln\pars{rt} \over 1 - t}\,\dd t \\[5mm] = &\ -\,\Im\int_{0}^{\large\bar{r}}{\ln\pars{1 - t} \over t}\,\dd t = \Im\int_{0}^{\large\bar{r}}\mrm{Li}_{2}'\pars{t}\,\dd t\qquad \pars{~\mrm{Li}_{s}\ \mbox{is the}\ PolyLogarithm\ Function~} \\[5mm] \implies &\ \bbx{\int_{0}^{\pi/3}\ln\pars{\sin\pars{x} \over \sin\pars{x + \pi/3}}\,\dd x = \Im\mrm{Li}_{2}\pars{\expo{-\pi\ic/3}} \approx -1.0149} \end{align}

The given integral can be approached as follows: $$\begin{eqnarray*} \mathcal{I}=\int_{0}^{\pi/3}\log\left(\frac{\sin x}{\frac{1}{2}\sin x+\frac{\sqrt{3}}{2}\cos x}\right)\,dx&=&\frac{\pi}{3}\log 2-\int_{0}^{\pi/3}\log(1+\sqrt{3}\cot\theta)\,d\theta\\&=&\frac{\pi}{3}\log 2-\int_{1/\sqrt{3}}^{+\infty}\frac{\log(1+t\sqrt{3})}{1+t^2}\,dt\\&=&\frac{\pi} {3}\log2-\int_{0}^{\sqrt{3}}\frac{\log\left(1+\frac{\sqrt{3}}{t}\right)}{1+t^2}\,dt\\&=&\frac{\pi}{3}\log2-\sqrt{3}\int_{1}^{+\infty}\frac{\log(z+1)}{3+z^2}\,dz\\(\text{trigamma})\qquad&=&-\frac{1}{24\sqrt{3}}\left(\psi'\left(\tfrac{1}{6}\right)+\psi'\left(\tfrac{1}{3}\right)-\psi'\left(\tfrac{2}{3}\right)-\psi'\left(\tfrac{5}{6}\right)\right)\end{eqnarray*}$$ from which it follows that $$\mathcal{I}=-\frac{\sqrt{3}}{2}\sum_{k\geq 0}\left(\frac{1}{(6k+1)^2}+\frac{1}{(6k+2)^2}-\frac{1}{(6k+4)^2}-\frac{1}{(6k+5)^2}\right).\tag{1}$$ We don't have a really nicer closed form, but the terms of the last series behaves like $\frac{1}{18k^3}$ for large values of $k$, ensuring a decent speed of convergence of the partial sums. Due to the reflection formulas for the trigamma function we have $$\sum_{k\geq 0}\left(\frac{1}{(6k+1)^2}\color{red}{+}\frac{1}{(6k+5)^2}\right)=\frac{\pi^2}{9},\qquad \sum_{k\geq 0}\left(\frac{1}{(6k+2)^2}\color{red}{+}\frac{1}{(6k+4)^2}\right)=\frac{\pi^2}{27}$$ which can be used to devise acceleration tricks, even if the signs pattern in the previous identity is the "wrong" one. Numerically $\mathcal{I}\approx -1.0149416$.

$(1)$ can be proved also by applying termwise integration to the Fourier series of $\log\sin(x)$, which is well-known.

Hint: $$\displaystyle \int_0^{\dfrac{\pi}{3}}\mathrm{ln}\left(\frac{\mathrm{sin}(x)}{\mathrm{sin}\left(x+\frac{\pi}{3}\right)}\right)\ \mathrm{d}x=\displaystyle \int_0^{\dfrac{\pi}{3}}\mathrm{ln}({\mathrm{sin}(x)})dx-\int_0^{\dfrac{\pi}{3}} \ln\left({\mathrm{sin}\left(x+\frac{\pi}{3}\right)}\right)\ \mathrm{d}x$$

• This is a hint towards what? – Jack D'Aurizio Feb 25 '18 at 17:41
• @JackD'Aurizio Toward looking differently at how he could solve his problem because this makes solving the problem easier I believe. – Mehrdad Zandigohar Feb 25 '18 at 18:05
• I believe that is not true. Both the integrals in the RHS are related to the dilogarithm function evaluated at the third roots of unity. $\log\frac{a}{b}=\log a-\log b$ (for $a,b>0$) is obvious and not really helpful in reaching a "closed" form. – Jack D'Aurizio Feb 25 '18 at 18:08
• I myself knew how to integrate $ln(\sin(x))$ and this made me think this is a better way. It may be obvious but one may make the problem solving easier by this. As omegadot did in his answer too. Anyway, aren't we free to state the things we believe are helpful? – Mehrdad Zandigohar Feb 25 '18 at 18:14
• Better to be sure they are: comments are best suited for uncertainty. What is $\int_{0}^{\pi/5}\log\sin(x)\,dx$, for instance? – Jack D'Aurizio Feb 25 '18 at 18:16