General closed form for $L(\phi)=\int_0^\phi \log(\sin x)\mathrm dx$ when $\phi\in(0,\pi)$

closed-forminfinite-productintegration

I would like to know if there is a general closed form for

$$L(\phi)=\int_0^\phi \log(\sin x)\mathrm dx,\qquad \phi \in(0,\pi)$$

Context: (below are also the extent of my search for a closed form.)

I would like to know such a closed form because it would give rise to many really neat infinite products. Here's how:

We start with
$$\sin x=x\prod_{n\geq1}\frac{\pi^2n^2-x^2}{\pi^2n^2}$$
So $$\log\sin x=\log x+\sum_{n\geq1}\log\frac{\pi^2n^2-x^2}{\pi^2n^2}$$
Then integrating both sides over $[0,\phi]$,
$$L(\phi)=\phi(\log\phi-1)+\sum_{n\geq1}\phi\left[\log\frac{\pi^2n^2-\phi^2}{\pi^2n^2}-2\right]+\pi n\log\frac{\pi n+\phi}{\pi n-\phi}$$
Then using $$\sum_i\log a_i=\log\prod_i a_i$$
as well as $$a\log b=\log(b^a)$$
We have
$$L(\phi)+\log\frac{e^\phi}{\phi^\phi}=\log\prod_{n\geq1}\left(\frac{\pi^2n^2-\phi^2}{(e\pi n)^2}\right)^{\phi}\left(\frac{\pi n+\phi}{\pi n-\phi}\right)^{\pi n}$$
So taking $\exp$ on both sides,
$$\prod_{n\geq1}\left(\frac{\pi^2n^2-\phi^2}{(e\pi n)^2}\right)^{\phi}\left(\frac{\pi n+\phi}{\pi n-\phi}\right)^{\pi n}=\frac{\exp[\phi+ L(\phi)]}{j(\phi)}$$
Where $j(x)=x^x$. Similarly, if we set
$$k(\phi)=\int_0^\phi\log(\cot x)\mathrm dx$$
We see that $$k(\phi)=L(\phi+\pi/2)-L(\phi)+\frac\pi2\log 2$$
And it can be shown in a similar way that
$$\prod_{n\geq1}\frac{(\pi^2n^2-(\phi+\pi/2)^2)^{\phi+\pi/2}}{(e\pi n)^\pi(\pi^2n^2-\phi^2)^{\phi}}\left(\frac{(\pi n+\pi/2+\phi)(\pi n-\phi)}{(\pi n-\pi/2-\phi)(\pi n+\phi)}\right)^{\pi n}=2^{\pi/2}\frac{j(\phi)}{j(\phi+\pi/2)}\exp[\pi/2+k(\phi)]$$
And since there are a few nice closed forms for $L(\phi)$ and $k(\phi)$, and there are these beautiful products to accompany them, it would be very fitting if there were a general closed form.

Best Answer

Let ${\rm Cl}_2$ denote the Clausen function. It holds that

$$\int_{0}^{\theta} \log \left ( \sin x \right )\, {\rm d}x = -\frac{1}{2}{\rm Cl}_2 (2\theta) - \theta \log 2$$

Proof:

\begin{align*} \int_{0}^{\theta} \log \sin x \, {\rm d}x &= \int_{0}^{\theta} \left ( -\log 2 - \sum_{k=1}^{\infty} \frac{\cos 2kx}{k} \right )\, {\rm d}\theta \\ &= - \theta \log 2 - \int_{0}^{\theta} \sum_{k=1}^{\infty} \frac{\cos 2kx}{k}\, {\rm d}x\\ &= -\theta \log 2 - \sum_{k=1}^{\infty} \frac{1}{k} \int_{0}^{\theta} \cos 2kx \, {\rm d}x\\ &= - \theta \log 2 - \frac{1}{2}\sum_{k=1}^{\infty} \frac{\sin 2 \theta k}{k^2} \\ &=-\theta \log 2 - \frac{1}{2} {\rm Cl}_2 \left ( 2\theta \right ) \end{align*}

since the Fourier series of $\log \sin $ is

$$\log \sin x = -\log 2 - \sum_{n=1}^{\infty} \frac{\cos 2nx}{n} $$