After evaluating the integral in my post,$$ \int_{0}^{\frac{\pi}{4}} x \tan x d x =-\frac{\pi}{8} \ln 2+\frac{G}{2}, $$ then I want to know more about the value of its “partner” integral $$\displaystyle \int_{0}^{\frac{\pi}{4}} x \cot x d x.$$
First of all, I tried to make use of the integration by parts. $$ \begin{aligned} \int_{0}^{\frac{\pi}{4}} x \cot x d x &=\int_{0}^{\frac{\pi}{4}} x d(\ln (\sin x)) \\ &=[x \ln (\sin x)]_{0}^{\frac{\pi}{4}}-\int_{0}^{\frac{\pi}{4}} \ln (\sin x) d x \\ &=-\frac{\pi}{8} \ln 2-\int_{0}^{\frac{\pi}{4}} \ln (\sin x) d x \end{aligned} $$
By the post in MSE, $$\int_0^{\Large\frac\pi4}\ln(\sin x)\ dx=-\frac12\left(G+\frac\pi2\ln2\right),$$ I got a similar result for it. $$ \int_{0}^{\frac{\pi}{4}} x \cot x d x=\frac{\pi}{8} \ln 2+\frac{G}{2} $$
Do we have another method? Your contribution will be highly appreciated.