3.22 \(\int x \sin (x) \, dx\)

Optimal. Leaf size=8 \[ \sin (x)-x \cos (x) \]

[Out]

-(x*Cos[x]) + Sin[x]

_______________________________________________________________________________________

Rubi [A]  time = 0.0146978, antiderivative size = 8, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 4, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.5 \[ \sin (x)-x \cos (x) \]

Antiderivative was successfully verified.

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

[Out]

-(x*Cos[x]) + Sin[x]

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 0.754444, size = 7, normalized size = 0.88 \[ - x \cos{\left (x \right )} + \sin{\left (x \right )} \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

-x*cos(x) + sin(x)

_______________________________________________________________________________________

Mathematica [A]  time = 0.00333774, size = 8, normalized size = 1. \[ \sin (x)-x \cos (x) \]

Antiderivative was successfully verified.

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

[Out]

-(x*Cos[x]) + Sin[x]

_______________________________________________________________________________________

Maple [A]  time = 0.093, size = 9, normalized size = 1.1 \[ -x\cos \left ( x \right ) +\sin \left ( x \right ) \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

-x*cos(x)+sin(x)

_______________________________________________________________________________________

Maxima [A]  time = 1.36352, size = 11, normalized size = 1.38 \[ -x \cos \left (x\right ) + \sin \left (x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

-x*cos(x) + sin(x)

_______________________________________________________________________________________

Fricas [A]  time = 0.241875, size = 11, normalized size = 1.38 \[ -x \cos \left (x\right ) + \sin \left (x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

-x*cos(x) + sin(x)

_______________________________________________________________________________________

Sympy [A]  time = 0.181218, size = 7, normalized size = 0.88 \[ - x \cos{\left (x \right )} + \sin{\left (x \right )} \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

-x*cos(x) + sin(x)

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.214402, size = 11, normalized size = 1.38 \[ -x \cos \left (x\right ) + \sin \left (x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

-x*cos(x) + sin(x)