Optimal. Leaf size=16 \[ 2 x \cos (x)-2 \sin (x)+x^2 \sin (x) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.02, antiderivative size = 16, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {3377, 2717}
\begin {gather*} x^2 \sin (x)-2 \sin (x)+2 x \cos (x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2717
Rule 3377
Rubi steps
\begin {align*} \int x^2 \cos (x) \, dx &=x^2 \sin (x)-2 \int x \sin (x) \, dx\\ &=2 x \cos (x)+x^2 \sin (x)-2 \int \cos (x) \, dx\\ &=2 x \cos (x)-2 \sin (x)+x^2 \sin (x)\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.01, size = 14, normalized size = 0.88 \begin {gather*} 2 x \cos (x)+\left (-2+x^2\right ) \sin (x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.02, size = 17, normalized size = 1.06
method | result | size |
risch | \(2 x \cos \left (x \right )+\left (x^{2}-2\right ) \sin \left (x \right )\) | \(15\) |
default | \(2 x \cos \left (x \right )-2 \sin \left (x \right )+x^{2} \sin \left (x \right )\) | \(17\) |
meijerg | \(4 \sqrt {\pi }\, \left (\frac {x \cos \left (x \right )}{2 \sqrt {\pi }}-\frac {\left (-\frac {3 x^{2}}{2}+3\right ) \sin \left (x \right )}{6 \sqrt {\pi }}\right )\) | \(29\) |
norman | \(\frac {2 x -2 x \left (\tan ^{2}\left (\frac {x}{2}\right )\right )+2 x^{2} \tan \left (\frac {x}{2}\right )-4 \tan \left (\frac {x}{2}\right )}{1+\tan ^{2}\left (\frac {x}{2}\right )}\) | \(40\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 2.58, size = 14, normalized size = 0.88 \begin {gather*} 2 \, x \cos \left (x\right ) + {\left (x^{2} - 2\right )} \sin \left (x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.55, size = 14, normalized size = 0.88 \begin {gather*} 2 \, x \cos \left (x\right ) + {\left (x^{2} - 2\right )} \sin \left (x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.09, size = 17, normalized size = 1.06 \begin {gather*} x^{2} \sin {\left (x \right )} + 2 x \cos {\left (x \right )} - 2 \sin {\left (x \right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.98, size = 14, normalized size = 0.88 \begin {gather*} 2 \, x \cos \left (x\right ) + {\left (x^{2} - 2\right )} \sin \left (x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.03, size = 14, normalized size = 0.88 \begin {gather*} \sin \left (x\right )\,\left (x^2-2\right )+2\,x\,\cos \left (x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________