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*x*Cos[x])/3 + (2*Sin[x])/3 - (x*Cos[x]*Sin[x]^2)/3 + Sin[x]^3/9

________________________________________________________________________________________

Rubi [A]  time = 0.0216979, antiderivative size = 33, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 6, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.5, 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 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]

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 2637

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

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.0085734, 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

________________________________________________________________________________________

Maple [A]  time = 0., size = 23, normalized size = 0.7 \begin{align*} -{\frac{x \left ( 2+ \left ( \sin \left ( x \right ) \right ) ^{2} \right ) \cos \left ( x \right ) }{3}}+{\frac{ \left ( \sin \left ( x \right ) \right ) ^{3}}{9}}+{\frac{2\,\sin \left ( x \right ) }{3}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]  time = 0.962111, size = 31, normalized size = 0.94 \begin{align*} \frac{1}{12} \, x \cos \left (3 \, x\right ) - \frac{3}{4} \, x \cos \left (x\right ) - \frac{1}{36} \, \sin \left (3 \, x\right ) + \frac{3}{4} \, \sin \left (x\right ) \end{align*}

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)

________________________________________________________________________________________

Fricas [A]  time = 1.82112, size = 74, normalized size = 2.24 \begin{align*} \frac{1}{3} \, x \cos \left (x\right )^{3} - x \cos \left (x\right ) - \frac{1}{9} \,{\left (\cos \left (x\right )^{2} - 7\right )} \sin \left (x\right ) \end{align*}

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)

________________________________________________________________________________________

Sympy [A]  time = 0.603218, size = 39, normalized size = 1.18 \begin{align*} - x \sin ^{2}{\left (x \right )} \cos{\left (x \right )} - \frac{2 x \cos ^{3}{\left (x \right )}}{3} + \frac{7 \sin ^{3}{\left (x \right )}}{9} + \frac{2 \sin{\left (x \right )} \cos ^{2}{\left (x \right )}}{3} \end{align*}

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

________________________________________________________________________________________

Giac [A]  time = 1.08484, size = 31, normalized size = 0.94 \begin{align*} \frac{1}{12} \, x \cos \left (3 \, x\right ) - \frac{3}{4} \, x \cos \left (x\right ) - \frac{1}{36} \, \sin \left (3 \, x\right ) + \frac{3}{4} \, \sin \left (x\right ) \end{align*}

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)