3.63 \(\int x \cos (x) \, dx\)

Optimal. Leaf size=7 \[ x \sin (x)+\cos (x) \]

[Out]

cos(x)+x*sin(x)

________________________________________________________________________________________

Rubi [A]  time = 0.01, antiderivative size = 7, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {3296, 2638} \[ x \sin (x)+\cos (x) \]

Antiderivative was successfully verified.

[In]

Int[x*Cos[x],x]

[Out]

Cos[x] + x*Sin[x]

Rule 2638

Int[sin[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[Cos[c + d*x]/d, x] /; FreeQ[{c, d}, x]

Rule 3296

Int[((c_.) + (d_.)*(x_))^(m_.)*sin[(e_.) + (f_.)*(x_)], x_Symbol] :> -Simp[((c + d*x)^m*Cos[e + f*x])/f, x] +
Dist[(d*m)/f, Int[(c + d*x)^(m - 1)*Cos[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && GtQ[m, 0]

Rubi steps

\begin {align*} \int x \cos (x) \, dx &=x \sin (x)-\int \sin (x) \, dx\\ &=\cos (x)+x \sin (x)\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.00, size = 7, normalized size = 1.00 \[ x \sin (x)+\cos (x) \]

Antiderivative was successfully verified.

[In]

Integrate[x*Cos[x],x]

[Out]

Cos[x] + x*Sin[x]

________________________________________________________________________________________

fricas [A]  time = 0.43, size = 7, normalized size = 1.00 \[ x \sin \relax (x) + \cos \relax (x) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*cos(x),x, algorithm="fricas")

[Out]

x*sin(x) + cos(x)

________________________________________________________________________________________

giac [A]  time = 1.01, size = 7, normalized size = 1.00 \[ x \sin \relax (x) + \cos \relax (x) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*cos(x),x, algorithm="giac")

[Out]

x*sin(x) + cos(x)

________________________________________________________________________________________

maple [A]  time = 0.00, size = 8, normalized size = 1.14 \[ x \sin \relax (x )+\cos \relax (x ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*cos(x),x)

[Out]

x*sin(x)+cos(x)

________________________________________________________________________________________

maxima [A]  time = 0.66, size = 7, normalized size = 1.00 \[ x \sin \relax (x) + \cos \relax (x) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*cos(x),x, algorithm="maxima")

[Out]

x*sin(x) + cos(x)

________________________________________________________________________________________

mupad [B]  time = 0.00, size = 7, normalized size = 1.00 \[ \cos \relax (x)+x\,\sin \relax (x) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*cos(x),x)

[Out]

cos(x) + x*sin(x)

________________________________________________________________________________________

sympy [A]  time = 0.17, size = 7, normalized size = 1.00 \[ x \sin {\relax (x )} + \cos {\relax (x )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*cos(x),x)

[Out]

x*sin(x) + cos(x)

________________________________________________________________________________________