Optimal. Leaf size=44 \[ \frac {1}{3} x^2 \sin ^3(x)-\frac {2 \sin ^3(x)}{27}-\frac {4 \sin (x)}{9}+\frac {4}{9} x \cos (x)+\frac {2}{9} x \sin ^2(x) \cos (x) \]
________________________________________________________________________________________
Rubi [A] time = 0.04, antiderivative size = 44, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.400, Rules used = {3443, 3310, 3296, 2637} \[ \frac {1}{3} x^2 \sin ^3(x)-\frac {2 \sin ^3(x)}{27}-\frac {4 \sin (x)}{9}+\frac {4}{9} x \cos (x)+\frac {2}{9} x \sin ^2(x) \cos (x) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2637
Rule 3296
Rule 3310
Rule 3443
Rubi steps
\begin {align*} \int x^2 \cos (x) \sin ^2(x) \, dx &=\frac {1}{3} x^2 \sin ^3(x)-\frac {2}{3} \int x \sin ^3(x) \, dx\\ &=\frac {2}{9} x \cos (x) \sin ^2(x)-\frac {2 \sin ^3(x)}{27}+\frac {1}{3} x^2 \sin ^3(x)-\frac {4}{9} \int x \sin (x) \, dx\\ &=\frac {4}{9} x \cos (x)+\frac {2}{9} x \cos (x) \sin ^2(x)-\frac {2 \sin ^3(x)}{27}+\frac {1}{3} x^2 \sin ^3(x)-\frac {4}{9} \int \cos (x) \, dx\\ &=\frac {4}{9} x \cos (x)-\frac {4 \sin (x)}{9}+\frac {2}{9} x \cos (x) \sin ^2(x)-\frac {2 \sin ^3(x)}{27}+\frac {1}{3} x^2 \sin ^3(x)\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.13, size = 39, normalized size = 0.89 \[ \frac {1}{54} \left (\sin (x) \left (9 x^2+\left (2-9 x^2\right ) \cos (2 x)-26\right )+27 x \cos (x)-3 x \cos (3 x)\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
IntegrateAlgebraic [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int x^2 \cos (x) \sin ^2(x) \, dx \]
Verification is Not applicable to the result.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 1.20, size = 36, normalized size = 0.82 \[ -\frac {2}{9} \, x \cos \relax (x)^{3} + \frac {2}{3} \, x \cos \relax (x) - \frac {1}{27} \, {\left ({\left (9 \, x^{2} - 2\right )} \cos \relax (x)^{2} - 9 \, x^{2} + 14\right )} \sin \relax (x) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.62, size = 35, normalized size = 0.80 \[ -\frac {1}{18} \, x \cos \left (3 \, x\right ) + \frac {1}{2} \, x \cos \relax (x) - \frac {1}{108} \, {\left (9 \, x^{2} - 2\right )} \sin \left (3 \, x\right ) + \frac {1}{4} \, {\left (x^{2} - 2\right )} \sin \relax (x) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.38, size = 32, normalized size = 0.73
method | result | size |
default | \(\frac {x^{2} \left (\sin ^{3}\relax (x )\right )}{3}+\frac {2 x \left (2+\sin ^{2}\relax (x )\right ) \cos \relax (x )}{9}-\frac {2 \left (\sin ^{3}\relax (x )\right )}{27}-\frac {4 \sin \relax (x )}{9}\) | \(32\) |
risch | \(\frac {x \cos \relax (x )}{2}+\frac {\left (x^{2}-2\right ) \sin \relax (x )}{4}-\frac {x \cos \left (3 x \right )}{18}-\frac {\left (9 x^{2}-2\right ) \sin \left (3 x \right )}{108}\) | \(36\) |
norman | \(\frac {\frac {4 x}{9}-\frac {64 \left (\tan ^{3}\left (\frac {x}{2}\right )\right )}{27}-\frac {8 \left (\tan ^{5}\left (\frac {x}{2}\right )\right )}{9}+\frac {4 x \left (\tan ^{2}\left (\frac {x}{2}\right )\right )}{3}-\frac {4 x \left (\tan ^{4}\left (\frac {x}{2}\right )\right )}{3}-\frac {4 x \left (\tan ^{6}\left (\frac {x}{2}\right )\right )}{9}+\frac {8 x^{2} \left (\tan ^{3}\left (\frac {x}{2}\right )\right )}{3}-\frac {8 \tan \left (\frac {x}{2}\right )}{9}}{\left (1+\tan ^{2}\left (\frac {x}{2}\right )\right )^{3}}\) | \(76\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.61, size = 35, normalized size = 0.80 \[ -\frac {1}{18} \, x \cos \left (3 \, x\right ) + \frac {1}{2} \, x \cos \relax (x) - \frac {1}{108} \, {\left (9 \, x^{2} - 2\right )} \sin \left (3 \, x\right ) + \frac {1}{4} \, {\left (x^{2} - 2\right )} \sin \relax (x) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.07, size = 40, normalized size = 0.91 \[ \frac {x^2\,{\sin \relax (x)}^3}{3}+\frac {4\,x\,{\cos \relax (x)}^3}{9}+\frac {2\,x\,\cos \relax (x)\,{\sin \relax (x)}^2}{3}-\frac {4\,{\cos \relax (x)}^2\,\sin \relax (x)}{9}-\frac {14\,{\sin \relax (x)}^3}{27} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 1.23, size = 53, normalized size = 1.20 \[ \frac {x^{2} \sin ^{3}{\relax (x )}}{3} + \frac {2 x \sin ^{2}{\relax (x )} \cos {\relax (x )}}{3} + \frac {4 x \cos ^{3}{\relax (x )}}{9} - \frac {14 \sin ^{3}{\relax (x )}}{27} - \frac {4 \sin {\relax (x )} \cos ^{2}{\relax (x )}}{9} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________