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

Optimal result
Mathematica [B] (verified)
Rubi [A] (verified)
Maple [C] (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 = 200 \[ \int \cot ^6(c+d x) \csc ^4(c+d x) (a+a \sin (c+d x))^3 \, dx=\frac {55 a^3 \text {arctanh}(\cos (c+d x))}{128 d}-\frac {4 a^3 \cot ^7(c+d x)}{7 d}-\frac {a^3 \cot ^9(c+d x)}{9 d}-\frac {25 a^3 \cot (c+d x) \csc (c+d x)}{128 d}+\frac {5 a^3 \cot ^3(c+d x) \csc (c+d x)}{24 d}-\frac {a^3 \cot ^5(c+d x) \csc (c+d x)}{6 d}-\frac {15 a^3 \cot (c+d x) \csc ^3(c+d x)}{64 d}+\frac {5 a^3 \cot ^3(c+d x) \csc ^3(c+d x)}{16 d}-\frac {3 a^3 \cot ^5(c+d x) \csc ^3(c+d x)}{8 d} \] Output:

55/128*a^3*arctanh(cos(d*x+c))/d-4/7*a^3*cot(d*x+c)^7/d-1/9*a^3*cot(d*x+c) 
^9/d-25/128*a^3*cot(d*x+c)*csc(d*x+c)/d+5/24*a^3*cot(d*x+c)^3*csc(d*x+c)/d 
-1/6*a^3*cot(d*x+c)^5*csc(d*x+c)/d-15/64*a^3*cot(d*x+c)*csc(d*x+c)^3/d+5/1 
6*a^3*cot(d*x+c)^3*csc(d*x+c)^3/d-3/8*a^3*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. \(459\) vs. \(2(200)=400\).

Time = 0.55 (sec) , antiderivative size = 459, normalized size of antiderivative = 2.30 \[ \int \cot ^6(c+d x) \csc ^4(c+d x) (a+a \sin (c+d x))^3 \, dx=a^3 \left (\frac {29 \cot \left (\frac {1}{2} (c+d x)\right )}{126 d}-\frac {73 \csc ^2\left (\frac {1}{2} (c+d x)\right )}{512 d}-\frac {4163 \cot \left (\frac {1}{2} (c+d x)\right ) \csc ^2\left (\frac {1}{2} (c+d x)\right )}{32256 d}-\frac {13 \csc ^4\left (\frac {1}{2} (c+d x)\right )}{1024 d}+\frac {319 \cot \left (\frac {1}{2} (c+d x)\right ) \csc ^4\left (\frac {1}{2} (c+d x)\right )}{10752 d}+\frac {17 \csc ^6\left (\frac {1}{2} (c+d x)\right )}{1536 d}-\frac {53 \cot \left (\frac {1}{2} (c+d x)\right ) \csc ^6\left (\frac {1}{2} (c+d x)\right )}{32256 d}-\frac {3 \csc ^8\left (\frac {1}{2} (c+d x)\right )}{2048 d}-\frac {\cot \left (\frac {1}{2} (c+d x)\right ) \csc ^8\left (\frac {1}{2} (c+d x)\right )}{4608 d}+\frac {55 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )}{128 d}-\frac {55 \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )}{128 d}+\frac {73 \sec ^2\left (\frac {1}{2} (c+d x)\right )}{512 d}+\frac {13 \sec ^4\left (\frac {1}{2} (c+d x)\right )}{1024 d}-\frac {17 \sec ^6\left (\frac {1}{2} (c+d x)\right )}{1536 d}+\frac {3 \sec ^8\left (\frac {1}{2} (c+d x)\right )}{2048 d}-\frac {29 \tan \left (\frac {1}{2} (c+d x)\right )}{126 d}+\frac {4163 \sec ^2\left (\frac {1}{2} (c+d x)\right ) \tan \left (\frac {1}{2} (c+d x)\right )}{32256 d}-\frac {319 \sec ^4\left (\frac {1}{2} (c+d x)\right ) \tan \left (\frac {1}{2} (c+d x)\right )}{10752 d}+\frac {53 \sec ^6\left (\frac {1}{2} (c+d x)\right ) \tan \left (\frac {1}{2} (c+d x)\right )}{32256 d}+\frac {\sec ^8\left (\frac {1}{2} (c+d x)\right ) \tan \left (\frac {1}{2} (c+d x)\right )}{4608 d}\right ) \] Input:

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

