Optimal. Leaf size=33 \[ \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) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.01, 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 = {3391, 3377,
2718} \begin {gather*} \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) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2718
Rule 3377
Rule 3391
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 \begin {gather*} \frac {3 \cos (x)}{4}+\frac {1}{36} \cos (3 x)+\frac {3}{4} x \sin (x)+\frac {1}{12} x \sin (3 x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Mathics [A]
time = 2.09, size = 24, normalized size = 0.73 \begin {gather*} -\frac {x \text {Sin}\left [x\right ]^3}{3}+x \text {Sin}\left [x\right ]-\frac {\text {Cos}\left [x\right ] \text {Sin}\left [x\right ]^2}{9}+\frac {7 \text {Cos}\left [x\right ]}{9} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.03, size = 23, normalized size = 0.70
method | result | size |
default | \(\frac {x \left (2+\cos ^{2}\left (x \right )\right ) \sin \left (x \right )}{3}+\frac {\left (\cos ^{3}\left (x \right )\right )}{9}+\frac {2 \cos \left (x \right )}{3}\) | \(23\) |
risch | \(\frac {3 \cos \left (x \right )}{4}+\frac {3 x \sin \left (x \right )}{4}+\frac {\cos \left (3 x \right )}{36}+\frac {x \sin \left (3 x \right )}{12}\) | \(24\) |
norman | \(\frac {-\frac {2 \left (\tan ^{4}\left (\frac {x}{2}\right )\right )}{3}-\frac {8 \left (\tan ^{6}\left (\frac {x}{2}\right )\right )}{9}+2 x \tan \left (\frac {x}{2}\right )+\frac {4 x \left (\tan ^{3}\left (\frac {x}{2}\right )\right )}{3}+2 x \left (\tan ^{5}\left (\frac {x}{2}\right )\right )+\frac {2}{3}}{\left (1+\tan ^{2}\left (\frac {x}{2}\right )\right )^{3}}\) | \(55\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.25, size = 23, normalized size = 0.70 \begin {gather*} \frac {1}{12} \, x \sin \left (3 \, x\right ) + \frac {3}{4} \, x \sin \left (x\right ) + \frac {1}{36} \, \cos \left (3 \, x\right ) + \frac {3}{4} \, \cos \left (x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.32, size = 25, normalized size = 0.76 \begin {gather*} \frac {1}{9} \, \cos \left (x\right )^{3} + \frac {1}{3} \, {\left (x \cos \left (x\right )^{2} + 2 \, x\right )} \sin \left (x\right ) + \frac {2}{3} \, \cos \left (x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.15, size = 39, normalized size = 1.18 \begin {gather*} \frac {2 x \sin ^{3}{\left (x \right )}}{3} + x \sin {\left (x \right )} \cos ^{2}{\left (x \right )} + \frac {2 \sin ^{2}{\left (x \right )} \cos {\left (x \right )}}{3} + \frac {7 \cos ^{3}{\left (x \right )}}{9} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.00, size = 30, normalized size = 0.91 \begin {gather*} \frac {3}{4} \cos x+\frac {3}{4} x \sin x+\frac {\cos \left (3 x\right )}{36}+\frac {3}{36} x \sin \left (3 x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.17, size = 25, normalized size = 0.76 \begin {gather*} \frac {{\cos \left (x\right )}^3}{9}+\frac {x\,\sin \left (x\right )\,{\cos \left (x\right )}^2}{3}+\frac {2\,\cos \left (x\right )}{3}+\frac {2\,x\,\sin \left (x\right )}{3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________