Optimal. Leaf size=23 \[ -\frac {x}{4}+\frac {1}{4} \cos (x) \sin (x)+\frac {1}{2} x \sin ^2(x) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.01, antiderivative size = 23, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 3, integrand size = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {3524, 2715, 8}
\begin {gather*} -\frac {x}{4}+\frac {1}{2} x \sin ^2(x)+\frac {1}{4} \sin (x) \cos (x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2715
Rule 3524
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.00, size = 18, normalized size = 0.78 \begin {gather*} -\frac {1}{4} x \cos (2 x)+\frac {1}{8} \sin (2 x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Mathics [A]
time = 1.80, size = 14, normalized size = 0.61 \begin {gather*} -\frac {x \text {Cos}\left [2 x\right ]}{4}+\frac {\text {Sin}\left [2 x\right ]}{8} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.01, size = 18, normalized size = 0.78
method | result | size |
risch | \(-\frac {x \cos \left (2 x \right )}{4}+\frac {\sin \left (2 x \right )}{8}\) | \(15\) |
default | \(-\frac {x \left (\cos ^{2}\left (x \right )\right )}{2}+\frac {\cos \left (x \right ) \sin \left (x \right )}{4}+\frac {x}{4}\) | \(18\) |
meijerg | \(\frac {\sqrt {\pi }\, \left (-\frac {x \cos \left (2 x \right )}{\sqrt {\pi }}+\frac {\sin \left (2 x \right )}{2 \sqrt {\pi }}\right )}{4}\) | \(26\) |
norman | \(\frac {-\frac {x}{4}-\frac {\left (\tan ^{3}\left (\frac {x}{2}\right )\right )}{2}+\frac {3 x \left (\tan ^{2}\left (\frac {x}{2}\right )\right )}{2}-\frac {x \left (\tan ^{4}\left (\frac {x}{2}\right )\right )}{4}+\frac {\tan \left (\frac {x}{2}\right )}{2}}{\left (1+\tan ^{2}\left (\frac {x}{2}\right )\right )^{2}}\) | \(48\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.27, size = 14, normalized size = 0.61 \begin {gather*} -\frac {1}{4} \, x \cos \left (2 \, x\right ) + \frac {1}{8} \, \sin \left (2 \, x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.33, size = 17, normalized size = 0.74 \begin {gather*} -\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 {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.11, size = 24, normalized size = 1.04 \begin {gather*} \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 {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.00, size = 18, normalized size = 0.78 \begin {gather*} -\frac {2}{8} x \cos \left (2 x\right )+\frac {\sin \left (2 x\right )}{8} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.09, size = 18, normalized size = 0.78 \begin {gather*} \frac {\sin \left (2\,x\right )}{8}+\frac {x\,\left (2\,{\sin \left (x\right )}^2-1\right )}{4} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________