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

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

[Out]

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

________________________________________________________________________________________

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, 2637} \[ \frac {\sin ^3(x)}{9}+\frac {2 \sin (x)}{3}-\frac {2}{3} x \cos (x)-\frac {1}{3} x \sin ^2(x) \cos (x) \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 2637

Int[sin[Pi/2 + (c_.) + (d_.)*(x_)], x_Symbol] :> Simp[Sin[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 \sin ^3(x) \, dx &=-\frac {1}{3} x \cos (x) \sin ^2(x)+\frac {\sin ^3(x)}{9}+\frac {2}{3} \int x \sin (x) \, dx\\ &=-\frac {2}{3} x \cos (x)-\frac {1}{3} x \cos (x) \sin ^2(x)+\frac {\sin ^3(x)}{9}+\frac {2}{3} \int \cos (x) \, dx\\ &=-\frac {2}{3} x \cos (x)+\frac {2 \sin (x)}{3}-\frac {1}{3} x \cos (x) \sin ^2(x)+\frac {\sin ^3(x)}{9}\\ \end {align*}

________________________________________________________________________________________

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

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.43, size = 23, normalized size = 0.70 \[ \frac {1}{3} \, x \cos \relax (x)^{3} - x \cos \relax (x) - \frac {1}{9} \, {\left (\cos \relax (x)^{2} - 7\right )} \sin \relax (x) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*sin(x)**3,x)

[Out]

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

________________________________________________________________________________________