\(\int \cot ^6(c+d x) \csc ^4(c+d x) (a+a \sin (c+d x)) \, dx\) [585]

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

Optimal result

Integrand size = 27, antiderivative size = 138 \[ \int \cot ^6(c+d x) \csc ^4(c+d x) (a+a \sin (c+d x)) \, dx=\frac {5 a \text {arctanh}(\cos (c+d x))}{128 d}-\frac {a \cot ^7(c+d x)}{7 d}-\frac {a \cot ^9(c+d x)}{9 d}+\frac {5 a \cot (c+d x) \csc (c+d x)}{128 d}-\frac {5 a \cot (c+d x) \csc ^3(c+d x)}{64 d}+\frac {5 a \cot ^3(c+d x) \csc ^3(c+d x)}{48 d}-\frac {a \cot ^5(c+d x) \csc ^3(c+d x)}{8 d} \] Output:

5/128*a*arctanh(cos(d*x+c))/d-1/7*a*cot(d*x+c)^7/d-1/9*a*cot(d*x+c)^9/d+5/ 
128*a*cot(d*x+c)*csc(d*x+c)/d-5/64*a*cot(d*x+c)*csc(d*x+c)^3/d+5/48*a*cot( 
d*x+c)^3*csc(d*x+c)^3/d-1/8*a*cot(d*x+c)^5*csc(d*x+c)^3/d
 

Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(301\) vs. \(2(138)=276\).

Time = 0.30 (sec) , antiderivative size = 301, normalized size of antiderivative = 2.18 \[ \int \cot ^6(c+d x) \csc ^4(c+d x) (a+a \sin (c+d x)) \, dx=\frac {2 a \cot (c+d x)}{63 d}+\frac {5 a \csc ^2\left (\frac {1}{2} (c+d x)\right )}{512 d}-\frac {15 a \csc ^4\left (\frac {1}{2} (c+d x)\right )}{1024 d}+\frac {7 a \csc ^6\left (\frac {1}{2} (c+d x)\right )}{1536 d}-\frac {a \csc ^8\left (\frac {1}{2} (c+d x)\right )}{2048 d}+\frac {a \cot (c+d x) \csc ^2(c+d x)}{63 d}-\frac {5 a \cot (c+d x) \csc ^4(c+d x)}{21 d}+\frac {19 a \cot (c+d x) \csc ^6(c+d x)}{63 d}-\frac {a \cot (c+d x) \csc ^8(c+d x)}{9 d}+\frac {5 a \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )}{128 d}-\frac {5 a \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )}{128 d}-\frac {5 a \sec ^2\left (\frac {1}{2} (c+d x)\right )}{512 d}+\frac {15 a \sec ^4\left (\frac {1}{2} (c+d x)\right )}{1024 d}-\frac {7 a \sec ^6\left (\frac {1}{2} (c+d x)\right )}{1536 d}+\frac {a \sec ^8\left (\frac {1}{2} (c+d x)\right )}{2048 d} \] Input:

Integrate[Cot[c + d*x]^6*Csc[c + d*x]^4*(a + a*Sin[c + d*x]),x]
 

Output:

(2*a*Cot[c + d*x])/(63*d) + (5*a*Csc[(c + d*x)/2]^2)/(512*d) - (15*a*Csc[( 
c + d*x)/2]^4)/(1024*d) + (7*a*Csc[(c + d*x)/2]^6)/(1536*d) - (a*Csc[(c + 
d*x)/2]^8)/(2048*d) + (a*Cot[c + d*x]*Csc[c + d*x]^2)/(63*d) - (5*a*Cot[c 
+ d*x]*Csc[c + d*x]^4)/(21*d) + (19*a*Cot[c + d*x]*Csc[c + d*x]^6)/(63*d) 
- (a*Cot[c + d*x]*Csc[c + d*x]^8)/(9*d) + (5*a*Log[Cos[(c + d*x)/2]])/(128 
*d) - (5*a*Log[Sin[(c + d*x)/2]])/(128*d) - (5*a*Sec[(c + d*x)/2]^2)/(512* 
d) + (15*a*Sec[(c + d*x)/2]^4)/(1024*d) - (7*a*Sec[(c + d*x)/2]^6)/(1536*d 
) + (a*Sec[(c + d*x)/2]^8)/(2048*d)
 

