Optimal. Leaf size=12 \[ -\frac {\log (a \cos (x)+b)}{a} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.04, antiderivative size = 12, normalized size of antiderivative = 1.00, 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 31
Rule 2668
Rule 3160
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.02, size = 12, normalized size = 1.00 \[ -\frac {\log (a \cos (x)+b)}{a} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 1.20, size = 12, normalized size = 1.00 \[ -\frac {\log \left (a \cos \relax (x) + b\right )}{a} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.12, size = 13, normalized size = 1.08 \[ -\frac {\log \left ({\left | a \cos \relax (x) + b \right |}\right )}{a} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.11, size = 13, normalized size = 1.08 \[ -\frac {\ln \left (b +a \cos \relax (x )\right )}{a} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.40, size = 45, normalized size = 3.75 \[ -\frac {\log \left (a + b - \frac {{\left (a - b\right )} \sin \relax (x)^{2}}{{\left (\cos \relax (x) + 1\right )}^{2}}\right )}{a} + \frac {\log \left (\frac {\sin \relax (x)^{2}}{{\left (\cos \relax (x) + 1\right )}^{2}} + 1\right )}{a} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 3.28, size = 36, normalized size = 3.00 \[ \frac {\mathrm {atan}\left (\frac {a\,{\sin \left (\frac {x}{2}\right )}^2}{-1{}\mathrm {i}\,a\,{\sin \left (\frac {x}{2}\right )}^2+a\,1{}\mathrm {i}+b\,1{}\mathrm {i}}\right )\,2{}\mathrm {i}}{a} \]
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 {1}{a \cot {\relax (x )} + b \csc {\relax (x )}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________