Integral of $ x \ln( \sin (x))$ from 0 to $ \pi $

$$\int_0^\pi x \ln(\sin (x))dx $$

I tried integrating this by parts but I end up getting integral that doesn't converge, which is this $$ \int_0^\pi \dfrac{x^2\cos (x)}{\sin(x)} \ dx$$ So can anyone help me on this one?


By making the change of variable $$ u=\pi -x $$ you get that $$ I=\int_0^\pi x \ln(\sin x)\:dx=\int_0^\pi (\pi-u) \ln(\sin u)\:du=\pi\int_0^\pi \ln(\sin u)\:du-I $$ giving $$ I=\frac{\pi}2\int_0^\pi \ln(\sin u)\:du=\pi\int_0^{\pi/2} \ln(\sin u)\:du. $$ Then conclude with the classic evaluation of the latter integral: see many answers here.