\(\int \cot ^5(c+d x) \csc ^2(c+d x) (a+b \sin (c+d x))^2 \, dx\) [1219]

Optimal result
Mathematica [A] (verified)
Rubi [A] (verified)
Maple [A] (verified)
Fricas [A] (verification not implemented)
Sympy [F(-1)]
Maxima [A] (verification not implemented)
Giac [A] (verification not implemented)
Mupad [B] (verification not implemented)
Reduce [B] (verification not implemented)

Optimal result

Integrand size = 29, antiderivative size = 130 \[ \int \cot ^5(c+d x) \csc ^2(c+d x) (a+b \sin (c+d x))^2 \, dx=-\frac {2 a b \csc (c+d x)}{d}-\frac {\left (a^2-2 b^2\right ) \csc ^2(c+d x)}{2 d}+\frac {4 a b \csc ^3(c+d x)}{3 d}+\frac {\left (2 a^2-b^2\right ) \csc ^4(c+d x)}{4 d}-\frac {2 a b \csc ^5(c+d x)}{5 d}-\frac {a^2 \csc ^6(c+d x)}{6 d}+\frac {b^2 \log (\sin (c+d x))}{d} \] Output:

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

Mathematica [A] (verified)

Time = 0.19 (sec) , antiderivative size = 107, normalized size of antiderivative = 0.82 \[ \int \cot ^5(c+d x) \csc ^2(c+d x) (a+b \sin (c+d x))^2 \, dx=\frac {-120 a b \csc (c+d x)-30 \left (a^2-2 b^2\right ) \csc ^2(c+d x)+80 a b \csc ^3(c+d x)+15 \left (2 a^2-b^2\right ) \csc ^4(c+d x)-24 a b \csc ^5(c+d x)-10 a^2 \csc ^6(c+d x)+60 b^2 \log (\sin (c+d x))}{60 d} \] Input:

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

Output:

(-120*a*b*Csc[c + d*x] - 30*(a^2 - 2*b^2)*Csc[c + d*x]^2 + 80*a*b*Csc[c + 
d*x]^3 + 15*(2*a^2 - b^2)*Csc[c + d*x]^4 - 24*a*b*Csc[c + d*x]^5 - 10*a^2* 
Csc[c + d*x]^6 + 60*b^2*Log[Sin[c + d*x]])/(60*d)
 

Rubi [A] (verified)

Time = 0.38 (sec) , antiderivative size = 129, normalized size of antiderivative = 0.99, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.172, Rules used = {3042, 3316, 27, 522, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \cot ^5(c+d x) \csc ^2(c+d x) (a+b \sin (c+d x))^2 \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {\cos (c+d x)^5 (a+b \sin (c+d x))^2}{\sin (c+d x)^7}dx\)

\(\Big \downarrow \) 3316

\(\displaystyle \frac {\int \csc ^7(c+d x) (a+b \sin (c+d x))^2 \left (b^2-b^2 \sin ^2(c+d x)\right )^2d(b \sin (c+d x))}{b^5 d}\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {b^2 \int \frac {\csc ^7(c+d x) (a+b \sin (c+d x))^2 \left (b^2-b^2 \sin ^2(c+d x)\right )^2}{b^7}d(b \sin (c+d x))}{d}\)

\(\Big \downarrow \) 522

\(\displaystyle \frac {b^2 \int \left (\frac {a^2 \csc ^7(c+d x)}{b^3}+\frac {2 a \csc ^6(c+d x)}{b^2}+\frac {\left (b^4-2 a^2 b^2\right ) \csc ^5(c+d x)}{b^5}-\frac {4 a \csc ^4(c+d x)}{b^2}+\frac {\left (a^2-2 b^2\right ) \csc ^3(c+d x)}{b^3}+\frac {2 a \csc ^2(c+d x)}{b^2}+\frac {\csc (c+d x)}{b}\right )d(b \sin (c+d x))}{d}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {b^2 \left (-\frac {a^2 \csc ^6(c+d x)}{6 b^2}+\frac {\left (2 a^2-b^2\right ) \csc ^4(c+d x)}{4 b^2}-\frac {\left (a^2-2 b^2\right ) \csc ^2(c+d x)}{2 b^2}-\frac {2 a \csc ^5(c+d x)}{5 b}+\frac {4 a \csc ^3(c+d x)}{3 b}-\frac {2 a \csc (c+d x)}{b}+\log (b \sin (c+d x))\right )}{d}\)

Input:

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

Output:

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

Defintions of rubi rules used

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

