Let
[tex]I(m) = \displaystyle \int_0^\pi x\sin^m(x)\,\mathrm dx[/tex]
Integrate by parts, taking
u = x ==> du = dx
dv = sinᵐ (x) dx ==> v = ∫ sinᵐ (x) dx
so that
[tex]I(m) = \displaystyle uv\bigg|_{x=0}^{x=\pi} - \int_0^\pi v\,\mathrm du = -\int_0^\pi \sin^m(x)\,\mathrm dx[/tex]
There is a well-known power reduction formula for this integral. If you want to derive it for yourself, consider the cases where m is even or where m is odd.
If m is even, then m = 2k for some integer k, and we have
[tex]\sin^m(x) = \sin^{2k}(x) = \left(\sin^2(x)\right)^k = \left(\dfrac{1-\cos(2x)}2\right)^k[/tex]
Expand the binomial, then use the half-angle identity
[tex]\cos^2(x)=\dfrac{1+\cos(2x)}2[/tex]
as needed. The resulting integral can get messy for large m (or k).
If m is odd, then m = 2k + 1 for some integer k, and so
[tex]\sin^m(x) = \sin(x)\sin^{2k}(x) = \sin(x)\left(\sin^2(x)\right)^k = \sin(x)\left(1-\cos^2(x)\right)^k[/tex]
and then substitute u = cos(x) and du = -sin(x) dx, so that
[tex]I(2k+1) = \displaystyle -\int_0^\pi\sin(x)\left(1-\cos^2(x)\right)^k = \int_1^{-1}(1-u^2)^k\,\mathrm du = -\int_{-1}^1(1-u^2)^k\,\mathrm du[/tex]
Expand the binomial, and so on.