3.25 \(\int x^3 \sin (x) \, dx\)

Optimal. Leaf size=24 \[ x^3 (-\cos (x))+3 x^2 \sin (x)-6 \sin (x)+6 x \cos (x) \]

[Out]

6*x*Cos[x] - x^3*Cos[x] - 6*Sin[x] + 3*x^2*Sin[x]

_______________________________________________________________________________________

Rubi [A]  time = 0.0522071, antiderivative size = 24, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 2, integrand size = 6, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.333 \[ x^3 (-\cos (x))+3 x^2 \sin (x)-6 \sin (x)+6 x \cos (x) \]

Antiderivative was successfully verified.

[In]  Int[x^3*Sin[x],x]

[Out]

6*x*Cos[x] - x^3*Cos[x] - 6*Sin[x] + 3*x^2*Sin[x]

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 1.92561, size = 26, normalized size = 1.08 \[ - x^{3} \cos{\left (x \right )} + 3 x^{2} \sin{\left (x \right )} + 6 x \cos{\left (x \right )} - 6 \sin{\left (x \right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate(x**3*sin(x),x)

[Out]

-x**3*cos(x) + 3*x**2*sin(x) + 6*x*cos(x) - 6*sin(x)

_______________________________________________________________________________________

Mathematica [A]  time = 0.012055, size = 20, normalized size = 0.83 \[ 3 \left (x^2-2\right ) \sin (x)-x \left (x^2-6\right ) \cos (x) \]

Antiderivative was successfully verified.

[In]  Integrate[x^3*Sin[x],x]

[Out]

-(x*(-6 + x^2)*Cos[x]) + 3*(-2 + x^2)*Sin[x]

_______________________________________________________________________________________

Maple [A]  time = 0.007, size = 25, normalized size = 1. \[ 6\,x\cos \left ( x \right ) -{x}^{3}\cos \left ( x \right ) -6\,\sin \left ( x \right ) +3\,{x}^{2}\sin \left ( x \right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int(x^3*sin(x),x)

[Out]

6*x*cos(x)-x^3*cos(x)-6*sin(x)+3*x^2*sin(x)

_______________________________________________________________________________________

Maxima [A]  time = 1.35021, size = 28, normalized size = 1.17 \[ -{\left (x^{3} - 6 \, x\right )} \cos \left (x\right ) + 3 \,{\left (x^{2} - 2\right )} \sin \left (x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(x^3*sin(x),x, algorithm="maxima")

[Out]

-(x^3 - 6*x)*cos(x) + 3*(x^2 - 2)*sin(x)

_______________________________________________________________________________________

Fricas [A]  time = 0.242894, size = 28, normalized size = 1.17 \[ -{\left (x^{3} - 6 \, x\right )} \cos \left (x\right ) + 3 \,{\left (x^{2} - 2\right )} \sin \left (x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(x^3*sin(x),x, algorithm="fricas")

[Out]

-(x^3 - 6*x)*cos(x) + 3*(x^2 - 2)*sin(x)

_______________________________________________________________________________________

Sympy [A]  time = 0.924283, size = 26, normalized size = 1.08 \[ - x^{3} \cos{\left (x \right )} + 3 x^{2} \sin{\left (x \right )} + 6 x \cos{\left (x \right )} - 6 \sin{\left (x \right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(x**3*sin(x),x)

[Out]

-x**3*cos(x) + 3*x**2*sin(x) + 6*x*cos(x) - 6*sin(x)

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.221625, size = 28, normalized size = 1.17 \[ -{\left (x^{3} - 6 \, x\right )} \cos \left (x\right ) + 3 \,{\left (x^{2} - 2\right )} \sin \left (x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(x^3*sin(x),x, algorithm="giac")

[Out]

-(x^3 - 6*x)*cos(x) + 3*(x^2 - 2)*sin(x)