I have a question regarding the following problem:
By making the substitution $x=\pi-t$, show that:
$$ \int_{0}^{\pi}xf(\sin{x})dx=\frac{\pi}{2}\int_{0}^{\pi}f(\sin{x})dx $$
This is my work so far:
$$ x=\pi-t \\dx=-dt $$
$$ \int_{0}^{\pi}xf(\sin{x})dx=\int_{0}^{\pi}(t-\pi)f(\sin(\pi-t))dt\\ \int_{0}^{\pi}xf(\sin{x})dx=\int_{0}^{\pi}tf(\sin(t))dt-\pi\int_{0}^{\pi}f(\sin(t))dt $$
I noticed that $$\int_{0}^{\pi}xf(\sin{x})dx$$ and $$\int_{0}^{\pi}tf(\sin(t))dt$$ are very similar and $$\pi\int_{0}^{\pi}f(\sin(t))dt$$ is also close to what I want to find.
However, I am unsure how to make further progress.
Any help would be much appreciated
EDIT: As the comment mentioned, I forgot to change the limits of integration. After changing the limits, I got: $$ \int_{0}^{\pi}xf(\sin{x})dx=\int_{\pi}^{0}tf(\sin(t))dt-\pi\int_{\pi}^{0}f(\sin(t))dt\\ \int_{0}^{\pi}xf(\sin{x})dx=\pi\int_{0}^{\pi}f(\sin(t))dt-\int_{0}^{\pi}tf(\sin(t))dt $$
I can see that this is very close to the final answer. However, I still don't know how I can eliminate the variable $t$