Optimal. Leaf size=29 \[ \frac {1}{3} x^2 \sin (3 x)-\frac {2}{27} \sin (3 x)+\frac {2}{9} x \cos (3 x) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.03, antiderivative size = 29, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {3296, 2637} \[ \frac {1}{3} x^2 \sin (3 x)-\frac {2}{27} \sin (3 x)+\frac {2}{9} x \cos (3 x) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2637
Rule 3296
Rubi steps
\begin {align*} \int x^2 \cos (3 x) \, dx &=\frac {1}{3} x^2 \sin (3 x)-\frac {2}{3} \int x \sin (3 x) \, dx\\ &=\frac {2}{9} x \cos (3 x)+\frac {1}{3} x^2 \sin (3 x)-\frac {2}{9} \int \cos (3 x) \, dx\\ &=\frac {2}{9} x \cos (3 x)-\frac {2}{27} \sin (3 x)+\frac {1}{3} x^2 \sin (3 x)\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.02, size = 25, normalized size = 0.86 \[ \frac {1}{27} \left (9 x^2-2\right ) \sin (3 x)+\frac {2}{9} x \cos (3 x) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.42, size = 21, normalized size = 0.72 \[ \frac {2}{9} \, x \cos \left (3 \, x\right ) + \frac {1}{27} \, {\left (9 \, x^{2} - 2\right )} \sin \left (3 \, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.92, size = 21, normalized size = 0.72 \[ \frac {2}{9} \, x \cos \left (3 \, x\right ) + \frac {1}{27} \, {\left (9 \, x^{2} - 2\right )} \sin \left (3 \, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.00, size = 24, normalized size = 0.83 \[ \frac {x^{2} \sin \left (3 x \right )}{3}+\frac {2 x \cos \left (3 x \right )}{9}-\frac {2 \sin \left (3 x \right )}{27} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.46, size = 21, normalized size = 0.72 \[ \frac {2}{9} \, x \cos \left (3 \, x\right ) + \frac {1}{27} \, {\left (9 \, x^{2} - 2\right )} \sin \left (3 \, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.19, size = 23, normalized size = 0.79 \[ \frac {2\,x\,\cos \left (3\,x\right )}{9}-\frac {2\,\sin \left (3\,x\right )}{27}+\frac {x^2\,\sin \left (3\,x\right )}{3} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.33, size = 27, normalized size = 0.93 \[ \frac {x^{2} \sin {\left (3 x \right )}}{3} + \frac {2 x \cos {\left (3 x \right )}}{9} - \frac {2 \sin {\left (3 x \right )}}{27} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________