Optimal. Leaf size=29 \[ -\frac{1}{2} x^2 \cos (2 x)+\frac{1}{2} x \sin (2 x)+\frac{1}{4} \cos (2 x) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0226745, antiderivative size = 29, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 8, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.25, Rules used = {3296, 2638} \[ -\frac{1}{2} x^2 \cos (2 x)+\frac{1}{2} x \sin (2 x)+\frac{1}{4} \cos (2 x) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3296
Rule 2638
Rubi steps
\begin{align*} \int x^2 \sin (2 x) \, dx &=-\frac{1}{2} x^2 \cos (2 x)+\int x \cos (2 x) \, dx\\ &=-\frac{1}{2} x^2 \cos (2 x)+\frac{1}{2} x \sin (2 x)-\frac{1}{2} \int \sin (2 x) \, dx\\ &=\frac{1}{4} \cos (2 x)-\frac{1}{2} x^2 \cos (2 x)+\frac{1}{2} x \sin (2 x)\\ \end{align*}
Mathematica [A] time = 0.0240711, size = 25, normalized size = 0.86 \[ \frac{1}{2} x \sin (2 x)-\frac{1}{4} \left (2 x^2-1\right ) \cos (2 x) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.006, size = 24, normalized size = 0.8 \begin{align*}{\frac{\cos \left ( 2\,x \right ) }{4}}-{\frac{{x}^{2}\cos \left ( 2\,x \right ) }{2}}+{\frac{x\sin \left ( 2\,x \right ) }{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 0.947915, size = 28, normalized size = 0.97 \begin{align*} -\frac{1}{4} \,{\left (2 \, x^{2} - 1\right )} \cos \left (2 \, x\right ) + \frac{1}{2} \, x \sin \left (2 \, x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.93983, size = 59, normalized size = 2.03 \begin{align*} -\frac{1}{4} \,{\left (2 \, x^{2} - 1\right )} \cos \left (2 \, x\right ) + \frac{1}{2} \, x \sin \left (2 \, x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.292341, size = 24, normalized size = 0.83 \begin{align*} - \frac{x^{2} \cos{\left (2 x \right )}}{2} + \frac{x \sin{\left (2 x \right )}}{2} + \frac{\cos{\left (2 x \right )}}{4} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.04342, size = 28, normalized size = 0.97 \begin{align*} -\frac{1}{4} \,{\left (2 \, x^{2} - 1\right )} \cos \left (2 \, x\right ) + \frac{1}{2} \, x \sin \left (2 \, x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]