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

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 = 176 \[ \int \cot ^6(c+d x) \csc ^6(c+d x) (a+a \sin (c+d x)) \, dx=\frac {3 a \text {arctanh}(\cos (c+d x))}{256 d}-\frac {a \cot ^7(c+d x)}{7 d}-\frac {2 a \cot ^9(c+d x)}{9 d}-\frac {a \cot ^{11}(c+d x)}{11 d}+\frac {3 a \cot (c+d x) \csc (c+d x)}{256 d}+\frac {a \cot (c+d x) \csc ^3(c+d x)}{128 d}-\frac {a \cot (c+d x) \csc ^5(c+d x)}{32 d}+\frac {a \cot ^3(c+d x) \csc ^5(c+d x)}{16 d}-\frac {a \cot ^5(c+d x) \csc ^5(c+d x)}{10 d} \] Output:

3/256*a*arctanh(cos(d*x+c))/d-1/7*a*cot(d*x+c)^7/d-2/9*a*cot(d*x+c)^9/d-1/ 
11*a*cot(d*x+c)^11/d+3/256*a*cot(d*x+c)*csc(d*x+c)/d+1/128*a*cot(d*x+c)*cs 
c(d*x+c)^3/d-1/32*a*cot(d*x+c)*csc(d*x+c)^5/d+1/16*a*cot(d*x+c)^3*csc(d*x+ 
c)^5/d-1/10*a*cot(d*x+c)^5*csc(d*x+c)^5/d
 

Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(363\) vs. \(2(176)=352\).

Time = 0.29 (sec) , antiderivative size = 363, normalized size of antiderivative = 2.06 \[ \int \cot ^6(c+d x) \csc ^6(c+d x) (a+a \sin (c+d x)) \, dx=\frac {8 a \cot (c+d x)}{693 d}+\frac {3 a \csc ^2\left (\frac {1}{2} (c+d x)\right )}{1024 d}-\frac {a \csc ^4\left (\frac {1}{2} (c+d x)\right )}{1024 d}-\frac {3 a \csc ^6\left (\frac {1}{2} (c+d x)\right )}{2048 d}+\frac {3 a \csc ^8\left (\frac {1}{2} (c+d x)\right )}{4096 d}-\frac {a \csc ^{10}\left (\frac {1}{2} (c+d x)\right )}{10240 d}+\frac {4 a \cot (c+d x) \csc ^2(c+d x)}{693 d}+\frac {a \cot (c+d x) \csc ^4(c+d x)}{231 d}-\frac {113 a \cot (c+d x) \csc ^6(c+d x)}{693 d}+\frac {23 a \cot (c+d x) \csc ^8(c+d x)}{99 d}-\frac {a \cot (c+d x) \csc ^{10}(c+d x)}{11 d}+\frac {3 a \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )}{256 d}-\frac {3 a \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )}{256 d}-\frac {3 a \sec ^2\left (\frac {1}{2} (c+d x)\right )}{1024 d}+\frac {a \sec ^4\left (\frac {1}{2} (c+d x)\right )}{1024 d}+\frac {3 a \sec ^6\left (\frac {1}{2} (c+d x)\right )}{2048 d}-\frac {3 a \sec ^8\left (\frac {1}{2} (c+d x)\right )}{4096 d}+\frac {a \sec ^{10}\left (\frac {1}{2} (c+d x)\right )}{10240 d} \] Input:

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

Output:

(8*a*Cot[c + d*x])/(693*d) + (3*a*Csc[(c + d*x)/2]^2)/(1024*d) - (a*Csc[(c 
 + d*x)/2]^4)/(1024*d) - (3*a*Csc[(c + d*x)/2]^6)/(2048*d) + (3*a*Csc[(c + 
 d*x)/2]^8)/(4096*d) - (a*Csc[(c + d*x)/2]^10)/(10240*d) + (4*a*Cot[c + d* 
x]*Csc[c + d*x]^2)/(693*d) + (a*Cot[c + d*x]*Csc[c + d*x]^4)/(231*d) - (11 
3*a*Cot[c + d*x]*Csc[c + d*x]^6)/(693*d) + (23*a*Cot[c + d*x]*Csc[c + d*x] 
^8)/(99*d) - (a*Cot[c + d*x]*Csc[c + d*x]^10)/(11*d) + (3*a*Log[Cos[(c + d 
*x)/2]])/(256*d) - (3*a*Log[Sin[(c + d*x)/2]])/(256*d) - (3*a*Sec[(c + d*x 
)/2]^2)/(1024*d) + (a*Sec[(c + d*x)/2]^4)/(1024*d) + (3*a*Sec[(c + d*x)/2] 
^6)/(2048*d) - (3*a*Sec[(c + d*x)/2]^8)/(4096*d) + (a*Sec[(c + d*x)/2]^10) 
/(10240*d)
 

Rubi [A] (verified)

Time = 1.05 (sec) , antiderivative size = 187, normalized size of antiderivative = 1.06, number of steps used = 18, number of rules used = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.630, Rules used = {3042, 3317, 3042, 3087, 244, 2009, 3091, 3042, 3091, 3042, 3091, 3042, 4255, 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 ^6(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)^{12}}dx\)

\(\Big \downarrow \) 3317

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

\(\Big \downarrow \) 3042

\(\displaystyle a \int \sec \left (c+d x-\frac {\pi }{2}\right )^5 \tan \left (c+d x-\frac {\pi }{2}\right )^6dx+a \int \sec \left (c+d x-\frac {\pi }{2}\right )^6 \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 )^2d(-\cot (c+d x))}{d}+a \int \sec \left (c+d x-\frac {\pi }{2}\right )^5 \tan \left (c+d x-\frac {\pi }{2}\right )^6dx\)

\(\Big \downarrow \) 244

\(\displaystyle \frac {a \int \left (\cot ^{10}(c+d x)+2 \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 )^5 \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 )^5 \tan \left (c+d x-\frac {\pi }{2}\right )^6dx+\frac {a \left (-\frac {1}{11} \cot ^{11}(c+d x)-\frac {2}{9} \cot ^9(c+d x)-\frac {1}{7} \cot ^7(c+d x)\right )}{d}\)

\(\Big \downarrow \) 3091

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3091

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3091

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4255

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4255

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4257

