Optimal. Leaf size=25 \[ \frac {x^2}{4}+\frac {\sin ^2(x)}{4}-\frac {1}{2} x \sin (x) \cos (x) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.01, antiderivative size = 25, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {3310, 30} \[ \frac {x^2}{4}+\frac {\sin ^2(x)}{4}-\frac {1}{2} x \sin (x) \cos (x) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 30
Rule 3310
Rubi steps
\begin {align*} \int x \sin ^2(x) \, dx &=-\frac {1}{2} x \cos (x) \sin (x)+\frac {\sin ^2(x)}{4}+\frac {\int x \, dx}{2}\\ &=\frac {x^2}{4}-\frac {1}{2} x \cos (x) \sin (x)+\frac {\sin ^2(x)}{4}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.01, size = 25, normalized size = 1.00 \[ \frac {x^2}{4}-\frac {1}{4} x \sin (2 x)-\frac {1}{8} \cos (2 x) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.43, size = 19, normalized size = 0.76 \[ -\frac {1}{2} \, x \cos \relax (x) \sin \relax (x) + \frac {1}{4} \, x^{2} - \frac {1}{4} \, \cos \relax (x)^{2} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.01, size = 19, normalized size = 0.76 \[ \frac {1}{4} \, x^{2} - \frac {1}{4} \, x \sin \left (2 \, x\right ) - \frac {1}{8} \, \cos \left (2 \, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.01, size = 25, normalized size = 1.00 \[ -\frac {x^{2}}{4}+\frac {\left (\sin ^{2}\relax (x )\right )}{4}+\left (-\frac {\cos \relax (x ) \sin \relax (x )}{2}+\frac {x}{2}\right ) x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.50, size = 19, normalized size = 0.76 \[ \frac {1}{4} \, x^{2} - \frac {1}{4} \, x \sin \left (2 \, x\right ) - \frac {1}{8} \, \cos \left (2 \, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.09, size = 19, normalized size = 0.76 \[ \frac {{\sin \relax (x)}^2}{4}-\frac {x\,\sin \left (2\,x\right )}{4}+\frac {x^2}{4} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.36, size = 36, normalized size = 1.44 \[ \frac {x^{2} \sin ^{2}{\relax (x )}}{4} + \frac {x^{2} \cos ^{2}{\relax (x )}}{4} - \frac {x \sin {\relax (x )} \cos {\relax (x )}}{2} + \frac {\sin ^{2}{\relax (x )}}{4} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________