Output:

a^3*((29*Cot[(c + d*x)/2])/(126*d) - (73*Csc[(c + d*x)/2]^2)/(512*d) - (41 
63*Cot[(c + d*x)/2]*Csc[(c + d*x)/2]^2)/(32256*d) - (13*Csc[(c + d*x)/2]^4 
)/(1024*d) + (319*Cot[(c + d*x)/2]*Csc[(c + d*x)/2]^4)/(10752*d) + (17*Csc 
[(c + d*x)/2]^6)/(1536*d) - (53*Cot[(c + d*x)/2]*Csc[(c + d*x)/2]^6)/(3225 
6*d) - (3*Csc[(c + d*x)/2]^8)/(2048*d) - (Cot[(c + d*x)/2]*Csc[(c + d*x)/2 
]^8)/(4608*d) + (55*Log[Cos[(c + d*x)/2]])/(128*d) - (55*Log[Sin[(c + d*x) 
/2]])/(128*d) + (73*Sec[(c + d*x)/2]^2)/(512*d) + (13*Sec[(c + d*x)/2]^4)/ 
(1024*d) - (17*Sec[(c + d*x)/2]^6)/(1536*d) + (3*Sec[(c + d*x)/2]^8)/(2048 
*d) - (29*Tan[(c + d*x)/2])/(126*d) + (4163*Sec[(c + d*x)/2]^2*Tan[(c + d* 
x)/2])/(32256*d) - (319*Sec[(c + d*x)/2]^4*Tan[(c + d*x)/2])/(10752*d) + ( 
53*Sec[(c + d*x)/2]^6*Tan[(c + d*x)/2])/(32256*d) + (Sec[(c + d*x)/2]^8*Ta 
n[(c + d*x)/2])/(4608*d))
 

Rubi [A] (verified)

Time = 0.62 (sec) , antiderivative size = 200, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.103, Rules used = {3042, 3352, 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 ^6(c+d x) \csc ^4(c+d x) (a \sin (c+d x)+a)^3 \, dx\)

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3352

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

\(\Big \downarrow \) 2009

\(\displaystyle \frac {55 a^3 \text {arctanh}(\cos (c+d x))}{128 d}-\frac {a^3 \cot ^9(c+d x)}{9 d}-\frac {4 a^3 \cot ^7(c+d x)}{7 d}-\frac {3 a^3 \cot ^5(c+d x) \csc ^3(c+d x)}{8 d}-\frac {a^3 \cot ^5(c+d x) \csc (c+d x)}{6 d}+\frac {5 a^3 \cot ^3(c+d x) \csc ^3(c+d x)}{16 d}+\frac {5 a^3 \cot ^3(c+d x) \csc (c+d x)}{24 d}-\frac {15 a^3 \cot (c+d x) \csc ^3(c+d x)}{64 d}-\frac {25 a^3 \cot (c+d x) \csc (c+d x)}{128 d}\)

Input:

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

Output:

(55*a^3*ArcTanh[Cos[c + d*x]])/(128*d) - (4*a^3*Cot[c + d*x]^7)/(7*d) - (a 
^3*Cot[c + d*x]^9)/(9*d) - (25*a^3*Cot[c + d*x]*Csc[c + d*x])/(128*d) + (5 
*a^3*Cot[c + d*x]^3*Csc[c + d*x])/(24*d) - (a^3*Cot[c + d*x]^5*Csc[c + d*x 
])/(6*d) - (15*a^3*Cot[c + d*x]*Csc[c + d*x]^3)/(64*d) + (5*a^3*Cot[c + d* 
x]^3*Csc[c + d*x]^3)/(16*d) - (3*a^3*Cot[c + d*x]^5*Csc[c + d*x]^3)/(8*d)
 

