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]

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

________________________________________________________________________________________

Rubi [A]  time = 0.0423383, 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 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])

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 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]

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.0185075, 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

________________________________________________________________________________________

Maple [A]  time = 0.017, size = 13, normalized size = 1.1 \begin{align*} -{\frac{\ln \left ( a+b\csc \left ( x \right ) \right ) }{b}} \end{align*}

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.967199, size = 16, normalized size = 1.33 \begin{align*} -\frac{\log \left (b \csc \left (x\right ) + a\right )}{b} \end{align*}

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

________________________________________________________________________________________

Fricas [A]  time = 2.49678, size = 58, normalized size = 4.83 \begin{align*} -\frac{\log \left (a \sin \left (x\right ) + b\right ) - \log \left (-\frac{1}{2} \, \sin \left (x\right )\right )}{b} \end{align*}

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

________________________________________________________________________________________

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

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))

________________________________________________________________________________________

Giac [A]  time = 1.09115, size = 30, normalized size = 2.5 \begin{align*} -\frac{\log \left ({\left | a \sin \left (x\right ) + b \right |}\right )}{b} + \frac{\log \left ({\left | \sin \left (x\right ) \right |}\right )}{b} \end{align*}

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