3.716 \(\int \frac {\csc ^2(x)}{a+b \cot (x)} \, dx\)

Optimal. Leaf size=12 \[ -\frac {\log (a+b \cot (x))}{b} \]

[Out]

-ln(a+b*cot(x))/b

________________________________________________________________________________________

Rubi [A]  time = 0.04, antiderivative size = 12, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {3506, 31} \[ -\frac {\log (a+b \cot (x))}{b} \]

Antiderivative was successfully verified.

[In]

Int[Csc[x]^2/(a + b*Cot[x]),x]

[Out]

-(Log[a + b*Cot[x]]/b)

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 3506

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Dist[1/(b*f), Subst
[Int[(a + x)^n*(1 + x^2/b^2)^(m/2 - 1), x], x, b*Tan[e + f*x]], x] /; FreeQ[{a, b, e, f, n}, x] && NeQ[a^2 + b
^2, 0] && IntegerQ[m/2]

Rubi steps

\begin {align*} \int \frac {\csc ^2(x)}{a+b \cot (x)} \, dx &=-\frac {\operatorname {Subst}\left (\int \frac {1}{a+x} \, dx,x,b \cot (x)\right )}{b}\\ &=-\frac {\log (a+b \cot (x))}{b}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.06, size = 20, normalized size = 1.67 \[ \frac {\log (\sin (x))-\log (a \sin (x)+b \cos (x))}{b} \]

Antiderivative was successfully verified.

[In]

Integrate[Csc[x]^2/(a + b*Cot[x]),x]

[Out]

(Log[Sin[x]] - Log[b*Cos[x] + a*Sin[x]])/b

________________________________________________________________________________________

fricas [B]  time = 1.44, size = 45, normalized size = 3.75 \[ -\frac {\log \left (2 \, a b \cos \relax (x) \sin \relax (x) - {\left (a^{2} - b^{2}\right )} \cos \relax (x)^{2} + a^{2}\right ) - \log \left (-\frac {1}{4} \, \cos \relax (x)^{2} + \frac {1}{4}\right )}{2 \, b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(x)^2/(a+b*cot(x)),x, algorithm="fricas")

[Out]

-1/2*(log(2*a*b*cos(x)*sin(x) - (a^2 - b^2)*cos(x)^2 + a^2) - log(-1/4*cos(x)^2 + 1/4))/b

________________________________________________________________________________________

giac [A]  time = 0.17, size = 22, normalized size = 1.83 \[ -\frac {\log \left ({\left | a \tan \relax (x) + b \right |}\right )}{b} + \frac {\log \left ({\left | \tan \relax (x) \right |}\right )}{b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(x)^2/(a+b*cot(x)),x, algorithm="giac")

[Out]

-log(abs(a*tan(x) + b))/b + log(abs(tan(x)))/b

________________________________________________________________________________________

maple [A]  time = 0.07, size = 13, normalized size = 1.08 \[ -\frac {\ln \left (a +b \cot \relax (x )\right )}{b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(csc(x)^2/(a+b*cot(x)),x)

[Out]

-ln(a+b*cot(x))/b

________________________________________________________________________________________

maxima [A]  time = 0.33, size = 12, normalized size = 1.00 \[ -\frac {\log \left (b \cot \relax (x) + a\right )}{b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(x)^2/(a+b*cot(x)),x, algorithm="maxima")

[Out]

-log(b*cot(x) + a)/b

________________________________________________________________________________________

mupad [B]  time = 3.01, size = 16, normalized size = 1.33 \[ -\frac {2\,\mathrm {atanh}\left (\frac {2\,a\,\mathrm {tan}\relax (x)}{b}+1\right )}{b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(sin(x)^2*(a + b*cot(x))),x)

[Out]

-(2*atanh((2*a*tan(x))/b + 1))/b

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\csc ^{2}{\relax (x )}}{a + b \cot {\relax (x )}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(x)**2/(a+b*cot(x)),x)

[Out]

Integral(csc(x)**2/(a + b*cot(x)), x)

________________________________________________________________________________________