X can not be mentioned outside the integral symbol, it is not a constant, even if the integral problem can not be solved, it can not be mentioned outside the integral symbol; This is stipulated by the definition of integral, and only constant can be mentioned as the coefficient of the integrand function outside the integral symbol. Other questions have been answered in the question, so I won't elaborate.
Example 7, because [x2cosx]' = 2xcosx+x 2 (-sinx) = 2xcosx-x 2sinx,
So x 2 sinx =-[x 2 cosx]'+2 x cosx; Because: [xsinx]' = sinx+xcosx, 2xcosx = 2 [xsinx]'-2sinx; The original formula =-[X2COSX]+2 ∫ XCOS XDX =-[X2COSX]+2 [XSIN X]-2 ∫ SINXDX.
=-x^2cosx+2xsinx+2cosx+C