Optimal. Leaf size=10 \[ \cos (x)-\frac{1}{2} \tanh ^{-1}(\cos (x)) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0203756, antiderivative size = 10, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 7, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.429, Rules used = {12, 388, 206} \[ \cos (x)-\frac{1}{2} \tanh ^{-1}(\cos (x)) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 388
Rule 206
Rubi steps
\begin{align*} \int \cos (x) \cot (2 x) \, dx &=-\operatorname{Subst}\left (\int \frac{-1+2 x^2}{2 \left (1-x^2\right )} \, dx,x,\cos (x)\right )\\ &=-\left (\frac{1}{2} \operatorname{Subst}\left (\int \frac{-1+2 x^2}{1-x^2} \, dx,x,\cos (x)\right )\right )\\ &=\cos (x)-\frac{1}{2} \operatorname{Subst}\left (\int \frac{1}{1-x^2} \, dx,x,\cos (x)\right )\\ &=-\frac{1}{2} \tanh ^{-1}(\cos (x))+\cos (x)\\ \end{align*}
Mathematica [B] time = 0.0149474, size = 25, normalized size = 2.5 \[ \cos (x)+\frac{1}{2} \log \left (\sin \left (\frac{x}{2}\right )\right )-\frac{1}{2} \log \left (\cos \left (\frac{x}{2}\right )\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.025, size = 14, normalized size = 1.4 \begin{align*} \cos \left ( x \right ) +{\frac{\ln \left ( \csc \left ( x \right ) -\cot \left ( x \right ) \right ) }{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] time = 0.991714, size = 50, normalized size = 5. \begin{align*} \cos \left (x\right ) - \frac{1}{4} \, \log \left (\cos \left (x\right )^{2} + \sin \left (x\right )^{2} + 2 \, \cos \left (x\right ) + 1\right ) + \frac{1}{4} \, \log \left (\cos \left (x\right )^{2} + \sin \left (x\right )^{2} - 2 \, \cos \left (x\right ) + 1\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 2.51684, size = 88, normalized size = 8.8 \begin{align*} \cos \left (x\right ) - \frac{1}{4} \, \log \left (\frac{1}{2} \, \cos \left (x\right ) + \frac{1}{2}\right ) + \frac{1}{4} \, \log \left (-\frac{1}{2} \, \cos \left (x\right ) + \frac{1}{2}\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] time = 1.48852, size = 19, normalized size = 1.9 \begin{align*} \frac{\log{\left (\cos{\left (x \right )} - 1 \right )}}{4} - \frac{\log{\left (\cos{\left (x \right )} + 1 \right )}}{4} + \cos{\left (x \right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.13916, size = 26, normalized size = 2.6 \begin{align*} \cos \left (x\right ) - \frac{1}{4} \, \log \left (\cos \left (x\right ) + 1\right ) + \frac{1}{4} \, \log \left (-\cos \left (x\right ) + 1\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]