Rubi [A] (verified)

Time = 0.88 (sec) , antiderivative size = 149, normalized size of antiderivative = 1.08, number of steps used = 16, number of rules used = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.556, Rules used = {3042, 3317, 3042, 3087, 244, 2009, 3091, 3042, 3091, 3042, 3091, 3042, 4255, 3042, 4257}

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 ^6(c+d x) \csc ^4(c+d x) (a \sin (c+d x)+a) \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {\cos (c+d x)^6 (a \sin (c+d x)+a)}{\sin (c+d x)^{10}}dx\)

\(\Big \downarrow \) 3317

\(\displaystyle a \int \cot ^6(c+d x) \csc ^4(c+d x)dx+a \int \cot ^6(c+d x) \csc ^3(c+d x)dx\)

\(\Big \downarrow \) 3042

\(\displaystyle a \int \sec \left (c+d x-\frac {\pi }{2}\right )^3 \tan \left (c+d x-\frac {\pi }{2}\right )^6dx+a \int \sec \left (c+d x-\frac {\pi }{2}\right )^4 \tan \left (c+d x-\frac {\pi }{2}\right )^6dx\)

\(\Big \downarrow \) 3087

\(\displaystyle \frac {a \int \cot ^6(c+d x) \left (\cot ^2(c+d x)+1\right )d(-\cot (c+d x))}{d}+a \int \sec \left (c+d x-\frac {\pi }{2}\right )^3 \tan \left (c+d x-\frac {\pi }{2}\right )^6dx\)

\(\Big \downarrow \) 244

\(\displaystyle \frac {a \int \left (\cot ^8(c+d x)+\cot ^6(c+d x)\right )d(-\cot (c+d x))}{d}+a \int \sec \left (c+d x-\frac {\pi }{2}\right )^3 \tan \left (c+d x-\frac {\pi }{2}\right )^6dx\)

\(\Big \downarrow \) 2009

\(\displaystyle a \int \sec \left (c+d x-\frac {\pi }{2}\right )^3 \tan \left (c+d x-\frac {\pi }{2}\right )^6dx+\frac {a \left (-\frac {1}{9} \cot ^9(c+d x)-\frac {1}{7} \cot ^7(c+d x)\right )}{d}\)

\(\Big \downarrow \) 3091

\(\displaystyle a \left (-\frac {5}{8} \int \cot ^4(c+d x) \csc ^3(c+d x)dx-\frac {\cot ^5(c+d x) \csc ^3(c+d x)}{8 d}\right )+\frac {a \left (-\frac {1}{9} \cot ^9(c+d x)-\frac {1}{7} \cot ^7(c+d x)\right )}{d}\)

\(\Big \downarrow \) 3042

\(\displaystyle a \left (-\frac {5}{8} \int \sec \left (c+d x-\frac {\pi }{2}\right )^3 \tan \left (c+d x-\frac {\pi }{2}\right )^4dx-\frac {\cot ^5(c+d x) \csc ^3(c+d x)}{8 d}\right )+\frac {a \left (-\frac {1}{9} \cot ^9(c+d x)-\frac {1}{7} \cot ^7(c+d x)\right )}{d}\)

\(\Big \downarrow \) 3091

\(\displaystyle a \left (-\frac {5}{8} \left (-\frac {1}{2} \int \cot ^2(c+d x) \csc ^3(c+d x)dx-\frac {\cot ^3(c+d x) \csc ^3(c+d x)}{6 d}\right )-\frac {\cot ^5(c+d x) \csc ^3(c+d x)}{8 d}\right )+\frac {a \left (-\frac {1}{9} \cot ^9(c+d x)-\frac {1}{7} \cot ^7(c+d x)\right )}{d}\)

\(\Big \downarrow \) 3042

\(\displaystyle a \left (-\frac {5}{8} \left (-\frac {1}{2} \int \sec \left (c+d x-\frac {\pi }{2}\right )^3 \tan \left (c+d x-\frac {\pi }{2}\right )^2dx-\frac {\cot ^3(c+d x) \csc ^3(c+d x)}{6 d}\right )-\frac {\cot ^5(c+d x) \csc ^3(c+d x)}{8 d}\right )+\frac {a \left (-\frac {1}{9} \cot ^9(c+d x)-\frac {1}{7} \cot ^7(c+d x)\right )}{d}\)

