Answer
Shown
Work Step by Step
By using the substitution $u=\pi - x\,\,\, du=-dx$
$\int_{0}^{\pi}xf(\sin x)\, dx=-\int_{\pi}^{0}(\pi-u)f(\sin(\pi-u))\,du$
And we know that $\sin(\pi-x) = \sin x$, we have
$\int_{0}^{\pi}xf(\sin x)\, dx=\int_{0}^{\pi}\pi f(\sin u) - uf(\sin u )\,du$
And since $x$ and $u$ are dummy variables which are interchangeable, we have
$\int_{0}^{\pi}xf(\sin x)\, dx=\int_{0}^{\pi}\pi f(\sin x) - xf(\sin x )\,dx$
Move the second term on LHS to right then we have
$2\int_{0}^{\pi}xf(\sin x)\, dx=\int_{0}^{\pi}\pi f(\sin(x)\, dx$
Finally, we prove that
$\int_{0}^{\pi}xf(\sin x)\, dx=\frac{\pi}{2}\int_{0}^{\pi}f(\sin(x)\,dx$