Optimal. Leaf size=11 \[ \cot (x)-\frac{1}{2} \cos (2 x) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0082446, antiderivative size = 11, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 11, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.273, Rules used = {3767, 8, 2638} \[ \cot (x)-\frac{1}{2} \cos (2 x) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3767
Rule 8
Rule 2638
Rubi steps
\begin{align*} \int \left (-\csc ^2(x)+\sin (2 x)\right ) \, dx &=-\int \csc ^2(x) \, dx+\int \sin (2 x) \, dx\\ &=-\frac{1}{2} \cos (2 x)+\operatorname{Subst}(\int 1 \, dx,x,\cot (x))\\ &=-\frac{1}{2} \cos (2 x)+\cot (x)\\ \end{align*}
Mathematica [A] time = 0.0063004, size = 11, normalized size = 1. \[ \cot (x)-\frac{1}{2} \cos (2 x) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.005, size = 10, normalized size = 0.9 \begin{align*} -{\frac{\cos \left ( 2\,x \right ) }{2}}+\cot \left ( x \right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 0.967175, size = 15, normalized size = 1.36 \begin{align*} \frac{1}{\tan \left (x\right )} - \frac{1}{2} \, \cos \left (2 \, x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 2.28629, size = 68, normalized size = 6.18 \begin{align*} -\frac{{\left (2 \, \cos \left (x\right )^{2} - 1\right )} \sin \left (x\right ) - 2 \, \cos \left (x\right )}{2 \, \sin \left (x\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.065527, size = 12, normalized size = 1.09 \begin{align*} - \frac{\cos{\left (2 x \right )}}{2} + \frac{\cos{\left (x \right )}}{\sin{\left (x \right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.09132, size = 15, normalized size = 1.36 \begin{align*} \frac{1}{\tan \left (x\right )} - \frac{1}{2} \, \cos \left (2 \, x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]