Optimal. Leaf size=9 \[ \log (\sin (x))-\tanh ^{-1}(\cos (x)) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0053846, antiderivative size = 9, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 5, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.4, Rules used = {3475, 3770} \[ \log (\sin (x))-\tanh ^{-1}(\cos (x)) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3475
Rule 3770
Rubi steps
\begin{align*} \int (\cot (x)+\csc (x)) \, dx &=\int \cot (x) \, dx+\int \csc (x) \, dx\\ &=-\tanh ^{-1}(\cos (x))+\log (\sin (x))\\ \end{align*}
Mathematica [B] time = 0.004463, size = 20, normalized size = 2.22 \[ \log \left (\sin \left (\frac{x}{2}\right )\right )+\log (\sin (x))-\log \left (\cos \left (\frac{x}{2}\right )\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.003, size = 13, normalized size = 1.4 \begin{align*} \ln \left ( \sin \left ( x \right ) \right ) -\ln \left ( \cot \left ( x \right ) +\csc \left ( x \right ) \right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.0108, size = 16, normalized size = 1.78 \begin{align*} -\log \left (\cot \left (x\right ) + \csc \left (x\right )\right ) + \log \left (\sin \left (x\right )\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.07307, size = 32, normalized size = 3.56 \begin{align*} \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 = 0.106556, size = 20, normalized size = 2.22 \begin{align*} \frac{\log{\left (\cos{\left (x \right )} - 1 \right )}}{2} - \frac{\log{\left (\cos{\left (x \right )} + 1 \right )}}{2} + \log{\left (\sin{\left (x \right )} \right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.17512, size = 24, normalized size = 2.67 \begin{align*} \frac{1}{2} \, \log \left (-\cos \left (x\right )^{2} + 1\right ) + \log \left ({\left | \tan \left (\frac{1}{2} \, x\right ) \right |}\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]