Optimal. Leaf size=23 \[ -\frac{x}{4}+\frac{1}{2} x \sin ^2(x)+\frac{1}{4} \sin (x) \cos (x) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0127059, antiderivative size = 23, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 6, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.5, Rules used = {3443, 2635, 8} \[ -\frac{x}{4}+\frac{1}{2} x \sin ^2(x)+\frac{1}{4} \sin (x) \cos (x) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3443
Rule 2635
Rule 8
Rubi steps
\begin{align*} \int x \cos (x) \sin (x) \, dx &=\frac{1}{2} x \sin ^2(x)-\frac{1}{2} \int \sin ^2(x) \, dx\\ &=\frac{1}{4} \cos (x) \sin (x)+\frac{1}{2} x \sin ^2(x)-\frac{\int 1 \, dx}{4}\\ &=-\frac{x}{4}+\frac{1}{4} \cos (x) \sin (x)+\frac{1}{2} x \sin ^2(x)\\ \end{align*}
Mathematica [A] time = 0.002663, size = 18, normalized size = 0.78 \[ \frac{1}{8} \sin (2 x)-\frac{1}{4} x \cos (2 x) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.003, size = 18, normalized size = 0.8 \begin{align*} -{\frac{x \left ( \cos \left ( x \right ) \right ) ^{2}}{2}}+{\frac{\cos \left ( x \right ) \sin \left ( x \right ) }{4}}+{\frac{x}{4}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 0.944388, size = 19, normalized size = 0.83 \begin{align*} -\frac{1}{4} \, x \cos \left (2 \, x\right ) + \frac{1}{8} \, \sin \left (2 \, x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 0.446078, size = 61, normalized size = 2.65 \begin{align*} -\frac{1}{2} \, x \cos \left (x\right )^{2} + \frac{1}{4} \, \cos \left (x\right ) \sin \left (x\right ) + \frac{1}{4} \, x \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.322426, size = 24, normalized size = 1.04 \begin{align*} \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} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.14303, size = 19, normalized size = 0.83 \begin{align*} -\frac{1}{4} \, x \cos \left (2 \, x\right ) + \frac{1}{8} \, \sin \left (2 \, x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]