\(\displaystyle a \left (\frac {1}{2} \left (\frac {3}{8} \left (\frac {1}{6} \left (\frac {\cot (c+d x) \csc ^3(c+d x)}{4 d}-\frac {3}{4} \left (-\frac {\text {arctanh}(\cos (c+d x))}{2 d}-\frac {\cot (c+d x) \csc (c+d x)}{2 d}\right )\right )-\frac {\cot (c+d x) \csc ^5(c+d x)}{6 d}\right )+\frac {\cot ^3(c+d x) \csc ^5(c+d x)}{8 d}\right )-\frac {\cot ^5(c+d x) \csc ^5(c+d x)}{10 d}\right )+\frac {a \left (-\frac {1}{11} \cot ^{11}(c+d x)-\frac {2}{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]^6*(a + a*Sin[c + d*x]),x]
 

Output:

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

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.64 (sec) , antiderivative size = 202, normalized size of antiderivative = 1.15

method result size
derivativedivides \(\frac {a \left (-\frac {\cos \left (d x +c \right )^{7}}{10 \sin \left (d x +c \right )^{10}}-\frac {3 \cos \left (d x +c \right )^{7}}{80 \sin \left (d x +c \right )^{8}}-\frac {\cos \left (d x +c \right )^{7}}{160 \sin \left (d x +c \right )^{6}}+\frac {\cos \left (d x +c \right )^{7}}{640 \sin \left (d x +c \right )^{4}}-\frac {3 \cos \left (d x +c \right )^{7}}{1280 \sin \left (d x +c \right )^{2}}-\frac {3 \cos \left (d x +c \right )^{5}}{1280}-\frac {\cos \left (d x +c \right )^{3}}{256}-\frac {3 \cos \left (d x +c \right )}{256}-\frac {3 \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{256}\right )+a \left (-\frac {\cos \left (d x +c \right )^{7}}{11 \sin \left (d x +c \right )^{11}}-\frac {4 \cos \left (d x +c \right )^{7}}{99 \sin \left (d x +c \right )^{9}}-\frac {8 \cos \left (d x +c \right )^{7}}{693 \sin \left (d x +c \right )^{7}}\right )}{d}\) \(202\)
default \(\frac {a \left (-\frac {\cos \left (d x +c \right )^{7}}{10 \sin \left (d x +c \right )^{10}}-\frac {3 \cos \left (d x +c \right )^{7}}{80 \sin \left (d x +c \right )^{8}}-\frac {\cos \left (d x +c \right )^{7}}{160 \sin \left (d x +c \right )^{6}}+\frac {\cos \left (d x +c \right )^{7}}{640 \sin \left (d x +c \right )^{4}}-\frac {3 \cos \left (d x +c \right )^{7}}{1280 \sin \left (d x +c \right )^{2}}-\frac {3 \cos \left (d x +c \right )^{5}}{1280}-\frac {\cos \left (d x +c \right )^{3}}{256}-\frac {3 \cos \left (d x +c \right )}{256}-\frac {3 \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{256}\right )+a \left (-\frac {\cos \left (d x +c \right )^{7}}{11 \sin \left (d x +c \right )^{11}}-\frac {4 \cos \left (d x +c \right )^{7}}{99 \sin \left (d x +c \right )^{9}}-\frac {8 \cos \left (d x +c \right )^{7}}{693 \sin \left (d x +c \right )^{7}}\right )}{d}\) \(202\)
risch \(-\frac {a \left (10395 \,{\mathrm e}^{21 i \left (d x +c \right )}-110880 \,{\mathrm e}^{19 i \left (d x +c \right )}-15206400 i {\mathrm e}^{8 i \left (d x +c \right )}-2302839 \,{\mathrm e}^{17 i \left (d x +c \right )}-11827200 i {\mathrm e}^{14 i \left (d x +c \right )}-4790016 \,{\mathrm e}^{15 i \left (d x +c \right )}-3041280 i {\mathrm e}^{6 i \left (d x +c \right )}-5828130 \,{\mathrm e}^{13 i \left (d x +c \right )}-26019840 i {\mathrm e}^{12 i \left (d x +c \right )}-4730880 i {\mathrm e}^{16 i \left (d x +c \right )}+5828130 \,{\mathrm e}^{9 i \left (d x +c \right )}+112640 i {\mathrm e}^{2 i \left (d x +c \right )}+4790016 \,{\mathrm e}^{7 i \left (d x +c \right )}-21288960 i {\mathrm e}^{10 i \left (d x +c \right )}+2302839 \,{\mathrm e}^{5 i \left (d x +c \right )}-563200 i {\mathrm e}^{4 i \left (d x +c \right )}+110880 \,{\mathrm e}^{3 i \left (d x +c \right )}-10240 i-10395 \,{\mathrm e}^{i \left (d x +c \right )}\right )}{443520 d \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{11}}-\frac {3 a \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{256 d}+\frac {3 a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{256 d}\) \(266\)

Input:

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

Output:

1/d*(a*(-1/10/sin(d*x+c)^10*cos(d*x+c)^7-3/80/sin(d*x+c)^8*cos(d*x+c)^7-1/ 
160/sin(d*x+c)^6*cos(d*x+c)^7+1/640/sin(d*x+c)^4*cos(d*x+c)^7-3/1280/sin(d 
*x+c)^2*cos(d*x+c)^7-3/1280*cos(d*x+c)^5-1/256*cos(d*x+c)^3-3/256*cos(d*x+ 
c)-3/256*ln(csc(d*x+c)-cot(d*x+c)))+a*(-1/11/sin(d*x+c)^11*cos(d*x+c)^7-4/ 
99/sin(d*x+c)^9*cos(d*x+c)^7-8/693/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. 320 vs. \(2 (158) = 316\).

Time = 0.11 (sec) , antiderivative size = 320, normalized size of antiderivative = 1.82 \[ \int \cot ^6(c+d x) \csc ^6(c+d x) (a+a \sin (c+d x)) \, dx=\frac {20480 \, a \cos \left (d x + c\right )^{11} - 112640 \, a \cos \left (d x + c\right )^{9} + 253440 \, a \cos \left (d x + c\right )^{7} + 10395 \, {\left (a \cos \left (d x + c\right )^{10} - 5 \, a \cos \left (d x + c\right )^{8} + 10 \, a \cos \left (d x + c\right )^{6} - 10 \, a \cos \left (d x + c\right )^{4} + 5 \, 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 ) - 10395 \, {\left (a \cos \left (d x + c\right )^{10} - 5 \, a \cos \left (d x + c\right )^{8} + 10 \, a \cos \left (d x + c\right )^{6} - 10 \, a \cos \left (d x + c\right )^{4} + 5 \, 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 ) - 1386 \, {\left (15 \, a \cos \left (d x + c\right )^{9} - 70 \, a \cos \left (d x + c\right )^{7} - 128 \, a \cos \left (d x + c\right )^{5} + 70 \, a \cos \left (d x + c\right )^{3} - 15 \, a \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{1774080 \, {\left (d \cos \left (d x + c\right )^{10} - 5 \, d \cos \left (d x + c\right )^{8} + 10 \, d \cos \left (d x + c\right )^{6} - 10 \, d \cos \left (d x + c\right )^{4} + 5 \, 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)^6*(a+a*sin(d*x+c)),x, algorithm="fricas" 
)
 

Output:

1/1774080*(20480*a*cos(d*x + c)^11 - 112640*a*cos(d*x + c)^9 + 253440*a*co 
s(d*x + c)^7 + 10395*(a*cos(d*x + c)^10 - 5*a*cos(d*x + c)^8 + 10*a*cos(d* 
x + c)^6 - 10*a*cos(d*x + c)^4 + 5*a*cos(d*x + c)^2 - a)*log(1/2*cos(d*x + 
 c) + 1/2)*sin(d*x + c) - 10395*(a*cos(d*x + c)^10 - 5*a*cos(d*x + c)^8 + 
10*a*cos(d*x + c)^6 - 10*a*cos(d*x + c)^4 + 5*a*cos(d*x + c)^2 - a)*log(-1 
/2*cos(d*x + c) + 1/2)*sin(d*x + c) - 1386*(15*a*cos(d*x + c)^9 - 70*a*cos 
(d*x + c)^7 - 128*a*cos(d*x + c)^5 + 70*a*cos(d*x + c)^3 - 15*a*cos(d*x + 
c))*sin(d*x + c))/((d*cos(d*x + c)^10 - 5*d*cos(d*x + c)^8 + 10*d*cos(d*x 
+ c)^6 - 10*d*cos(d*x + c)^4 + 5*d*cos(d*x + c)^2 - d)*sin(d*x + c))
 

Sympy [F(-1)]

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

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

Output:

Timed out
 

Maxima [A] (verification not implemented)

Time = 0.05 (sec) , antiderivative size = 168, normalized size of antiderivative = 0.95 \[ \int \cot ^6(c+d x) \csc ^6(c+d x) (a+a \sin (c+d x)) \, dx=-\frac {693 \, a {\left (\frac {2 \, {\left (15 \, \cos \left (d x + c\right )^{9} - 70 \, \cos \left (d x + c\right )^{7} - 128 \, \cos \left (d x + c\right )^{5} + 70 \, \cos \left (d x + c\right )^{3} - 15 \, \cos \left (d x + c\right )\right )}}{\cos \left (d x + c\right )^{10} - 5 \, \cos \left (d x + c\right )^{8} + 10 \, \cos \left (d x + c\right )^{6} - 10 \, \cos \left (d x + c\right )^{4} + 5 \, \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 {2560 \, {\left (99 \, \tan \left (d x + c\right )^{4} + 154 \, \tan \left (d x + c\right )^{2} + 63\right )} a}{\tan \left (d x + c\right )^{11}}}{1774080 \, d} \] Input:

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

Output:

-1/1774080*(693*a*(2*(15*cos(d*x + c)^9 - 70*cos(d*x + c)^7 - 128*cos(d*x 
+ c)^5 + 70*cos(d*x + c)^3 - 15*cos(d*x + c))/(cos(d*x + c)^10 - 5*cos(d*x 
 + c)^8 + 10*cos(d*x + c)^6 - 10*cos(d*x + c)^4 + 5*cos(d*x + c)^2 - 1) - 
15*log(cos(d*x + c) + 1) + 15*log(cos(d*x + c) - 1)) + 2560*(99*tan(d*x + 
c)^4 + 154*tan(d*x + c)^2 + 63)*a/tan(d*x + c)^11)/d
 

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 340 vs. \(2 (158) = 316\).

Time = 0.21 (sec) , antiderivative size = 340, normalized size of antiderivative = 1.93 \[ \int \cot ^6(c+d x) \csc ^6(c+d x) (a+a \sin (c+d x)) \, dx=\frac {630 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{11} + 1386 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{10} - 770 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} - 3465 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{8} - 4950 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 6930 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} + 6930 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 27720 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 23100 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 13860 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 166320 \, a \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right ) - 69300 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + \frac {502266 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{11} + 69300 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{10} - 13860 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} - 23100 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{8} - 27720 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 6930 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} + 6930 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 4950 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 3465 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 770 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1386 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 630 \, a}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{11}}}{14192640 \, d} \] Input:

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

Output:

1/14192640*(630*a*tan(1/2*d*x + 1/2*c)^11 + 1386*a*tan(1/2*d*x + 1/2*c)^10 
 - 770*a*tan(1/2*d*x + 1/2*c)^9 - 3465*a*tan(1/2*d*x + 1/2*c)^8 - 4950*a*t 
an(1/2*d*x + 1/2*c)^7 - 6930*a*tan(1/2*d*x + 1/2*c)^6 + 6930*a*tan(1/2*d*x 
 + 1/2*c)^5 + 27720*a*tan(1/2*d*x + 1/2*c)^4 + 23100*a*tan(1/2*d*x + 1/2*c 
)^3 + 13860*a*tan(1/2*d*x + 1/2*c)^2 - 166320*a*log(abs(tan(1/2*d*x + 1/2* 
c))) - 69300*a*tan(1/2*d*x + 1/2*c) + (502266*a*tan(1/2*d*x + 1/2*c)^11 + 
69300*a*tan(1/2*d*x + 1/2*c)^10 - 13860*a*tan(1/2*d*x + 1/2*c)^9 - 23100*a 
*tan(1/2*d*x + 1/2*c)^8 - 27720*a*tan(1/2*d*x + 1/2*c)^7 - 6930*a*tan(1/2* 
d*x + 1/2*c)^6 + 6930*a*tan(1/2*d*x + 1/2*c)^5 + 4950*a*tan(1/2*d*x + 1/2* 
c)^4 + 3465*a*tan(1/2*d*x + 1/2*c)^3 + 770*a*tan(1/2*d*x + 1/2*c)^2 - 1386 
*a*tan(1/2*d*x + 1/2*c) - 630*a)/tan(1/2*d*x + 1/2*c)^11)/d
 

Mupad [B] (verification not implemented)

Time = 34.91 (sec) , antiderivative size = 387, normalized size of antiderivative = 2.20 \[ \int \cot ^6(c+d x) \csc ^6(c+d x) (a+a \sin (c+d x)) \, dx=\frac {5\,a\,\mathrm {cot}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{1024\,d}-\frac {5\,a\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{1024\,d}-\frac {a\,{\mathrm {cot}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{1024\,d}-\frac {5\,a\,{\mathrm {cot}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{3072\,d}-\frac {a\,{\mathrm {cot}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{512\,d}-\frac {a\,{\mathrm {cot}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{2048\,d}+\frac {a\,{\mathrm {cot}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6}{2048\,d}+\frac {5\,a\,{\mathrm {cot}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7}{14336\,d}+\frac {a\,{\mathrm {cot}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8}{4096\,d}+\frac {a\,{\mathrm {cot}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9}{18432\,d}-\frac {a\,{\mathrm {cot}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}}{10240\,d}-\frac {a\,{\mathrm {cot}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{11}}{22528\,d}+\frac {a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{1024\,d}+\frac {5\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{3072\,d}+\frac {a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{512\,d}+\frac {a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{2048\,d}-\frac {a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6}{2048\,d}-\frac {5\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7}{14336\,d}-\frac {a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8}{4096\,d}-\frac {a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9}{18432\,d}+\frac {a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}}{10240\,d}+\frac {a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{11}}{22528\,d}-\frac {3\,a\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{256\,d} \] Input:

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

Output:

(5*a*cot(c/2 + (d*x)/2))/(1024*d) - (5*a*tan(c/2 + (d*x)/2))/(1024*d) - (a 
*cot(c/2 + (d*x)/2)^2)/(1024*d) - (5*a*cot(c/2 + (d*x)/2)^3)/(3072*d) - (a 
*cot(c/2 + (d*x)/2)^4)/(512*d) - (a*cot(c/2 + (d*x)/2)^5)/(2048*d) + (a*co 
t(c/2 + (d*x)/2)^6)/(2048*d) + (5*a*cot(c/2 + (d*x)/2)^7)/(14336*d) + (a*c 
ot(c/2 + (d*x)/2)^8)/(4096*d) + (a*cot(c/2 + (d*x)/2)^9)/(18432*d) - (a*co 
t(c/2 + (d*x)/2)^10)/(10240*d) - (a*cot(c/2 + (d*x)/2)^11)/(22528*d) + (a* 
tan(c/2 + (d*x)/2)^2)/(1024*d) + (5*a*tan(c/2 + (d*x)/2)^3)/(3072*d) + (a* 
tan(c/2 + (d*x)/2)^4)/(512*d) + (a*tan(c/2 + (d*x)/2)^5)/(2048*d) - (a*tan 
(c/2 + (d*x)/2)^6)/(2048*d) - (5*a*tan(c/2 + (d*x)/2)^7)/(14336*d) - (a*ta 
n(c/2 + (d*x)/2)^8)/(4096*d) - (a*tan(c/2 + (d*x)/2)^9)/(18432*d) + (a*tan 
(c/2 + (d*x)/2)^10)/(10240*d) + (a*tan(c/2 + (d*x)/2)^11)/(22528*d) - (3*a 
*log(tan(c/2 + (d*x)/2)))/(256*d)
 

Reduce [B] (verification not implemented)

Time = 0.16 (sec) , antiderivative size = 201, normalized size of antiderivative = 1.14 \[ \int \cot ^6(c+d x) \csc ^6(c+d x) (a+a \sin (c+d x)) \, dx=\frac {a \left (10240 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{10}+10395 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{9}+5120 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{8}+6930 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{7}+3840 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{6}-171864 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{5}-144640 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{4}+232848 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{3}+206080 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{2}-88704 \cos \left (d x +c \right ) \sin \left (d x +c \right )-80640 \cos \left (d x +c \right )-10395 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \sin \left (d x +c \right )^{11}\right )}{887040 \sin \left (d x +c \right )^{11} d} \] Input:

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

Output:

(a*(10240*cos(c + d*x)*sin(c + d*x)**10 + 10395*cos(c + d*x)*sin(c + d*x)* 
*9 + 5120*cos(c + d*x)*sin(c + d*x)**8 + 6930*cos(c + d*x)*sin(c + d*x)**7 
 + 3840*cos(c + d*x)*sin(c + d*x)**6 - 171864*cos(c + d*x)*sin(c + d*x)**5 
 - 144640*cos(c + d*x)*sin(c + d*x)**4 + 232848*cos(c + d*x)*sin(c + d*x)* 
*3 + 206080*cos(c + d*x)*sin(c + d*x)**2 - 88704*cos(c + d*x)*sin(c + d*x) 
 - 80640*cos(c + d*x) - 10395*log(tan((c + d*x)/2))*sin(c + d*x)**11))/(88 
7040*sin(c + d*x)**11*d)