Optimal. Leaf size=41 \[ \frac{x^3}{6}+\frac{1}{2} x^2 \sin (x) \cos (x)-\frac{x}{4}+\frac{1}{2} x \cos ^2(x)-\frac{1}{4} \sin (x) \cos (x) \]
[Out]
_______________________________________________________________________________________
Rubi [A] time = 0.0511026, antiderivative size = 41, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 8, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.5 \[ \frac{x^3}{6}+\frac{1}{2} x^2 \sin (x) \cos (x)-\frac{x}{4}+\frac{1}{2} x \cos ^2(x)-\frac{1}{4} \sin (x) \cos (x) \]
Antiderivative was successfully verified.
[In] Int[x^2*Cos[x]^2,x]
[Out]
_______________________________________________________________________________________
Rubi in Sympy [A] time = 1.60591, size = 36, normalized size = 0.88 \[ \frac{x^{3}}{6} + \frac{x^{2} \sin{\left (x \right )} \cos{\left (x \right )}}{2} + \frac{x \cos ^{2}{\left (x \right )}}{2} - \frac{x}{4} - \frac{\sin{\left (x \right )} \cos{\left (x \right )}}{4} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] rubi_integrate(x**2*cos(x)**2,x)
[Out]
_______________________________________________________________________________________
Mathematica [A] time = 0.0349165, size = 29, normalized size = 0.71 \[ \frac{1}{24} \left (4 x^3+\left (6 x^2-3\right ) \sin (2 x)+6 x \cos (2 x)\right ) \]
Antiderivative was successfully verified.
[In] Integrate[x^2*Cos[x]^2,x]
[Out]
_______________________________________________________________________________________
Maple [A] time = 0.016, size = 37, normalized size = 0.9 \[{x}^{2} \left ({\frac{x}{2}}+{\frac{\cos \left ( x \right ) \sin \left ( x \right ) }{2}} \right ) +{\frac{x \left ( \cos \left ( x \right ) \right ) ^{2}}{2}}-{\frac{\cos \left ( x \right ) \sin \left ( x \right ) }{4}}-{\frac{x}{4}}-{\frac{{x}^{3}}{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] int(x^2*cos(x)^2,x)
[Out]
_______________________________________________________________________________________
Maxima [A] time = 1.41139, size = 35, normalized size = 0.85 \[ \frac{1}{6} \, x^{3} + \frac{1}{4} \, x \cos \left (2 \, x\right ) + \frac{1}{8} \,{\left (2 \, x^{2} - 1\right )} \sin \left (2 \, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate(x^2*cos(x)^2,x, algorithm="maxima")
[Out]
_______________________________________________________________________________________
Fricas [A] time = 0.245236, size = 39, normalized size = 0.95 \[ \frac{1}{6} \, x^{3} + \frac{1}{2} \, x \cos \left (x\right )^{2} + \frac{1}{4} \,{\left (2 \, x^{2} - 1\right )} \cos \left (x\right ) \sin \left (x\right ) - \frac{1}{4} \, x \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate(x^2*cos(x)^2,x, algorithm="fricas")
[Out]
_______________________________________________________________________________________
Sympy [A] time = 0.843016, size = 56, normalized size = 1.37 \[ \frac{x^{3} \sin ^{2}{\left (x \right )}}{6} + \frac{x^{3} \cos ^{2}{\left (x \right )}}{6} + \frac{x^{2} \sin{\left (x \right )} \cos{\left (x \right )}}{2} - \frac{x \sin ^{2}{\left (x \right )}}{4} + \frac{x \cos ^{2}{\left (x \right )}}{4} - \frac{\sin{\left (x \right )} \cos{\left (x \right )}}{4} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate(x**2*cos(x)**2,x)
[Out]
_______________________________________________________________________________________
GIAC/XCAS [A] time = 0.199854, size = 35, normalized size = 0.85 \[ \frac{1}{6} \, x^{3} + \frac{1}{4} \, x \cos \left (2 \, x\right ) + \frac{1}{8} \,{\left (2 \, x^{2} - 1\right )} \sin \left (2 \, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate(x^2*cos(x)^2,x, algorithm="giac")
[Out]