Optimal. Leaf size=21 \[ -\frac{1}{3} \cot ^3(x)-\frac{\cot ^2(x)}{2}-\cot (x) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0595257, antiderivative size = 21, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 1, integrand size = 18, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.056, Rules used = {14} \[ -\frac{1}{3} \cot ^3(x)-\frac{\cot ^2(x)}{2}-\cot (x) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 14
Rubi steps
\begin{align*} \int \frac{\cot (x)+\csc ^2(x)}{1-\cos ^2(x)} \, dx &=\operatorname{Subst}\left (\int \frac{1+x+x^2}{x^4} \, dx,x,\tan (x)\right )\\ &=\operatorname{Subst}\left (\int \left (\frac{1}{x^4}+\frac{1}{x^3}+\frac{1}{x^2}\right ) \, dx,x,\tan (x)\right )\\ &=-\cot (x)-\frac{\cot ^2(x)}{2}-\frac{\cot ^3(x)}{3}\\ \end{align*}
Mathematica [A] time = 0.0182162, size = 25, normalized size = 1.19 \[ -\frac{2 \cot (x)}{3}-\frac{\csc ^2(x)}{2}-\frac{1}{3} \cot (x) \csc ^2(x) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.053, size = 20, normalized size = 1. \begin{align*} - \left ( \tan \left ( x \right ) \right ) ^{-1}-{\frac{1}{3\, \left ( \tan \left ( x \right ) \right ) ^{3}}}-{\frac{1}{2\, \left ( \tan \left ( x \right ) \right ) ^{2}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 0.956223, size = 24, normalized size = 1.14 \begin{align*} -\frac{6 \, \tan \left (x\right )^{2} + 3 \, \tan \left (x\right ) + 2}{6 \, \tan \left (x\right )^{3}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.01622, size = 88, normalized size = 4.19 \begin{align*} -\frac{4 \, \cos \left (x\right )^{3} - 6 \, \cos \left (x\right ) - 3 \, \sin \left (x\right )}{6 \,{\left (\cos \left (x\right )^{2} - 1\right )} \sin \left (x\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} - \int \frac{\cot{\left (x \right )}}{\cos ^{2}{\left (x \right )} - 1}\, dx - \int \frac{\csc ^{2}{\left (x \right )}}{\cos ^{2}{\left (x \right )} - 1}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.10748, size = 24, normalized size = 1.14 \begin{align*} -\frac{6 \, \tan \left (x\right )^{2} + 3 \, \tan \left (x\right ) + 2}{6 \, \tan \left (x\right )^{3}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]