\(\Big \downarrow \) 3091

\(\displaystyle a \left (-\frac {5}{8} \left (\frac {1}{2} \left (\frac {1}{4} \int \csc ^3(c+d x)dx+\frac {\cot (c+d x) \csc ^3(c+d x)}{4 d}\right )-\frac {\cot ^3(c+d x) \csc ^3(c+d x)}{6 d}\right )-\frac {\cot ^5(c+d x) \csc ^3(c+d x)}{8 d}\right )+\frac {a \left (-\frac {1}{9} \cot ^9(c+d x)-\frac {1}{7} \cot ^7(c+d x)\right )}{d}\)

\(\Big \downarrow \) 3042

\(\displaystyle a \left (-\frac {5}{8} \left (\frac {1}{2} \left (\frac {1}{4} \int \csc (c+d x)^3dx+\frac {\cot (c+d x) \csc ^3(c+d x)}{4 d}\right )-\frac {\cot ^3(c+d x) \csc ^3(c+d x)}{6 d}\right )-\frac {\cot ^5(c+d x) \csc ^3(c+d x)}{8 d}\right )+\frac {a \left (-\frac {1}{9} \cot ^9(c+d x)-\frac {1}{7} \cot ^7(c+d x)\right )}{d}\)

\(\Big \downarrow \) 4255

\(\displaystyle a \left (-\frac {5}{8} \left (\frac {1}{2} \left (\frac {1}{4} \left (\frac {1}{2} \int \csc (c+d x)dx-\frac {\cot (c+d x) \csc (c+d x)}{2 d}\right )+\frac {\cot (c+d x) \csc ^3(c+d x)}{4 d}\right )-\frac {\cot ^3(c+d x) \csc ^3(c+d x)}{6 d}\right )-\frac {\cot ^5(c+d x) \csc ^3(c+d x)}{8 d}\right )+\frac {a \left (-\frac {1}{9} \cot ^9(c+d x)-\frac {1}{7} \cot ^7(c+d x)\right )}{d}\)

\(\Big \downarrow \) 3042

\(\displaystyle a \left (-\frac {5}{8} \left (\frac {1}{2} \left (\frac {1}{4} \left (\frac {1}{2} \int \csc (c+d x)dx-\frac {\cot (c+d x) \csc (c+d x)}{2 d}\right )+\frac {\cot (c+d x) \csc ^3(c+d x)}{4 d}\right )-\frac {\cot ^3(c+d x) \csc ^3(c+d x)}{6 d}\right )-\frac {\cot ^5(c+d x) \csc ^3(c+d x)}{8 d}\right )+\frac {a \left (-\frac {1}{9} \cot ^9(c+d x)-\frac {1}{7} \cot ^7(c+d x)\right )}{d}\)

\(\Big \downarrow \) 4257

\(\displaystyle a \left (-\frac {5}{8} \left (\frac {1}{2} \left (\frac {1}{4} \left (-\frac {\text {arctanh}(\cos (c+d x))}{2 d}-\frac {\cot (c+d x) \csc (c+d x)}{2 d}\right )+\frac {\cot (c+d x) \csc ^3(c+d x)}{4 d}\right )-\frac {\cot ^3(c+d x) \csc ^3(c+d x)}{6 d}\right )-\frac {\cot ^5(c+d x) \csc ^3(c+d x)}{8 d}\right )+\frac {a \left (-\frac {1}{9} \cot ^9(c+d x)-\frac {1}{7} \cot ^7(c+d x)\right )}{d}\)

Input:

Int[Cot[c + d*x]^6*Csc[c + d*x]^4*(a + a*Sin[c + d*x]),x]
 

Output:

(a*(-1/7*Cot[c + d*x]^7 - Cot[c + d*x]^9/9))/d + a*(-1/8*(Cot[c + d*x]^5*C 
sc[c + d*x]^3)/d - (5*(-1/6*(Cot[c + d*x]^3*Csc[c + d*x]^3)/d + ((Cot[c + 
d*x]*Csc[c + d*x]^3)/(4*d) + (-1/2*ArcTanh[Cos[c + d*x]]/d - (Cot[c + d*x] 
*Csc[c + d*x])/(2*d))/4)/2))/8)
 

