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 $ 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$
 A: Just a few sign flips away from it.
$$\int_{0}^{\pi}xf(\sin{x})dx=\int_{\pi}^{0}(\pi-t)f(\sin(\pi-t))(-dt)\\
=\int_{0}^{\pi}(\pi-t)f(\sin(\pi-t))dt\\
=\pi\int_{0}^{\pi}f(\sin(t))dt-\int_{0}^{\pi}tf(\sin(t))dt
$$
Clearly, the value of a definite integral is independent of the dummy variable we use to describe it.  So we can do an algebraic manipulation to get
$$2\int_{0}^{\pi}xf(\sin{x})dx=\pi\int_{0}^{\pi}f(\sin(t))dt$$
$$\int_{0}^{\pi}xf(\sin{x})dx=\frac\pi2\int_{0}^{\pi}f(\sin(t))dt$$
A: You have made a mistake - your last equation is missing a negative sign. If you let $I=\displaystyle \int_0^{\pi} x f(\sin x)\mathrm dx$ , then the correct result is $$\int_0^{\pi} xf(\sin x)\text dx=\pi \int_0^{\pi}f(\sin t) \text d t-\int_0^{\pi} tf(\sin t)\text d t$$ But since $$\displaystyle \int_0^{\pi} xf(\sin x)\text dx=\int_0^{\pi }tf(\sin t) \text d t$$ because $t$ is just a dummy variable,  we get $\displaystyle I=\dfrac{\color{red}\pi}{2} \int_0^{\pi} f(\sin x) \text{d} x$.
Edit: This was answered in context to original question before editing.
A: hint
Let $$I=\int_0^\pi xf(\sin(x))dx$$
with $ t=\color{red}{\pi} -x$, it becomes
$$I=\int_{\color{red}{\pi}-0}^{\color{red}{\pi}-\pi}(\pi-t)f(\sin(\pi-t))(-dt)=$$
$$\int_0^\pi(\pi-t)f(\sin(t))(+dt)=$$
$$\pi\int_0^\pi f(\sin(t))dt-I$$
thus
$$2I=\pi \int_0^\pi f(\sin(t))dt$$
$$=\pi \int_0^\pi f(\sin(x))dx$$
and
$$I=\frac{\pi}{2}\int_0^\pi f(\sin(x))dx$$
A: $$I=\int_0^\pi x\,f(\sin x)dx$$
$x=\pi-t\Rightarrow dx=-dt$ so:
$$I=\int_\pi^0(\pi-t)f\left[\sin(\pi-t)\right](-dt)=\int_0^\pi(\pi-t)f(\sin t)dt$$
$$=\pi\int_0^\pi f(\sin t)dt-\int_0^\pi t\,f(\sin t)dt$$
which is the same thing as saying:
$$I=\pi\int_0^\pi f(\sin t)dt-I$$
and so rearrange this equation and we get:
$$I=\frac\pi2\int_0^\pi f(\sin x)dx$$
