<s>[INST] Is there any other method to show that $\int_{0}^{\frac{\pi}{2}} x \ln (\sin x) d x =-\frac{\pi^{2}}{8} \ln 2+\frac{7}{16}\zeta(3)?$ Noting that the evaluation of the integral can be simplified by the Fourier series of $\ln(\sin x)$,
$$\ln (\sin x)+\ln 2=-\sum_{k=1}^{\infty} \frac{\cos (2 k x)}{k}$$
Multiplying the equation by $x$ followed by integration from $0$ to $\infty$, we have
$$
\begin{aligned}
\int_{0}^{\frac{\pi}{2}} x \ln (\sin x) d x+\int_{0}^{\frac{\pi}{2}} x\ln 2 d x&=-\sum_{k=1}^{\infty} \int_{0}^{\frac{\pi}{2}} \frac{x \cos (2 k x)}{k} d x\\
\int_{0}^{\frac{\pi}{2}} x \ln (\sin x) d x+\left[\frac{x^{2}}{2} \ln 2\right]_{0}^{\frac{\pi}{2}}&=-\sum_{k=1}^{\infty} \frac{1}{2 k^{2}} \int_{0}^{\frac{\pi}{2}} x d(\sin 2 k x)\\
\int_{0}^{\frac{\pi}{2}} x \ln (\sin x) d x&=-\frac{\pi^{2}}{8} \ln 2-\frac{1}{2} \sum_{k=1}^{\infty} \frac{1}{k^{2}}\left[\frac{\cos 2(x)}{2 k}\right]_{0}^{\frac{\pi}{2}} \\
&=-\frac{\pi^{2}}{8} \ln 2-\frac{1}{4} \sum_{k=1}^{\infty} \frac{(-1)^{k}-1}{k^{3}}\\
&=-\frac{\pi^{2}}{8} \ln 2+\frac{1}{4}\left(\sum_{k=1}^{\infty} \frac{2}{(2 k+1)^{3}}\right)\\
&=-\frac{\pi^{2}}{8} \ln 2+\frac{1}{2}\left[\sum_{k=1}^{\infty} \frac{1}{k^{3}}-\sum_{k=1}^{\infty} \frac{1}{(2 k)^{3}}\right]\\
&=-\frac{\pi^{2}}{8} \ln 2+\frac{7}{16}\zeta(3) \blacksquare
\end{aligned}
$$
Furthermore, $$
\begin{aligned}
\int_0^{\frac{\pi}{2}} x \ln (\cos x) d x&=\frac{\pi}{2} \int_0^{\frac{\pi}{2}} \ln (\sin x)-\int_0^{\frac{\pi}{2}} x \ln (\sin x) d x \\
&=-\frac{\pi^2}{4} \ln 2-\left(-\frac{\pi^2}{8} \ln 2+\frac{7}{16}\zeta(3)\right) \\
&=-\frac{\pi^2}{8} \ln 2-\frac{7}{16} \zeta(3)
\end{aligned}
$$
and $$
\int_0^{\frac{\pi}{2}} x \ln (\tan x) d x=\int_0^{\frac{\pi}{2}} x \ln (\sin x) d x-\int_0^{\frac{\pi}{2}} x \ln (\cos x) d x=\frac{7}{8}\zeta(3)
$$
 [/INST] Method. $(1)$, Use Mittag-Leffler's series for $\cot(x)$
$$\begin{align}
I&=\int_0^\frac{\pi}{2}x\ln(\sin(x))~dx=\frac{1}{2}\int_0^\frac{\pi}{2}\ln(\sin(x))~dx^2\\
\\
&=-\frac{1}2 \int_0^\frac{\pi}{2}\frac{x^2}{\tan(x)}~dx=-\frac{1}2\int_0^\frac{\pi}{2}x^2\left(\frac{1}x+\sum_{n=1}^\infty \frac{2x}{x^2-n^2\pi^2} \right)~dx
\end{align}$$
Next, integrate them term by term and you will get the answer.
Method. $(2)$, Construct two bases, as mentioned by @Quanto:
$$\begin{align}
I_1&=\int_0^\frac{\pi}{2}x\left[\ln(\sin(x))+\ln(\cos(x))\right]dx=\int_0^\frac{\pi}{2}x\ln\left( \frac{1}{2}\sin(2x) \right)dx\\
\\
I_2&=\int_0^\frac{\pi}{2}x\left[\ln(\sin(x))-\ln(\cos(x))\right]dx=\int_0^\frac{\pi}{2}x\ln(\tan(x))dx
\end{align}$$
</s>