Optimal. Leaf size=14 \[ \frac{\sin ^2(x)}{2}+\sin (x) \cos (x) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0166557, antiderivative size = 14, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 4, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.308, Rules used = {2635, 8, 2564, 30} \[ \frac{\sin ^2(x)}{2}+\sin (x) \cos (x) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2635
Rule 8
Rule 2564
Rule 30
Rubi steps
\begin{align*} \int \left (-1+2 \cos ^2(x)+\cos (x) \sin (x)\right ) \, dx &=-x+2 \int \cos ^2(x) \, dx+\int \cos (x) \sin (x) \, dx\\ &=-x+\cos (x) \sin (x)+\int 1 \, dx+\operatorname{Subst}(\int x \, dx,x,\sin (x))\\ &=\cos (x) \sin (x)+\frac{\sin ^2(x)}{2}\\ \end{align*}
Mathematica [A] time = 0.0053653, size = 17, normalized size = 1.21 \[ \frac{1}{2} \sin (2 x)-\frac{\cos ^2(x)}{2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.005, size = 13, normalized size = 0.9 \begin{align*} \cos \left ( x \right ) \sin \left ( x \right ) +{\frac{ \left ( \sin \left ( x \right ) \right ) ^{2}}{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 0.949812, size = 18, normalized size = 1.29 \begin{align*} -\frac{1}{2} \, \cos \left (x\right )^{2} + \frac{1}{2} \, \sin \left (2 \, x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.99195, size = 42, normalized size = 3. \begin{align*} -\frac{1}{2} \, \cos \left (x\right )^{2} + \cos \left (x\right ) \sin \left (x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.061004, size = 12, normalized size = 0.86 \begin{align*} \frac{\sin ^{2}{\left (x \right )}}{2} + \sin{\left (x \right )} \cos{\left (x \right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.08018, size = 18, normalized size = 1.29 \begin{align*} -\frac{1}{2} \, \cos \left (x\right )^{2} + \frac{1}{2} \, \sin \left (2 \, x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]