Optimal. Leaf size=22 \[ \frac{\sin ^2(x)}{2}-\frac{1}{2} \csc ^2(x)-2 \log (\sin (x)) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0521154, antiderivative size = 22, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 9, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.333, Rules used = {2590, 266, 43} \[ \frac{\sin ^2(x)}{2}-\frac{1}{2} \csc ^2(x)-2 \log (\sin (x)) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2590
Rule 266
Rule 43
Rubi steps
\begin{align*} \int \cos ^2(x) \cot ^3(x) \, dx &=\operatorname{Subst}\left (\int \frac{\left (1-x^2\right )^2}{x^3} \, dx,x,-\sin (x)\right )\\ &=\frac{1}{2} \operatorname{Subst}\left (\int \frac{(1-x)^2}{x^2} \, dx,x,\sin ^2(x)\right )\\ &=\frac{1}{2} \operatorname{Subst}\left (\int \left (1+\frac{1}{x^2}-\frac{2}{x}\right ) \, dx,x,\sin ^2(x)\right )\\ &=-\frac{1}{2} \csc ^2(x)-2 \log (\sin (x))+\frac{\sin ^2(x)}{2}\\ \end{align*}
Mathematica [A] time = 0.0117264, size = 20, normalized size = 0.91 \[ \frac{1}{2} \left (\sin ^2(x)-\csc ^2(x)-4 \log (\sin (x))\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.013, size = 29, normalized size = 1.3 \begin{align*} -{\frac{ \left ( \cos \left ( x \right ) \right ) ^{6}}{2\, \left ( \sin \left ( x \right ) \right ) ^{2}}}-{\frac{ \left ( \cos \left ( x \right ) \right ) ^{4}}{2}}- \left ( \cos \left ( x \right ) \right ) ^{2}-2\,\ln \left ( \sin \left ( x \right ) \right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 0.926457, size = 27, normalized size = 1.23 \begin{align*} \frac{1}{2} \, \sin \left (x\right )^{2} - \frac{1}{2 \, \sin \left (x\right )^{2}} - \log \left (\sin \left (x\right )^{2}\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 2.07412, size = 116, normalized size = 5.27 \begin{align*} -\frac{2 \, \cos \left (x\right )^{4} - 3 \, \cos \left (x\right )^{2} + 8 \,{\left (\cos \left (x\right )^{2} - 1\right )} \log \left (\frac{1}{2} \, \sin \left (x\right )\right ) - 1}{4 \,{\left (\cos \left (x\right )^{2} - 1\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.094927, size = 20, normalized size = 0.91 \begin{align*} - 2 \log{\left (\sin{\left (x \right )} \right )} + \frac{\sin ^{2}{\left (x \right )}}{2} - \frac{1}{2 \sin ^{2}{\left (x \right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.05987, size = 49, normalized size = 2.23 \begin{align*} -\frac{1}{2} \, \cos \left (x\right )^{2} + \frac{2 \, \cos \left (x\right )^{2} - 1}{2 \,{\left (\cos \left (x\right )^{2} - 1\right )}} - \log \left (-\cos \left (x\right )^{2} + 1\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]