Defintions of rubi rules used

rule 244
Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_.), x_Symbol] :> Int[Expand 
Integrand[(c*x)^m*(a + b*x^2)^p, x], x] /; FreeQ[{a, b, c, m}, 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 3087
Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_S 
ymbol] :> Simp[1/f   Subst[Int[(b*x)^n*(1 + x^2)^(m/2 - 1), x], x, Tan[e + 
f*x]], x] /; FreeQ[{b, e, f, n}, x] && IntegerQ[m/2] &&  !(IntegerQ[(n - 1) 
/2] && LtQ[0, n, m - 1])
 

rule 3091
Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^( 
n_), x_Symbol] :> Simp[b*(a*Sec[e + f*x])^m*((b*Tan[e + f*x])^(n - 1)/(f*(m 
 + n - 1))), x] - Simp[b^2*((n - 1)/(m + n - 1))   Int[(a*Sec[e + f*x])^m*( 
b*Tan[e + f*x])^(n - 2), x], x] /; FreeQ[{a, b, e, f, m}, x] && GtQ[n, 1] & 
& NeQ[m + n - 1, 0] && IntegersQ[2*m, 2*n]
 

rule 3317
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n 
_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[a   Int[(g*Co 
s[e + f*x])^p*(d*Sin[e + f*x])^n, x], x] + Simp[b/d   Int[(g*Cos[e + f*x])^ 
p*(d*Sin[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, g, n, p}, x]
 

rule 4255
Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d* 
x]*((b*Csc[c + d*x])^(n - 1)/(d*(n - 1))), x] + Simp[b^2*((n - 2)/(n - 1)) 
  Int[(b*Csc[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] 
&& IntegerQ[2*n]
 

rule 4257
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] 
 /; FreeQ[{c, d}, x]
 
Maple [A] (verified)

Time = 0.43 (sec) , antiderivative size = 166, normalized size of antiderivative = 1.20

method result size
derivativedivides \(\frac {a \left (-\frac {\cos \left (d x +c \right )^{7}}{8 \sin \left (d x +c \right )^{8}}-\frac {\cos \left (d x +c \right )^{7}}{48 \sin \left (d x +c \right )^{6}}+\frac {\cos \left (d x +c \right )^{7}}{192 \sin \left (d x +c \right )^{4}}-\frac {\cos \left (d x +c \right )^{7}}{128 \sin \left (d x +c \right )^{2}}-\frac {\cos \left (d x +c \right )^{5}}{128}-\frac {5 \cos \left (d x +c \right )^{3}}{384}-\frac {5 \cos \left (d x +c \right )}{128}-\frac {5 \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{128}\right )+a \left (-\frac {\cos \left (d x +c \right )^{7}}{9 \sin \left (d x +c \right )^{9}}-\frac {2 \cos \left (d x +c \right )^{7}}{63 \sin \left (d x +c \right )^{7}}\right )}{d}\) \(166\)
default \(\frac {a \left (-\frac {\cos \left (d x +c \right )^{7}}{8 \sin \left (d x +c \right )^{8}}-\frac {\cos \left (d x +c \right )^{7}}{48 \sin \left (d x +c \right )^{6}}+\frac {\cos \left (d x +c \right )^{7}}{192 \sin \left (d x +c \right )^{4}}-\frac {\cos \left (d x +c \right )^{7}}{128 \sin \left (d x +c \right )^{2}}-\frac {\cos \left (d x +c \right )^{5}}{128}-\frac {5 \cos \left (d x +c \right )^{3}}{384}-\frac {5 \cos \left (d x +c \right )}{128}-\frac {5 \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{128}\right )+a \left (-\frac {\cos \left (d x +c \right )^{7}}{9 \sin \left (d x +c \right )^{9}}-\frac {2 \cos \left (d x +c \right )^{7}}{63 \sin \left (d x +c \right )^{7}}\right )}{d}\) \(166\)
risch \(-\frac {a \left (315 \,{\mathrm e}^{17 i \left (d x +c \right )}+48384 i {\mathrm e}^{8 i \left (d x +c \right )}+8022 \,{\mathrm e}^{15 i \left (d x +c \right )}+80640 i {\mathrm e}^{10 i \left (d x +c \right )}+10458 \,{\mathrm e}^{13 i \left (d x +c \right )}+16128 i {\mathrm e}^{14 i \left (d x +c \right )}+18270 \,{\mathrm e}^{11 i \left (d x +c \right )}+48384 i {\mathrm e}^{6 i \left (d x +c \right )}+26880 i {\mathrm e}^{12 i \left (d x +c \right )}-18270 \,{\mathrm e}^{7 i \left (d x +c \right )}+2304 i {\mathrm e}^{2 i \left (d x +c \right )}-10458 \,{\mathrm e}^{5 i \left (d x +c \right )}+6912 i {\mathrm e}^{4 i \left (d x +c \right )}-8022 \,{\mathrm e}^{3 i \left (d x +c \right )}-256 i-315 \,{\mathrm e}^{i \left (d x +c \right )}\right )}{4032 d \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{9}}+\frac {5 a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{128 d}-\frac {5 a \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{128 d}\) \(232\)

Input:

int(cot(d*x+c)^6*csc(d*x+c)^4*(a+a*sin(d*x+c)),x,method=_RETURNVERBOSE)
 

Output:

1/d*(a*(-1/8/sin(d*x+c)^8*cos(d*x+c)^7-1/48/sin(d*x+c)^6*cos(d*x+c)^7+1/19 
2/sin(d*x+c)^4*cos(d*x+c)^7-1/128/sin(d*x+c)^2*cos(d*x+c)^7-1/128*cos(d*x+ 
c)^5-5/384*cos(d*x+c)^3-5/128*cos(d*x+c)-5/128*ln(csc(d*x+c)-cot(d*x+c)))+ 
a*(-1/9/sin(d*x+c)^9*cos(d*x+c)^7-2/63/sin(d*x+c)^7*cos(d*x+c)^7))
 

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 259 vs. \(2 (124) = 248\).

Time = 0.10 (sec) , antiderivative size = 259, normalized size of antiderivative = 1.88 \[ \int \cot ^6(c+d x) \csc ^4(c+d x) (a+a \sin (c+d x)) \, dx=\frac {512 \, a \cos \left (d x + c\right )^{9} - 2304 \, a \cos \left (d x + c\right )^{7} + 315 \, {\left (a \cos \left (d x + c\right )^{8} - 4 \, a \cos \left (d x + c\right )^{6} + 6 \, a \cos \left (d x + c\right )^{4} - 4 \, a \cos \left (d x + c\right )^{2} + a\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) \sin \left (d x + c\right ) - 315 \, {\left (a \cos \left (d x + c\right )^{8} - 4 \, a \cos \left (d x + c\right )^{6} + 6 \, a \cos \left (d x + c\right )^{4} - 4 \, a \cos \left (d x + c\right )^{2} + a\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) \sin \left (d x + c\right ) - 42 \, {\left (15 \, a \cos \left (d x + c\right )^{7} + 73 \, a \cos \left (d x + c\right )^{5} - 55 \, a \cos \left (d x + c\right )^{3} + 15 \, a \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{16128 \, {\left (d \cos \left (d x + c\right )^{8} - 4 \, d \cos \left (d x + c\right )^{6} + 6 \, d \cos \left (d x + c\right )^{4} - 4 \, d \cos \left (d x + c\right )^{2} + d\right )} \sin \left (d x + c\right )} \] Input:

integrate(cot(d*x+c)^6*csc(d*x+c)^4*(a+a*sin(d*x+c)),x, algorithm="fricas" 
)
 

Output:

1/16128*(512*a*cos(d*x + c)^9 - 2304*a*cos(d*x + c)^7 + 315*(a*cos(d*x + c 
)^8 - 4*a*cos(d*x + c)^6 + 6*a*cos(d*x + c)^4 - 4*a*cos(d*x + c)^2 + a)*lo 
g(1/2*cos(d*x + c) + 1/2)*sin(d*x + c) - 315*(a*cos(d*x + c)^8 - 4*a*cos(d 
*x + c)^6 + 6*a*cos(d*x + c)^4 - 4*a*cos(d*x + c)^2 + a)*log(-1/2*cos(d*x 
+ c) + 1/2)*sin(d*x + c) - 42*(15*a*cos(d*x + c)^7 + 73*a*cos(d*x + c)^5 - 
 55*a*cos(d*x + c)^3 + 15*a*cos(d*x + c))*sin(d*x + c))/((d*cos(d*x + c)^8 
 - 4*d*cos(d*x + c)^6 + 6*d*cos(d*x + c)^4 - 4*d*cos(d*x + c)^2 + d)*sin(d 
*x + c))
 

Sympy [F(-1)]

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

integrate(cot(d*x+c)**6*csc(d*x+c)**4*(a+a*sin(d*x+c)),x)
 

Output:

Timed out
 

Maxima [A] (verification not implemented)

Time = 0.04 (sec) , antiderivative size = 138, normalized size of antiderivative = 1.00 \[ \int \cot ^6(c+d x) \csc ^4(c+d x) (a+a \sin (c+d x)) \, dx=-\frac {21 \, a {\left (\frac {2 \, {\left (15 \, \cos \left (d x + c\right )^{7} + 73 \, \cos \left (d x + c\right )^{5} - 55 \, \cos \left (d x + c\right )^{3} + 15 \, \cos \left (d x + c\right )\right )}}{\cos \left (d x + c\right )^{8} - 4 \, \cos \left (d x + c\right )^{6} + 6 \, \cos \left (d x + c\right )^{4} - 4 \, \cos \left (d x + c\right )^{2} + 1} - 15 \, \log \left (\cos \left (d x + c\right ) + 1\right ) + 15 \, \log \left (\cos \left (d x + c\right ) - 1\right )\right )} + \frac {256 \, {\left (9 \, \tan \left (d x + c\right )^{2} + 7\right )} a}{\tan \left (d x + c\right )^{9}}}{16128 \, d} \] Input:

integrate(cot(d*x+c)^6*csc(d*x+c)^4*(a+a*sin(d*x+c)),x, algorithm="maxima" 
)
 

Output:

-1/16128*(21*a*(2*(15*cos(d*x + c)^7 + 73*cos(d*x + c)^5 - 55*cos(d*x + c) 
^3 + 15*cos(d*x + c))/(cos(d*x + c)^8 - 4*cos(d*x + c)^6 + 6*cos(d*x + c)^ 
4 - 4*cos(d*x + c)^2 + 1) - 15*log(cos(d*x + c) + 1) + 15*log(cos(d*x + c) 
 - 1)) + 256*(9*tan(d*x + c)^2 + 7)*a/tan(d*x + c)^9)/d
 

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 256 vs. \(2 (124) = 248\).

Time = 0.21 (sec) , antiderivative size = 256, normalized size of antiderivative = 1.86 \[ \int \cot ^6(c+d x) \csc ^4(c+d x) (a+a \sin (c+d x)) \, dx=\frac {28 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} + 63 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{8} - 108 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 336 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} + 504 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 672 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 1008 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 5040 \, a \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right ) - 1512 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + \frac {14258 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} + 1512 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{8} - 1008 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 672 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} - 504 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 336 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 108 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 63 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 28 \, a}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9}}}{129024 \, d} \] Input:

integrate(cot(d*x+c)^6*csc(d*x+c)^4*(a+a*sin(d*x+c)),x, algorithm="giac")
 

Output:

1/129024*(28*a*tan(1/2*d*x + 1/2*c)^9 + 63*a*tan(1/2*d*x + 1/2*c)^8 - 108* 
a*tan(1/2*d*x + 1/2*c)^7 - 336*a*tan(1/2*d*x + 1/2*c)^6 + 504*a*tan(1/2*d* 
x + 1/2*c)^4 + 672*a*tan(1/2*d*x + 1/2*c)^3 + 1008*a*tan(1/2*d*x + 1/2*c)^ 
2 - 5040*a*log(abs(tan(1/2*d*x + 1/2*c))) - 1512*a*tan(1/2*d*x + 1/2*c) + 
(14258*a*tan(1/2*d*x + 1/2*c)^9 + 1512*a*tan(1/2*d*x + 1/2*c)^8 - 1008*a*t 
an(1/2*d*x + 1/2*c)^7 - 672*a*tan(1/2*d*x + 1/2*c)^6 - 504*a*tan(1/2*d*x + 
 1/2*c)^5 + 336*a*tan(1/2*d*x + 1/2*c)^3 + 108*a*tan(1/2*d*x + 1/2*c)^2 - 
63*a*tan(1/2*d*x + 1/2*c) - 28*a)/tan(1/2*d*x + 1/2*c)^9)/d
 

Mupad [B] (verification not implemented)

Time = 33.91 (sec) , antiderivative size = 285, normalized size of antiderivative = 2.07 \[ \int \cot ^6(c+d x) \csc ^4(c+d x) (a+a \sin (c+d x)) \, dx=\frac {3\,a\,\mathrm {cot}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{256\,d}-\frac {3\,a\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{256\,d}-\frac {a\,{\mathrm {cot}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{128\,d}-\frac {a\,{\mathrm {cot}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{192\,d}-\frac {a\,{\mathrm {cot}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{256\,d}+\frac {a\,{\mathrm {cot}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6}{384\,d}+\frac {3\,a\,{\mathrm {cot}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7}{3584\,d}-\frac {a\,{\mathrm {cot}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8}{2048\,d}-\frac {a\,{\mathrm {cot}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9}{4608\,d}+\frac {a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{128\,d}+\frac {a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{192\,d}+\frac {a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{256\,d}-\frac {a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6}{384\,d}-\frac {3\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7}{3584\,d}+\frac {a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8}{2048\,d}+\frac {a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9}{4608\,d}-\frac {5\,a\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{128\,d} \] Input:

int((cot(c + d*x)^6*(a + a*sin(c + d*x)))/sin(c + d*x)^4,x)
 

Output:

(3*a*cot(c/2 + (d*x)/2))/(256*d) - (3*a*tan(c/2 + (d*x)/2))/(256*d) - (a*c 
ot(c/2 + (d*x)/2)^2)/(128*d) - (a*cot(c/2 + (d*x)/2)^3)/(192*d) - (a*cot(c 
/2 + (d*x)/2)^4)/(256*d) + (a*cot(c/2 + (d*x)/2)^6)/(384*d) + (3*a*cot(c/2 
 + (d*x)/2)^7)/(3584*d) - (a*cot(c/2 + (d*x)/2)^8)/(2048*d) - (a*cot(c/2 + 
 (d*x)/2)^9)/(4608*d) + (a*tan(c/2 + (d*x)/2)^2)/(128*d) + (a*tan(c/2 + (d 
*x)/2)^3)/(192*d) + (a*tan(c/2 + (d*x)/2)^4)/(256*d) - (a*tan(c/2 + (d*x)/ 
2)^6)/(384*d) - (3*a*tan(c/2 + (d*x)/2)^7)/(3584*d) + (a*tan(c/2 + (d*x)/2 
)^8)/(2048*d) + (a*tan(c/2 + (d*x)/2)^9)/(4608*d) - (5*a*log(tan(c/2 + (d* 
x)/2)))/(128*d)
 

Reduce [B] (verification not implemented)

Time = 0.16 (sec) , antiderivative size = 169, normalized size of antiderivative = 1.22 \[ \int \cot ^6(c+d x) \csc ^4(c+d x) (a+a \sin (c+d x)) \, dx=\frac {a \left (256 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{8}+315 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{7}+128 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{6}-2478 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{5}-1920 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{4}+2856 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{3}+2432 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{2}-1008 \cos \left (d x +c \right ) \sin \left (d x +c \right )-896 \cos \left (d x +c \right )-315 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \sin \left (d x +c \right )^{9}\right )}{8064 \sin \left (d x +c \right )^{9} d} \] Input:

int(cot(d*x+c)^6*csc(d*x+c)^4*(a+a*sin(d*x+c)),x)
 

Output:

(a*(256*cos(c + d*x)*sin(c + d*x)**8 + 315*cos(c + d*x)*sin(c + d*x)**7 + 
128*cos(c + d*x)*sin(c + d*x)**6 - 2478*cos(c + d*x)*sin(c + d*x)**5 - 192 
0*cos(c + d*x)*sin(c + d*x)**4 + 2856*cos(c + d*x)*sin(c + d*x)**3 + 2432* 
cos(c + d*x)*sin(c + d*x)**2 - 1008*cos(c + d*x)*sin(c + d*x) - 896*cos(c 
+ d*x) - 315*log(tan((c + d*x)/2))*sin(c + d*x)**9))/(8064*sin(c + d*x)**9 
*d)