Optimal. Leaf size=16 \[ -x-\frac {2 \sin (x)}{1-\cos (x)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.07, antiderivative size = 16, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.571, Rules used = {4392, 2670, 2680, 8} \[ -x-\frac {2 \sin (x)}{1-\cos (x)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2670
Rule 2680
Rule 4392
Rubi steps
\begin {align*} \int (\cot (x)+\csc (x))^2 \, dx &=\int (1+\cos (x))^2 \csc ^2(x) \, dx\\ &=\int \frac {\sin ^2(x)}{(1-\cos (x))^2} \, dx\\ &=-\frac {2 \sin (x)}{1-\cos (x)}-\int 1 \, dx\\ &=-x-\frac {2 \sin (x)}{1-\cos (x)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.02, size = 12, normalized size = 0.75 \[ -x-2 \cot \left (\frac {x}{2}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 1.16, size = 16, normalized size = 1.00 \[ -\frac {x \sin \relax (x) + 2 \, \cos \relax (x) + 2}{\sin \relax (x)} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.16, size = 12, normalized size = 0.75 \[ -x - \frac {2}{\tan \left (\frac {1}{2} \, x\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.04, size = 15, normalized size = 0.94 \[ -2 \cot \relax (x )-x -\frac {2}{\sin \relax (x )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.41, size = 16, normalized size = 1.00 \[ -x - \frac {2}{\sin \relax (x)} - \frac {2}{\tan \relax (x)} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 2.40, size = 10, normalized size = 0.62 \[ -x-2\,\mathrm {cot}\left (\frac {x}{2}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 2.70, size = 17, normalized size = 1.06 \[ - x - \cot {\relax (x )} - 2 \csc {\relax (x )} - \frac {\cos {\relax (x )}}{\sin {\relax (x )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________