3.1282 \(\int \frac {\cot (c+d x)}{a+b \sin (c+d x)} \, dx\)

Optimal. Leaf size=34 \[ \frac {\log (\sin (c+d x))}{a d}-\frac {\log (a+b \sin (c+d x))}{a d} \]

[Out]

ln(sin(d*x+c))/a/d-ln(a+b*sin(d*x+c))/a/d

________________________________________________________________________________________

Rubi [A]  time = 0.04, antiderivative size = 34, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.210, Rules used = {2721, 36, 29, 31} \[ \frac {\log (\sin (c+d x))}{a d}-\frac {\log (a+b \sin (c+d x))}{a d} \]

Antiderivative was successfully verified.

[In]

Int[Cot[c + d*x]/(a + b*Sin[c + d*x]),x]

[Out]

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

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 2721

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

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.02, size = 34, normalized size = 1.00 \[ \frac {\log (\sin (c+d x))}{a d}-\frac {\log (a+b \sin (c+d x))}{a d} \]

Antiderivative was successfully verified.

[In]

Integrate[Cot[c + d*x]/(a + b*Sin[c + d*x]),x]

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.92, size = 31, normalized size = 0.91 \[ -\frac {\log \left (b \sin \left (d x + c\right ) + a\right ) - \log \left (-\frac {1}{2} \, \sin \left (d x + c\right )\right )}{a d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)*csc(d*x+c)/(a+b*sin(d*x+c)),x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.15, size = 35, normalized size = 1.03 \[ -\frac {\frac {\log \left ({\left | b \sin \left (d x + c\right ) + a \right |}\right )}{a} - \frac {\log \left ({\left | \sin \left (d x + c\right ) \right |}\right )}{a}}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)*csc(d*x+c)/(a+b*sin(d*x+c)),x, algorithm="giac")

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.22, size = 35, normalized size = 1.03 \[ \frac {\ln \left (\sin \left (d x +c \right )\right )}{a d}-\frac {\ln \left (a +b \sin \left (d x +c \right )\right )}{d a} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(d*x+c)*csc(d*x+c)/(a+b*sin(d*x+c)),x)

[Out]

ln(sin(d*x+c))/a/d-1/d/a*ln(a+b*sin(d*x+c))

________________________________________________________________________________________

maxima [A]  time = 0.31, size = 33, normalized size = 0.97 \[ -\frac {\frac {\log \left (b \sin \left (d x + c\right ) + a\right )}{a} - \frac {\log \left (\sin \left (d x + c\right )\right )}{a}}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)*csc(d*x+c)/(a+b*sin(d*x+c)),x, algorithm="maxima")

[Out]

-(log(b*sin(d*x + c) + a)/a - log(sin(d*x + c))/a)/d

________________________________________________________________________________________

mupad [B]  time = 11.83, size = 48, normalized size = 1.41 \[ \frac {\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )-\ln \left (a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+2\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+a\right )}{a\,d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(c + d*x)/(sin(c + d*x)*(a + b*sin(c + d*x))),x)

[Out]

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

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\cos {\left (c + d x \right )} \csc {\left (c + d x \right )}}{a + b \sin {\left (c + d x \right )}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)*csc(d*x+c)/(a+b*sin(d*x+c)),x)

[Out]

Integral(cos(c + d*x)*csc(c + d*x)/(a + b*sin(c + d*x)), x)

________________________________________________________________________________________