3.101 \(\int x \cos ^3(x) \, dx\)

Optimal. Leaf size=33 \[ \frac {2}{3} x \sin (x)+\frac {\cos ^3(x)}{9}+\frac {2 \cos (x)}{3}+\frac {1}{3} x \sin (x) \cos ^2(x) \]

[Out]

2/3*cos(x)+1/9*cos(x)^3+2/3*x*sin(x)+1/3*x*cos(x)^2*sin(x)

________________________________________________________________________________________

Rubi [A]  time = 0.02, antiderivative size = 33, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {3310, 3296, 2638} \[ \frac {2}{3} x \sin (x)+\frac {\cos ^3(x)}{9}+\frac {2 \cos (x)}{3}+\frac {1}{3} x \sin (x) \cos ^2(x) \]

Antiderivative was successfully verified.

[In]

Int[x*Cos[x]^3,x]

[Out]

(2*Cos[x])/3 + Cos[x]^3/9 + (2*x*Sin[x])/3 + (x*Cos[x]^2*Sin[x])/3

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]

Rule 3310

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

Rubi steps

\begin {align*} \int x \cos ^3(x) \, dx &=\frac {\cos ^3(x)}{9}+\frac {1}{3} x \cos ^2(x) \sin (x)+\frac {2}{3} \int x \cos (x) \, dx\\ &=\frac {\cos ^3(x)}{9}+\frac {2}{3} x \sin (x)+\frac {1}{3} x \cos ^2(x) \sin (x)-\frac {2}{3} \int \sin (x) \, dx\\ &=\frac {2 \cos (x)}{3}+\frac {\cos ^3(x)}{9}+\frac {2}{3} x \sin (x)+\frac {1}{3} x \cos ^2(x) \sin (x)\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 31, normalized size = 0.94 \[ \frac {3}{4} x \sin (x)+\frac {1}{12} x \sin (3 x)+\frac {3 \cos (x)}{4}+\frac {1}{36} \cos (3 x) \]

Antiderivative was successfully verified.

[In]

Integrate[x*Cos[x]^3,x]

[Out]

(3*Cos[x])/4 + Cos[3*x]/36 + (3*x*Sin[x])/4 + (x*Sin[3*x])/12

________________________________________________________________________________________

fricas [A]  time = 0.44, size = 25, normalized size = 0.76 \[ \frac {1}{9} \, \cos \relax (x)^{3} + \frac {1}{3} \, {\left (x \cos \relax (x)^{2} + 2 \, x\right )} \sin \relax (x) + \frac {2}{3} \, \cos \relax (x) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/9*cos(x)^3 + 1/3*(x*cos(x)^2 + 2*x)*sin(x) + 2/3*cos(x)

________________________________________________________________________________________

giac [A]  time = 1.38, size = 23, normalized size = 0.70 \[ \frac {1}{12} \, x \sin \left (3 \, x\right ) + \frac {3}{4} \, x \sin \relax (x) + \frac {1}{36} \, \cos \left (3 \, x\right ) + \frac {3}{4} \, \cos \relax (x) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/12*x*sin(3*x) + 3/4*x*sin(x) + 1/36*cos(3*x) + 3/4*cos(x)

________________________________________________________________________________________

maple [A]  time = 0.02, size = 23, normalized size = 0.70 \[ \frac {\left (\cos ^{3}\relax (x )\right )}{9}+\frac {\left (\cos ^{2}\relax (x )+2\right ) x \sin \relax (x )}{3}+\frac {2 \cos \relax (x )}{3} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*cos(x)^3,x)

[Out]

1/3*x*(cos(x)^2+2)*sin(x)+1/9*cos(x)^3+2/3*cos(x)

________________________________________________________________________________________

maxima [A]  time = 0.42, size = 23, normalized size = 0.70 \[ \frac {1}{12} \, x \sin \left (3 \, x\right ) + \frac {3}{4} \, x \sin \relax (x) + \frac {1}{36} \, \cos \left (3 \, x\right ) + \frac {3}{4} \, \cos \relax (x) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/12*x*sin(3*x) + 3/4*x*sin(x) + 1/36*cos(3*x) + 3/4*cos(x)

________________________________________________________________________________________

mupad [B]  time = 0.17, size = 25, normalized size = 0.76 \[ \frac {{\cos \relax (x)}^3}{9}+\frac {x\,\sin \relax (x)\,{\cos \relax (x)}^2}{3}+\frac {2\,\cos \relax (x)}{3}+\frac {2\,x\,\sin \relax (x)}{3} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*cos(x)^3,x)

[Out]

(2*cos(x))/3 + cos(x)^3/9 + (2*x*sin(x))/3 + (x*cos(x)^2*sin(x))/3

________________________________________________________________________________________

sympy [A]  time = 0.61, size = 39, normalized size = 1.18 \[ \frac {2 x \sin ^{3}{\relax (x )}}{3} + x \sin {\relax (x )} \cos ^{2}{\relax (x )} + \frac {2 \sin ^{2}{\relax (x )} \cos {\relax (x )}}{3} + \frac {7 \cos ^{3}{\relax (x )}}{9} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*cos(x)**3,x)

[Out]

2*x*sin(x)**3/3 + x*sin(x)*cos(x)**2 + 2*sin(x)**2*cos(x)/3 + 7*cos(x)**3/9

________________________________________________________________________________________