rule 522
Int[((e_.)*(x_))^(m_.)*((c_) + (d_.)*(x_))^(n_.)*((a_) + (b_.)*(x_)^2)^(p_. 
), x_Symbol] :> Int[ExpandIntegrand[(e*x)^m*(c + d*x)^n*(a + b*x^2)^p, x], 
x] /; FreeQ[{a, b, c, d, e, m, n}, x] && IGtQ[p, 0]
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3316
Int[cos[(e_.) + (f_.)*(x_)]^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_ 
.)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Simp[1/(b^p* 
f)   Subst[Int[(a + x)^m*(c + (d/b)*x)^n*(b^2 - x^2)^((p - 1)/2), x], x, b* 
Sin[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f, m, n}, x] && IntegerQ[(p - 1) 
/2] && NeQ[a^2 - b^2, 0]
 
Maple [A] (verified)

Time = 0.31 (sec) , antiderivative size = 117, normalized size of antiderivative = 0.90

method result size
derivativedivides \(-\frac {\frac {a^{2} \csc \left (d x +c \right )^{6}}{6}+\frac {2 a b \csc \left (d x +c \right )^{5}}{5}-\frac {a^{2} \csc \left (d x +c \right )^{4}}{2}+\frac {b^{2} \csc \left (d x +c \right )^{4}}{4}-\frac {4 a b \csc \left (d x +c \right )^{3}}{3}+\frac {\csc \left (d x +c \right )^{2} a^{2}}{2}-\csc \left (d x +c \right )^{2} b^{2}+2 a b \csc \left (d x +c \right )+b^{2} \ln \left (\csc \left (d x +c \right )\right )}{d}\) \(117\)
default \(-\frac {\frac {a^{2} \csc \left (d x +c \right )^{6}}{6}+\frac {2 a b \csc \left (d x +c \right )^{5}}{5}-\frac {a^{2} \csc \left (d x +c \right )^{4}}{2}+\frac {b^{2} \csc \left (d x +c \right )^{4}}{4}-\frac {4 a b \csc \left (d x +c \right )^{3}}{3}+\frac {\csc \left (d x +c \right )^{2} a^{2}}{2}-\csc \left (d x +c \right )^{2} b^{2}+2 a b \csc \left (d x +c \right )+b^{2} \ln \left (\csc \left (d x +c \right )\right )}{d}\) \(117\)
risch \(-i b^{2} x -\frac {2 i b^{2} c}{d}-\frac {2 i \left (15 i a^{2} {\mathrm e}^{10 i \left (d x +c \right )}-30 i b^{2} {\mathrm e}^{10 i \left (d x +c \right )}+30 a b \,{\mathrm e}^{11 i \left (d x +c \right )}+90 i b^{2} {\mathrm e}^{8 i \left (d x +c \right )}-70 a b \,{\mathrm e}^{9 i \left (d x +c \right )}+50 i a^{2} {\mathrm e}^{6 i \left (d x +c \right )}-120 i b^{2} {\mathrm e}^{6 i \left (d x +c \right )}+156 a b \,{\mathrm e}^{7 i \left (d x +c \right )}+90 i b^{2} {\mathrm e}^{4 i \left (d x +c \right )}-156 a b \,{\mathrm e}^{5 i \left (d x +c \right )}+15 i a^{2} {\mathrm e}^{2 i \left (d x +c \right )}-30 i b^{2} {\mathrm e}^{2 i \left (d x +c \right )}+70 a b \,{\mathrm e}^{3 i \left (d x +c \right )}-30 a b \,{\mathrm e}^{i \left (d x +c \right )}\right )}{15 d \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{6}}+\frac {\ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right ) b^{2}}{d}\) \(256\)

Input:

int(cot(d*x+c)^5*csc(d*x+c)^2*(a+b*sin(d*x+c))^2,x,method=_RETURNVERBOSE)
 

Output:

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

Fricas [A] (verification not implemented)

Time = 0.10 (sec) , antiderivative size = 183, normalized size of antiderivative = 1.41 \[ \int \cot ^5(c+d x) \csc ^2(c+d x) (a+b \sin (c+d x))^2 \, dx=\frac {30 \, {\left (a^{2} - 2 \, b^{2}\right )} \cos \left (d x + c\right )^{4} - 15 \, {\left (2 \, a^{2} - 7 \, b^{2}\right )} \cos \left (d x + c\right )^{2} + 10 \, a^{2} - 45 \, b^{2} + 60 \, {\left (b^{2} \cos \left (d x + c\right )^{6} - 3 \, b^{2} \cos \left (d x + c\right )^{4} + 3 \, b^{2} \cos \left (d x + c\right )^{2} - b^{2}\right )} \log \left (\frac {1}{2} \, \sin \left (d x + c\right )\right ) + 8 \, {\left (15 \, a b \cos \left (d x + c\right )^{4} - 20 \, a b \cos \left (d x + c\right )^{2} + 8 \, a b\right )} \sin \left (d x + c\right )}{60 \, {\left (d \cos \left (d x + c\right )^{6} - 3 \, d \cos \left (d x + c\right )^{4} + 3 \, d \cos \left (d x + c\right )^{2} - d\right )}} \] Input:

integrate(cot(d*x+c)^5*csc(d*x+c)^2*(a+b*sin(d*x+c))^2,x, algorithm="frica 
s")
 

Output:

1/60*(30*(a^2 - 2*b^2)*cos(d*x + c)^4 - 15*(2*a^2 - 7*b^2)*cos(d*x + c)^2 
+ 10*a^2 - 45*b^2 + 60*(b^2*cos(d*x + c)^6 - 3*b^2*cos(d*x + c)^4 + 3*b^2* 
cos(d*x + c)^2 - b^2)*log(1/2*sin(d*x + c)) + 8*(15*a*b*cos(d*x + c)^4 - 2 
0*a*b*cos(d*x + c)^2 + 8*a*b)*sin(d*x + c))/(d*cos(d*x + c)^6 - 3*d*cos(d* 
x + c)^4 + 3*d*cos(d*x + c)^2 - d)
                                                                                    
                                                                                    
 

Sympy [F(-1)]

Timed out. \[ \int \cot ^5(c+d x) \csc ^2(c+d x) (a+b \sin (c+d x))^2 \, dx=\text {Timed out} \] Input:

integrate(cot(d*x+c)**5*csc(d*x+c)**2*(a+b*sin(d*x+c))**2,x)
 

Output:

Timed out
 

Maxima [A] (verification not implemented)

Time = 0.03 (sec) , antiderivative size = 108, normalized size of antiderivative = 0.83 \[ \int \cot ^5(c+d x) \csc ^2(c+d x) (a+b \sin (c+d x))^2 \, dx=\frac {60 \, b^{2} \log \left (\sin \left (d x + c\right )\right ) - \frac {120 \, a b \sin \left (d x + c\right )^{5} - 80 \, a b \sin \left (d x + c\right )^{3} + 30 \, {\left (a^{2} - 2 \, b^{2}\right )} \sin \left (d x + c\right )^{4} + 24 \, a b \sin \left (d x + c\right ) - 15 \, {\left (2 \, a^{2} - b^{2}\right )} \sin \left (d x + c\right )^{2} + 10 \, a^{2}}{\sin \left (d x + c\right )^{6}}}{60 \, d} \] Input:

integrate(cot(d*x+c)^5*csc(d*x+c)^2*(a+b*sin(d*x+c))^2,x, algorithm="maxim 
a")
 

Output:

1/60*(60*b^2*log(sin(d*x + c)) - (120*a*b*sin(d*x + c)^5 - 80*a*b*sin(d*x 
+ c)^3 + 30*(a^2 - 2*b^2)*sin(d*x + c)^4 + 24*a*b*sin(d*x + c) - 15*(2*a^2 
 - b^2)*sin(d*x + c)^2 + 10*a^2)/sin(d*x + c)^6)/d
 

Giac [A] (verification not implemented)

Time = 0.22 (sec) , antiderivative size = 109, normalized size of antiderivative = 0.84 \[ \int \cot ^5(c+d x) \csc ^2(c+d x) (a+b \sin (c+d x))^2 \, dx=\frac {60 \, b^{2} \log \left ({\left | \sin \left (d x + c\right ) \right |}\right ) - \frac {120 \, a b \sin \left (d x + c\right )^{5} - 80 \, a b \sin \left (d x + c\right )^{3} + 30 \, {\left (a^{2} - 2 \, b^{2}\right )} \sin \left (d x + c\right )^{4} + 24 \, a b \sin \left (d x + c\right ) - 15 \, {\left (2 \, a^{2} - b^{2}\right )} \sin \left (d x + c\right )^{2} + 10 \, a^{2}}{\sin \left (d x + c\right )^{6}}}{60 \, d} \] Input:

integrate(cot(d*x+c)^5*csc(d*x+c)^2*(a+b*sin(d*x+c))^2,x, algorithm="giac" 
)
 

Output:

1/60*(60*b^2*log(abs(sin(d*x + c))) - (120*a*b*sin(d*x + c)^5 - 80*a*b*sin 
(d*x + c)^3 + 30*(a^2 - 2*b^2)*sin(d*x + c)^4 + 24*a*b*sin(d*x + c) - 15*( 
2*a^2 - b^2)*sin(d*x + c)^2 + 10*a^2)/sin(d*x + c)^6)/d
 

Mupad [B] (verification not implemented)

Time = 23.02 (sec) , antiderivative size = 274, normalized size of antiderivative = 2.11 \[ \int \cot ^5(c+d x) \csc ^2(c+d x) (a+b \sin (c+d x))^2 \, dx=\frac {b^2\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{d}-\frac {a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6}{384\,d}-\frac {{\mathrm {cot}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,\left (\frac {5\,a^2}{2}-12\,b^2\right )+\frac {a^2}{6}-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,\left (a^2-b^2\right )-\frac {20\,a\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{3}+40\,a\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+\frac {4\,a\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{5}\right )}{64\,d}-\frac {b^2\,\ln \left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}{d}+\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,\left (\frac {a^2}{64}-\frac {b^2}{64}\right )}{d}-\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,\left (\frac {5\,a^2}{128}-\frac {3\,b^2}{16}\right )}{d}+\frac {5\,a\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{48\,d}-\frac {a\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{80\,d}-\frac {5\,a\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{8\,d} \] Input:

int((cot(c + d*x)^5*(a + b*sin(c + d*x))^2)/sin(c + d*x)^2,x)
 

Output:

(b^2*log(tan(c/2 + (d*x)/2)))/d - (a^2*tan(c/2 + (d*x)/2)^6)/(384*d) - (co 
t(c/2 + (d*x)/2)^6*(tan(c/2 + (d*x)/2)^4*((5*a^2)/2 - 12*b^2) + a^2/6 - ta 
n(c/2 + (d*x)/2)^2*(a^2 - b^2) - (20*a*b*tan(c/2 + (d*x)/2)^3)/3 + 40*a*b* 
tan(c/2 + (d*x)/2)^5 + (4*a*b*tan(c/2 + (d*x)/2))/5))/(64*d) - (b^2*log(ta 
n(c/2 + (d*x)/2)^2 + 1))/d + (tan(c/2 + (d*x)/2)^4*(a^2/64 - b^2/64))/d - 
(tan(c/2 + (d*x)/2)^2*((5*a^2)/128 - (3*b^2)/16))/d + (5*a*b*tan(c/2 + (d* 
x)/2)^3)/(48*d) - (a*b*tan(c/2 + (d*x)/2)^5)/(80*d) - (5*a*b*tan(c/2 + (d* 
x)/2))/(8*d)
 

Reduce [B] (verification not implemented)

Time = 0.18 (sec) , antiderivative size = 181, normalized size of antiderivative = 1.39 \[ \int \cot ^5(c+d x) \csc ^2(c+d x) (a+b \sin (c+d x))^2 \, dx=\frac {-480 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+1\right ) \sin \left (d x +c \right )^{6} b^{2}+480 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \sin \left (d x +c \right )^{6} b^{2}+55 \sin \left (d x +c \right )^{6} a^{2}-195 \sin \left (d x +c \right )^{6} b^{2}-960 \sin \left (d x +c \right )^{5} a b -240 \sin \left (d x +c \right )^{4} a^{2}+480 \sin \left (d x +c \right )^{4} b^{2}+640 \sin \left (d x +c \right )^{3} a b +240 \sin \left (d x +c \right )^{2} a^{2}-120 \sin \left (d x +c \right )^{2} b^{2}-192 \sin \left (d x +c \right ) a b -80 a^{2}}{480 \sin \left (d x +c \right )^{6} d} \] Input:

int(cot(d*x+c)^5*csc(d*x+c)^2*(a+b*sin(d*x+c))^2,x)
 

Output:

( - 480*log(tan((c + d*x)/2)**2 + 1)*sin(c + d*x)**6*b**2 + 480*log(tan((c 
 + d*x)/2))*sin(c + d*x)**6*b**2 + 55*sin(c + d*x)**6*a**2 - 195*sin(c + d 
*x)**6*b**2 - 960*sin(c + d*x)**5*a*b - 240*sin(c + d*x)**4*a**2 + 480*sin 
(c + d*x)**4*b**2 + 640*sin(c + d*x)**3*a*b + 240*sin(c + d*x)**2*a**2 - 1 
20*sin(c + d*x)**2*b**2 - 192*sin(c + d*x)*a*b - 80*a**2)/(480*sin(c + d*x 
)**6*d)