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.0139333, antiderivative size = 25, normalized size of antiderivative = 1., 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 3310
Rule 30
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.0111651, size = 25, normalized size = 1. \[ \frac{x^2}{4}-\frac{1}{4} x \sin (2 x)-\frac{1}{8} \cos (2 x) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.005, size = 25, normalized size = 1. \begin{align*} x \left ({\frac{x}{2}}-{\frac{\cos \left ( x \right ) \sin \left ( x \right ) }{2}} \right ) -{\frac{{x}^{2}}{4}}+{\frac{ \left ( \sin \left ( x \right ) \right ) ^{2}}{4}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 0.952459, size = 26, normalized size = 1.04 \begin{align*} \frac{1}{4} \, x^{2} - \frac{1}{4} \, x \sin \left (2 \, x\right ) - \frac{1}{8} \, \cos \left (2 \, x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 0.454715, size = 63, normalized size = 2.52 \begin{align*} -\frac{1}{2} \, x \cos \left (x\right ) \sin \left (x\right ) + \frac{1}{4} \, x^{2} - \frac{1}{4} \, \cos \left (x\right )^{2} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.32495, size = 36, normalized size = 1.44 \begin{align*} \frac{x^{2} \sin ^{2}{\left (x \right )}}{4} + \frac{x^{2} \cos ^{2}{\left (x \right )}}{4} - \frac{x \sin{\left (x \right )} \cos{\left (x \right )}}{2} + \frac{\sin ^{2}{\left (x \right )}}{4} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.1022, size = 26, normalized size = 1.04 \begin{align*} \frac{1}{4} \, x^{2} - \frac{1}{4} \, x \sin \left (2 \, x\right ) - \frac{1}{8} \, \cos \left (2 \, x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]