Optimal. Leaf size=12 \[ -\frac{\log (a \cos (x)+b)}{a} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0350371, antiderivative size = 12, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 11, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.273, Rules used = {3160, 2668, 31} \[ -\frac{\log (a \cos (x)+b)}{a} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3160
Rule 2668
Rule 31
Rubi steps
\begin{align*} \int \frac{1}{a \cot (x)+b \csc (x)} \, dx &=\int \frac{\sin (x)}{b+a \cos (x)} \, dx\\ &=-\frac{\operatorname{Subst}\left (\int \frac{1}{b+x} \, dx,x,a \cos (x)\right )}{a}\\ &=-\frac{\log (b+a \cos (x))}{a}\\ \end{align*}
Mathematica [A] time = 0.0161616, size = 12, normalized size = 1. \[ -\frac{\log (a \cos (x)+b)}{a} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.038, size = 13, normalized size = 1.1 \begin{align*} -{\frac{\ln \left ( b+a\cos \left ( x \right ) \right ) }{a}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] time = 1.4615, size = 61, normalized size = 5.08 \begin{align*} -\frac{\log \left (a + b - \frac{{\left (a - b\right )} \sin \left (x\right )^{2}}{{\left (\cos \left (x\right ) + 1\right )}^{2}}\right )}{a} + \frac{\log \left (\frac{\sin \left (x\right )^{2}}{{\left (\cos \left (x\right ) + 1\right )}^{2}} + 1\right )}{a} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.06224, size = 30, normalized size = 2.5 \begin{align*} -\frac{\log \left (a \cos \left (x\right ) + b\right )}{a} \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{1}{a \cot{\left (x \right )} + b \csc{\left (x \right )}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.13109, size = 18, normalized size = 1.5 \begin{align*} -\frac{\log \left ({\left | a \cos \left (x\right ) + b \right |}\right )}{a} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]