Defintions of rubi rules used

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 3352
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n 
_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> Int[ExpandTrig 
[(g*cos[e + f*x])^p, (d*sin[e + f*x])^n*(a + b*sin[e + f*x])^m, x], x] /; F 
reeQ[{a, b, d, e, f, g, n, p}, x] && EqQ[a^2 - b^2, 0] && IGtQ[m, 0]
 
Maple [C] (verified)

Result contains complex when optimal does not.

Time = 0.50 (sec) , antiderivative size = 250, normalized size of antiderivative = 1.25

method result size
risch \(\frac {a^{3} \left (145152 i {\mathrm e}^{8 i \left (d x +c \right )}+4599 \,{\mathrm e}^{17 i \left (d x +c \right )}-64512 i {\mathrm e}^{14 i \left (d x +c \right )}-39858 \,{\mathrm e}^{15 i \left (d x +c \right )}-193536 i {\mathrm e}^{6 i \left (d x +c \right )}-2142 \,{\mathrm e}^{13 i \left (d x +c \right )}+118272 i {\mathrm e}^{12 i \left (d x +c \right )}-88074 \,{\mathrm e}^{11 i \left (d x +c \right )}+24192 i {\mathrm e}^{16 i \left (d x +c \right )}-9216 i {\mathrm e}^{2 i \left (d x +c \right )}+88074 \,{\mathrm e}^{7 i \left (d x +c \right )}-322560 i {\mathrm e}^{10 i \left (d x +c \right )}+2142 \,{\mathrm e}^{5 i \left (d x +c \right )}+69120 i {\mathrm e}^{4 i \left (d x +c \right )}+39858 \,{\mathrm e}^{3 i \left (d x +c \right )}+3712 i-4599 \,{\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 {55 a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{128 d}-\frac {55 a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{128 d}\) \(250\)
derivativedivides \(\frac {a^{3} \left (-\frac {\cos \left (d x +c \right )^{7}}{6 \sin \left (d x +c \right )^{6}}+\frac {\cos \left (d x +c \right )^{7}}{24 \sin \left (d x +c \right )^{4}}-\frac {\cos \left (d x +c \right )^{7}}{16 \sin \left (d x +c \right )^{2}}-\frac {\cos \left (d x +c \right )^{5}}{16}-\frac {5 \cos \left (d x +c \right )^{3}}{48}-\frac {5 \cos \left (d x +c \right )}{16}-\frac {5 \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{16}\right )-\frac {3 a^{3} \cos \left (d x +c \right )^{7}}{7 \sin \left (d x +c \right )^{7}}+3 a^{3} \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^{3} \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}\) \(297\)
default \(\frac {a^{3} \left (-\frac {\cos \left (d x +c \right )^{7}}{6 \sin \left (d x +c \right )^{6}}+\frac {\cos \left (d x +c \right )^{7}}{24 \sin \left (d x +c \right )^{4}}-\frac {\cos \left (d x +c \right )^{7}}{16 \sin \left (d x +c \right )^{2}}-\frac {\cos \left (d x +c \right )^{5}}{16}-\frac {5 \cos \left (d x +c \right )^{3}}{48}-\frac {5 \cos \left (d x +c \right )}{16}-\frac {5 \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{16}\right )-\frac {3 a^{3} \cos \left (d x +c \right )^{7}}{7 \sin \left (d x +c \right )^{7}}+3 a^{3} \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^{3} \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}\) \(297\)

Input:

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

Output:

1/4032*a^3*(145152*I*exp(8*I*(d*x+c))+4599*exp(17*I*(d*x+c))-64512*I*exp(1 
4*I*(d*x+c))-39858*exp(15*I*(d*x+c))-193536*I*exp(6*I*(d*x+c))-2142*exp(13 
*I*(d*x+c))+118272*I*exp(12*I*(d*x+c))-88074*exp(11*I*(d*x+c))+24192*I*exp 
(16*I*(d*x+c))-9216*I*exp(2*I*(d*x+c))+88074*exp(7*I*(d*x+c))-322560*I*exp 
(10*I*(d*x+c))+2142*exp(5*I*(d*x+c))+69120*I*exp(4*I*(d*x+c))+39858*exp(3* 
I*(d*x+c))+3712*I-4599*exp(I*(d*x+c)))/d/(exp(2*I*(d*x+c))-1)^9+55/128*a^3 
/d*ln(exp(I*(d*x+c))+1)-55/128*a^3/d*ln(exp(I*(d*x+c))-1)
 

Fricas [A] (verification not implemented)

Time = 0.11 (sec) , antiderivative size = 291, normalized size of antiderivative = 1.46 \[ \int \cot ^6(c+d x) \csc ^4(c+d x) (a+a \sin (c+d x))^3 \, dx=\frac {7424 \, a^{3} \cos \left (d x + c\right )^{9} - 9216 \, a^{3} \cos \left (d x + c\right )^{7} + 3465 \, {\left (a^{3} \cos \left (d x + c\right )^{8} - 4 \, a^{3} \cos \left (d x + c\right )^{6} + 6 \, a^{3} \cos \left (d x + c\right )^{4} - 4 \, a^{3} \cos \left (d x + c\right )^{2} + a^{3}\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) \sin \left (d x + c\right ) - 3465 \, {\left (a^{3} \cos \left (d x + c\right )^{8} - 4 \, a^{3} \cos \left (d x + c\right )^{6} + 6 \, a^{3} \cos \left (d x + c\right )^{4} - 4 \, a^{3} \cos \left (d x + c\right )^{2} + a^{3}\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) \sin \left (d x + c\right ) + 42 \, {\left (219 \, a^{3} \cos \left (d x + c\right )^{7} - 803 \, a^{3} \cos \left (d x + c\right )^{5} + 605 \, a^{3} \cos \left (d x + c\right )^{3} - 165 \, a^{3} \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))^3,x, algorithm="frica 
s")
 

Output:

1/16128*(7424*a^3*cos(d*x + c)^9 - 9216*a^3*cos(d*x + c)^7 + 3465*(a^3*cos 
(d*x + c)^8 - 4*a^3*cos(d*x + c)^6 + 6*a^3*cos(d*x + c)^4 - 4*a^3*cos(d*x 
+ c)^2 + a^3)*log(1/2*cos(d*x + c) + 1/2)*sin(d*x + c) - 3465*(a^3*cos(d*x 
 + c)^8 - 4*a^3*cos(d*x + c)^6 + 6*a^3*cos(d*x + c)^4 - 4*a^3*cos(d*x + c) 
^2 + a^3)*log(-1/2*cos(d*x + c) + 1/2)*sin(d*x + c) + 42*(219*a^3*cos(d*x 
+ c)^7 - 803*a^3*cos(d*x + c)^5 + 605*a^3*cos(d*x + c)^3 - 165*a^3*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))^3 \, dx=\text {Timed out} \] Input:

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

Output:

Timed out
 

Maxima [A] (verification not implemented)

Time = 0.05 (sec) , antiderivative size = 246, normalized size of antiderivative = 1.23 \[ \int \cot ^6(c+d x) \csc ^4(c+d x) (a+a \sin (c+d x))^3 \, dx=-\frac {63 \, a^{3} {\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 )} - 168 \, a^{3} {\left (\frac {2 \, {\left (33 \, \cos \left (d x + c\right )^{5} - 40 \, \cos \left (d x + c\right )^{3} + 15 \, \cos \left (d x + c\right )\right )}}{\cos \left (d x + c\right )^{6} - 3 \, \cos \left (d x + c\right )^{4} + 3 \, \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 {6912 \, a^{3}}{\tan \left (d x + c\right )^{7}} + \frac {256 \, {\left (9 \, \tan \left (d x + c\right )^{2} + 7\right )} a^{3}}{\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))^3,x, algorithm="maxim 
a")
 

Output:

-1/16128*(63*a^3*(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)) - 168*a^3*(2*(33*cos(d*x + c)^5 - 40*cos(d*x + c)^3 + 15*cos(d*x 
+ c))/(cos(d*x + c)^6 - 3*cos(d*x + c)^4 + 3*cos(d*x + c)^2 - 1) + 15*log( 
cos(d*x + c) + 1) - 15*log(cos(d*x + c) - 1)) + 6912*a^3/tan(d*x + c)^7 + 
256*(9*tan(d*x + c)^2 + 7)*a^3/tan(d*x + c)^9)/d
 

Giac [A] (verification not implemented)

Time = 0.26 (sec) , antiderivative size = 324, normalized size of antiderivative = 1.62 \[ \int \cot ^6(c+d x) \csc ^4(c+d x) (a+a \sin (c+d x))^3 \, dx=\frac {28 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} + 189 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{8} + 324 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 672 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} - 3024 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 1512 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 9744 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 18144 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 55440 \, a^{3} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right ) - 16632 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + \frac {156838 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} + 16632 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{8} - 18144 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 9744 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} + 1512 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 3024 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 672 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 324 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 189 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 28 \, a^{3}}{\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))^3,x, algorithm="giac" 
)
 

Output:

1/129024*(28*a^3*tan(1/2*d*x + 1/2*c)^9 + 189*a^3*tan(1/2*d*x + 1/2*c)^8 + 
 324*a^3*tan(1/2*d*x + 1/2*c)^7 - 672*a^3*tan(1/2*d*x + 1/2*c)^6 - 3024*a^ 
3*tan(1/2*d*x + 1/2*c)^5 - 1512*a^3*tan(1/2*d*x + 1/2*c)^4 + 9744*a^3*tan( 
1/2*d*x + 1/2*c)^3 + 18144*a^3*tan(1/2*d*x + 1/2*c)^2 - 55440*a^3*log(abs( 
tan(1/2*d*x + 1/2*c))) - 16632*a^3*tan(1/2*d*x + 1/2*c) + (156838*a^3*tan( 
1/2*d*x + 1/2*c)^9 + 16632*a^3*tan(1/2*d*x + 1/2*c)^8 - 18144*a^3*tan(1/2* 
d*x + 1/2*c)^7 - 9744*a^3*tan(1/2*d*x + 1/2*c)^6 + 1512*a^3*tan(1/2*d*x + 
1/2*c)^5 + 3024*a^3*tan(1/2*d*x + 1/2*c)^4 + 672*a^3*tan(1/2*d*x + 1/2*c)^ 
3 - 324*a^3*tan(1/2*d*x + 1/2*c)^2 - 189*a^3*tan(1/2*d*x + 1/2*c) - 28*a^3 
)/tan(1/2*d*x + 1/2*c)^9)/d
 

Mupad [B] (verification not implemented)

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

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

Output:

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

Reduce [B] (verification not implemented)

Time = 0.19 (sec) , antiderivative size = 171, normalized size of antiderivative = 0.86 \[ \int \cot ^6(c+d x) \csc ^4(c+d x) (a+a \sin (c+d x))^3 \, dx=\frac {a^{3} \left (3712 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{8}-4599 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{7}-10240 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{6}-3066 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{5}+8448 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{4}+7224 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{3}-1024 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{2}-3024 \cos \left (d x +c \right ) \sin \left (d x +c \right )-896 \cos \left (d x +c \right )-3465 \,\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))^3,x)
 

Output:

(a**3*(3712*cos(c + d*x)*sin(c + d*x)**8 - 4599*cos(c + d*x)*sin(c + d*x)* 
*7 - 10240*cos(c + d*x)*sin(c + d*x)**6 - 3066*cos(c + d*x)*sin(c + d*x)** 
5 + 8448*cos(c + d*x)*sin(c + d*x)**4 + 7224*cos(c + d*x)*sin(c + d*x)**3 
- 1024*cos(c + d*x)*sin(c + d*x)**2 - 3024*cos(c + d*x)*sin(c + d*x) - 896 
*cos(c + d*x) - 3465*log(tan((c + d*x)/2))*sin(c + d*x)**9))/(8064*sin(c + 
 d*x)**9*d)