Optimal. Leaf size=29 \[ \frac {1}{4} \cos (2 x)-\frac {1}{2} x^2 \cos (2 x)+\frac {1}{2} x \sin (2 x) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.01, 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 = {3377, 2718}
\begin {gather*} -\frac {1}{2} x^2 \cos (2 x)+\frac {1}{2} x \sin (2 x)+\frac {1}{4} \cos (2 x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2718
Rule 3377
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.02, size = 25, normalized size = 0.86 \begin {gather*} -\frac {1}{4} \left (-1+2 x^2\right ) \cos (2 x)+\frac {1}{2} x \sin (2 x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Mathics [A]
time = 1.89, size = 23, normalized size = 0.79 \begin {gather*} \frac {x \text {Sin}\left [2 x\right ]}{2}-\frac {x^2 \text {Cos}\left [2 x\right ]}{2}+\frac {\text {Cos}\left [2 x\right ]}{4} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.02, size = 24, normalized size = 0.83
method | result | size |
risch | \(\left (-\frac {x^{2}}{2}+\frac {1}{4}\right ) \cos \left (2 x \right )+\frac {x \sin \left (2 x \right )}{2}\) | \(21\) |
derivativedivides | \(\frac {\cos \left (2 x \right )}{4}-\frac {x^{2} \cos \left (2 x \right )}{2}+\frac {x \sin \left (2 x \right )}{2}\) | \(24\) |
default | \(\frac {\cos \left (2 x \right )}{4}-\frac {x^{2} \cos \left (2 x \right )}{2}+\frac {x \sin \left (2 x \right )}{2}\) | \(24\) |
norman | \(\frac {x \tan \left (x \right )-\frac {x^{2}}{2}+\frac {x^{2} \left (\tan ^{2}\left (x \right )\right )}{2}+\frac {1}{2}}{1+\tan ^{2}\left (x \right )}\) | \(30\) |
meijerg | \(\frac {\sqrt {\pi }\, \left (-\frac {1}{2 \sqrt {\pi }}+\frac {\left (-2 x^{2}+1\right ) \cos \left (2 x \right )}{2 \sqrt {\pi }}+\frac {x \sin \left (2 x \right )}{\sqrt {\pi }}\right )}{2}\) | \(37\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.27, size = 21, normalized size = 0.72 \begin {gather*} -\frac {1}{4} \, {\left (2 \, x^{2} - 1\right )} \cos \left (2 \, x\right ) + \frac {1}{2} \, x \sin \left (2 \, x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.33, size = 21, normalized size = 0.72 \begin {gather*} -\frac {1}{4} \, {\left (2 \, x^{2} - 1\right )} \cos \left (2 \, x\right ) + \frac {1}{2} \, x \sin \left (2 \, x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.10, size = 24, normalized size = 0.83 \begin {gather*} - \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 {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.00, size = 25, normalized size = 0.86 \begin {gather*} \frac {1}{8} \left (-4 x^{2}+2\right ) \cos \left (2 x\right )+\frac {4}{8} x \sin \left (2 x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.03, size = 24, normalized size = 0.83 \begin {gather*} \frac {x\,\sin \left (2\,x\right )}{2}+\left (2\,{\sin \left (x\right )}^2-1\right )\,\left (\frac {x^2}{2}-\frac {1}{4}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________