3.1284 \(\int \frac {\cot (c+d x) \csc ^2(c+d x)}{a+b \sin (c+d x)} \, dx\)

Optimal. Leaf size=72 \[ \frac {b^2 \log (\sin (c+d x))}{a^3 d}-\frac {b^2 \log (a+b \sin (c+d x))}{a^3 d}+\frac {b \csc (c+d x)}{a^2 d}-\frac {\csc ^2(c+d x)}{2 a d} \]

[Out]

b*csc(d*x+c)/a^2/d-1/2*csc(d*x+c)^2/a/d+b^2*ln(sin(d*x+c))/a^3/d-b^2*ln(a+b*sin(d*x+c))/a^3/d

________________________________________________________________________________________

Rubi [A]  time = 0.09, antiderivative size = 72, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.111, Rules used = {2833, 12, 44} \[ \frac {b^2 \log (\sin (c+d x))}{a^3 d}-\frac {b^2 \log (a+b \sin (c+d x))}{a^3 d}+\frac {b \csc (c+d x)}{a^2 d}-\frac {\csc ^2(c+d x)}{2 a d} \]

Antiderivative was successfully verified.

[In]

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

[Out]

(b*Csc[c + d*x])/(a^2*d) - Csc[c + d*x]^2/(2*a*d) + (b^2*Log[Sin[c + d*x]])/(a^3*d) - (b^2*Log[a + b*Sin[c + d
*x]])/(a^3*d)

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 44

Int[((a_) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d*
x)^n, x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && ILtQ[m, 0] && IntegerQ[n] &&  !(IGtQ[n, 0] && L
tQ[m + n + 2, 0])

Rule 2833

Int[cos[(e_.) + (f_.)*(x_)]*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)
])^(n_.), x_Symbol] :> Dist[1/(b*f), Subst[Int[(a + x)^m*(c + (d*x)/b)^n, x], x, b*Sin[e + f*x]], x] /; FreeQ[
{a, b, c, d, e, f, m, n}, x]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.05, size = 72, normalized size = 1.00 \[ \frac {b^2 \log (\sin (c+d x))}{a^3 d}-\frac {b^2 \log (a+b \sin (c+d x))}{a^3 d}+\frac {b \csc (c+d x)}{a^2 d}-\frac {\csc ^2(c+d x)}{2 a d} \]

Antiderivative was successfully verified.

[In]

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

[Out]

(b*Csc[c + d*x])/(a^2*d) - Csc[c + d*x]^2/(2*a*d) + (b^2*Log[Sin[c + d*x]])/(a^3*d) - (b^2*Log[a + b*Sin[c + d
*x]])/(a^3*d)

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.16, size = 71, normalized size = 0.99 \[ -\frac {\frac {2 \, b^{2} \log \left ({\left | b \sin \left (d x + c\right ) + a \right |}\right )}{a^{3}} - \frac {2 \, b^{2} \log \left ({\left | \sin \left (d x + c\right ) \right |}\right )}{a^{3}} - \frac {2 \, a b \sin \left (d x + c\right ) - a^{2}}{a^{3} \sin \left (d x + c\right )^{2}}}{2 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.25, size = 73, normalized size = 1.01 \[ -\frac {b^{2} \ln \left (a +b \sin \left (d x +c \right )\right )}{a^{3} d}-\frac {1}{2 d a \sin \left (d x +c \right )^{2}}+\frac {b^{2} \ln \left (\sin \left (d x +c \right )\right )}{a^{3} d}+\frac {b}{d \,a^{2} \sin \left (d x +c \right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.33, size = 66, normalized size = 0.92 \[ -\frac {\frac {2 \, b^{2} \log \left (b \sin \left (d x + c\right ) + a\right )}{a^{3}} - \frac {2 \, b^{2} \log \left (\sin \left (d x + c\right )\right )}{a^{3}} - \frac {2 \, b \sin \left (d x + c\right ) - a}{a^{2} \sin \left (d x + c\right )^{2}}}{2 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 11.79, size = 132, normalized size = 1.83 \[ \frac {b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2\,a^2\,d}-\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{8\,a\,d}-\frac {b^2\,\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^3\,d}-\frac {{\mathrm {cot}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,\left (\frac {a}{2}-2\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{4\,a^2\,d}+\frac {b^2\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{a^3\,d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(b*tan(c/2 + (d*x)/2))/(2*a^2*d) - tan(c/2 + (d*x)/2)^2/(8*a*d) - (b^2*log(a + 2*b*tan(c/2 + (d*x)/2) + a*tan(
c/2 + (d*x)/2)^2))/(a^3*d) - (cot(c/2 + (d*x)/2)^2*(a/2 - 2*b*tan(c/2 + (d*x)/2)))/(4*a^2*d) + (b^2*log(tan(c/
2 + (d*x)/2)))/(a^3*d)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\cos {\left (c + d x \right )} \csc ^{3}{\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)**3/(a+b*sin(d*x+c)),x)

[Out]

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

________________________________________________________________________________________