I tried u=sin(x)
du=cos(x)dx
but that doesn't work
Let: $\displaystyle \int_0^x\sin^2(t)\cos(t)dt=\int_0^{\sin(x)}u^2du=\ frac{\sin^3(x)}{3}=P(x)$
$\displaystyle \int{x\sin^2(x)\cos(x)dx}=\int{x\cdot{P'(x)}dx}$ now apply parts
$\displaystyle \int{x\cdot{P'(x)}dx}=x\cdot{P(x)}-\int{P(x)dx}$
And remember that: $\displaystyle \sin(3x)=-4\sin^3(x)+3\sin(x)$ for your last integral