3.735 \(\int \frac {\cot (x) \csc (x)}{a+b \csc (x)} \, dx\)

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.04, antiderivative size = 20, normalized size of antiderivative = 1.67, number of steps used = 4, number of rules used = 4, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.308, Rules used = {4338, 36, 29, 31} \[ \frac {\log (\sin (x))}{b}-\frac {\log (a \sin (x)+b)}{b} \]

Antiderivative was successfully verified.

[In]

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

[Out]

Log[Sin[x]]/b - Log[b + a*Sin[x]]/b

Rule 29

Int[(x_)^(-1), x_Symbol] :> Simp[Log[x], x]

Rule 31

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

Rule 36

Int[1/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :> Dist[b/(b*c - a*d), Int[1/(a + b*x), x], x] -
Dist[d/(b*c - a*d), Int[1/(c + d*x), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0]

Rule 4338

Int[(u_)*(F_)[(c_.)*((a_.) + (b_.)*(x_))], x_Symbol] :> With[{d = FreeFactors[Sin[c*(a + b*x)], x]}, Dist[1/(b
*c), Subst[Int[SubstFor[1/x, Sin[c*(a + b*x)]/d, u, x], x], x, Sin[c*(a + b*x)]/d], x] /; FunctionOfQ[Sin[c*(a
 + b*x)]/d, u, x, True]] /; FreeQ[{a, b, c}, x] && (EqQ[F, Cot] || EqQ[F, cot])

Rubi steps

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

________________________________________________________________________________________

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

Antiderivative was successfully verified.

[In]

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

[Out]

Log[Sin[x]]/b - Log[b + a*Sin[x]]/b

________________________________________________________________________________________

fricas [A]  time = 0.69, size = 20, normalized size = 1.67 \[ -\frac {\log \left (a \sin \relax (x) + b\right ) - \log \left (-\frac {1}{2} \, \sin \relax (x)\right )}{b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 3.18, size = 31, normalized size = 2.58 \[ -\frac {\ln \left (b\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2+2\,a\,\mathrm {tan}\left (\frac {x}{2}\right )+b\right )-\ln \left (\mathrm {tan}\left (\frac {x}{2}\right )\right )}{b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-(log(b + 2*a*tan(x/2) + b*tan(x/2)^2) - log(tan(x/2)))/b

________________________________________________________________________________________

sympy [A]  time = 0.39, size = 17, normalized size = 1.42 \[ \begin {cases} - \frac {\log {\left (\frac {a}{b} + \csc {\relax (x )} \right )}}{b} & \text {for}\: b \neq 0 \\- \frac {\csc {\relax (x )}}{a} & \text {otherwise} \end {cases} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Piecewise((-log(a/b + csc(x))/b, Ne(b, 0)), (-csc(x)/a, True))

________________________________________________________________________________________