How do we evaluate the integral $\int_{0}^{\frac{\pi}{4}} \ln (\sin x) d x?$ As I have found the integral
$$\int_{0}^{\frac{\pi}{2}} \ln (\sin x) d x=-\frac{\pi}{2}\ln 2 ,$$
I started to investigate a similar integral with a different upper limit $\frac{\pi}{4}$ by similar methods with failure. Once I found the Fourier Series of sine on $[0, \pi]$, I can find it easily.
By Fourier Series
$$\ln (\sin x)=-\ln 2-\sum_{n=1}^{\infty} \frac{\cos (2 n x)}{n},$$
we integral from $0$ to $\frac{\pi}{4} $,
\begin{aligned}
\int_{0}^{\frac{\pi}{4}} \ln (\sin x) d x&=-\int_{0}^{\frac{\pi}{4}} \ln 2 d x-\sum_{n=1}^{\infty} \int_{0}^{\frac{\pi}{4}} \frac{\cos (2 n x)}{n} d x \\
&=-\frac{\pi}{4} \ln 2-\sum_{n=1}^{\infty}\left[\frac{\sin (2 n x)}{2 n^{2}}\right]_{0}^{\frac{\pi}{4}} \\
&=-\frac{\pi}{4} \ln 2-\frac{1}{2} \sum_{n=1}^{\infty}\left(\frac{\sin \frac{n \pi}{2}}{n^{2}}\right)\\
&=-\frac{\pi}{4} \ln 2-\frac{1}{2} \sum_{k=0}^{\infty} \frac{(-1)^{k}}{(2 k+1)^{2}} \\
&=-\frac{\pi}{4} \ln 2-\frac{1}{2} G,
\end{aligned}
where $G$ is the Catalan's constant.
Is there any method other than using Fourier Series?
 A: Let $I_0=\int_0^\frac{\pi}{2}\ln(\sin x) dx$.
Making the substitution $t=\frac{\pi}{2}-x\,,\,\, I_0=\int_0^\frac{\pi}{2}\ln(\cos x) dx$
$$2I_0=\int_0^\frac{\pi}{2}\ln(\sin x) dx+\int_0^\frac{\pi}{2}\ln(\cos x) dx=\int_0^\frac{\pi}{2}\ln(\cos x\sin x) dx$$
$$=\int_0^\frac{\pi}{2}\ln\frac{1}{2}\,dx\,+\int_0^\frac{\pi}{2}\ln(\sin 2x) dx=-\frac{\pi}{2}\ln 2+I_0\,\,\Rightarrow\,\, I_0=-\frac{\pi}{2}\ln 2$$
Exactly the same approach can be applied to the integrals $I_1=\int_0^\frac{\pi}{4}\ln(\sin x) dx\,$ and $\,I_2=\int_0^\frac{\pi}{4}\ln(\cos x) dx$
$$I_1+I_2=\int_0^\frac{\pi}{4}\ln\frac{1}{2}\,dx\,+\int_0^\frac{\pi}{4}\ln(\sin 2x) dx=-\frac{\pi}{4}\ln 2-\frac{\pi}{4}\ln 2=-\frac{\pi}{2}\ln 2$$
$$I_1-I_2=\int_0^\frac{\pi}{4}\ln(\tan x) dx$$
Making the substitution $x=\operatorname{arctan}t$
$$I_1-I_2=\int_0^1\frac{\ln t}{1+t^2}dt=-G$$
From two equations we get
$$I_1=\int_0^\frac{\pi}{4}\ln(\sin x) dx=-\frac{\pi}{4}\ln 2-\frac{G}{2}$$
$$I_2=\int_0^\frac{\pi}{4}\ln(\cos x) dx=-\frac{\pi}{4}\ln 2+\frac{G}{2}$$
A: You can write
$$ \log (\sin (x))= \log(x)-\sum_{n=1}^\infty (-1)^{n+1}\frac{ 2^{2 n-1} B_{2 n}}{n (2 n)!}\,x^{2n }$$ which allows to provide nice results for
$$I_k=\int_0^{\frac \pi 4} x^k \log (\sin (x))\,dx$$ For example
$$I_0=-\frac{C}{2}-\frac{1}{4} \pi  \log (2)$$
$$I_1=-\frac{\pi  C}{8}+\frac{35 \zeta (3)}{128}-\frac{1}{32} \pi ^2 \log (2)$$
$$I_2=-\frac{\pi ^2 C}{32}+\frac{3 \pi  \zeta (3)}{256}-\frac{1}{192} \pi ^3 \log
   (2)+\frac{\psi ^{(3)}\left(\frac{1}{4}\right)-\psi
   ^{(3)}\left(\frac{3}{4}\right)}{6144}$$
Similarly, for
$$J_k=\int_0^{\frac \pi 2} x^k \log (\sin (x))\,dx$$
$$J_0=-\frac{1}{2} \pi  \log (2)$$
$$J_1=\frac{7 \zeta (3)}{16}-\frac{1}{8} \pi ^2 \log (2)$$
$$J_2=\frac{3 \pi  \zeta (3)}{16}-\frac{1}{24} \pi ^3 \log (2)$$
