Optimal. Leaf size=12 \[ -x-\cot \left (\frac {x}{2}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.03, antiderivative size = 12, normalized size of antiderivative = 1.00, 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 = {12, 453, 203} \[ -x-\cot \left (\frac {x}{2}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 203
Rule 453
Rubi steps
\begin {align*} \int \cot \left (\frac {x}{2}\right ) \cot (x) \, dx &=2 \operatorname {Subst}\left (\int \frac {1-x^2}{2 x^2 \left (1+x^2\right )} \, dx,x,\tan \left (\frac {x}{2}\right )\right )\\ &=\operatorname {Subst}\left (\int \frac {1-x^2}{x^2 \left (1+x^2\right )} \, dx,x,\tan \left (\frac {x}{2}\right )\right )\\ &=-\cot \left (\frac {x}{2}\right )-2 \operatorname {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\tan \left (\frac {x}{2}\right )\right )\\ &=-x-\cot \left (\frac {x}{2}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.01, size = 12, normalized size = 1.00 \[ -x-\cot \left (\frac {x}{2}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.43, size = 16, normalized size = 1.33 \[ -\frac {x \tan \left (\frac {1}{2} \, x\right ) + 1}{\tan \left (\frac {1}{2} \, x\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 1.24, size = 18, normalized size = 1.50 \[ -x - \frac {1}{2 \, \tan \left (\frac {1}{4} \, x\right )} + \frac {1}{2} \, \tan \left (\frac {1}{4} \, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.10, size = 11, normalized size = 0.92 \[ -x -\cot \left (\frac {x}{2}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.43, size = 41, normalized size = 3.42 \[ -\frac {x \cos \relax (x)^{2} + x \sin \relax (x)^{2} - 2 \, x \cos \relax (x) + x + 2 \, \sin \relax (x)}{\cos \relax (x)^{2} + \sin \relax (x)^{2} - 2 \, \cos \relax (x) + 1} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.18, size = 10, normalized size = 0.83 \[ -x-\mathrm {cot}\left (\frac {x}{2}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\cos {\relax (x )}}{\sin {\relax (x )} \tan {\left (\frac {x}{2} \right )}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________