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

Optimal result
Mathematica [A] (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 = 27, antiderivative size = 182 \[ \int \cot ^6(c+d x) \csc (c+d x) (a+a \sin (c+d x))^3 \, dx=-\frac {a^3 x}{2}-\frac {85 a^3 \text {arctanh}(\cos (c+d x))}{16 d}+\frac {3 a^3 \cos (c+d x)}{d}-\frac {a^3 \cot (c+d x)}{d}+\frac {2 a^3 \cot ^3(c+d x)}{3 d}-\frac {3 a^3 \cot ^5(c+d x)}{5 d}+\frac {43 a^3 \cot (c+d x) \csc (c+d x)}{16 d}-\frac {5 a^3 \cot (c+d x) \csc ^3(c+d x)}{24 d}-\frac {a^3 \cot (c+d x) \csc ^5(c+d x)}{6 d}+\frac {a^3 \cos (c+d x) \sin (c+d x)}{2 d} \] Output:

-1/2*a^3*x-85/16*a^3*arctanh(cos(d*x+c))/d+3*a^3*cos(d*x+c)/d-a^3*cot(d*x+ 
c)/d+2/3*a^3*cot(d*x+c)^3/d-3/5*a^3*cot(d*x+c)^5/d+43/16*a^3*cot(d*x+c)*cs 
c(d*x+c)/d-5/24*a^3*cot(d*x+c)*csc(d*x+c)^3/d-1/6*a^3*cot(d*x+c)*csc(d*x+c 
)^5/d+1/2*a^3*cos(d*x+c)*sin(d*x+c)/d
 

Mathematica [A] (verified)

Time = 8.80 (sec) , antiderivative size = 289, normalized size of antiderivative = 1.59 \[ \int \cot ^6(c+d x) \csc (c+d x) (a+a \sin (c+d x))^3 \, dx=\frac {a^3 (1+\sin (c+d x))^3 \left (-960 (c+d x)+5760 \cos (c+d x)-2176 \cot \left (\frac {1}{2} (c+d x)\right )+1290 \csc ^2\left (\frac {1}{2} (c+d x)\right )-30 \csc ^4\left (\frac {1}{2} (c+d x)\right )-5 \csc ^6\left (\frac {1}{2} (c+d x)\right )-10200 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )+10200 \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )-1290 \sec ^2\left (\frac {1}{2} (c+d x)\right )+30 \sec ^4\left (\frac {1}{2} (c+d x)\right )+5 \sec ^6\left (\frac {1}{2} (c+d x)\right )-3296 \csc ^3(c+d x) \sin ^4\left (\frac {1}{2} (c+d x)\right )+206 \csc ^4\left (\frac {1}{2} (c+d x)\right ) \sin (c+d x)-18 \csc ^6\left (\frac {1}{2} (c+d x)\right ) \sin (c+d x)+480 \sin (2 (c+d x))+2176 \tan \left (\frac {1}{2} (c+d x)\right )+36 \sec ^4\left (\frac {1}{2} (c+d x)\right ) \tan \left (\frac {1}{2} (c+d x)\right )\right )}{1920 d \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )^6} \] Input:

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

Output:

(a^3*(1 + Sin[c + d*x])^3*(-960*(c + d*x) + 5760*Cos[c + d*x] - 2176*Cot[( 
c + d*x)/2] + 1290*Csc[(c + d*x)/2]^2 - 30*Csc[(c + d*x)/2]^4 - 5*Csc[(c + 
 d*x)/2]^6 - 10200*Log[Cos[(c + d*x)/2]] + 10200*Log[Sin[(c + d*x)/2]] - 1 
290*Sec[(c + d*x)/2]^2 + 30*Sec[(c + d*x)/2]^4 + 5*Sec[(c + d*x)/2]^6 - 32 
96*Csc[c + d*x]^3*Sin[(c + d*x)/2]^4 + 206*Csc[(c + d*x)/2]^4*Sin[c + d*x] 
 - 18*Csc[(c + d*x)/2]^6*Sin[c + d*x] + 480*Sin[2*(c + d*x)] + 2176*Tan[(c 
 + d*x)/2] + 36*Sec[(c + d*x)/2]^4*Tan[(c + d*x)/2]))/(1920*d*(Cos[(c + d* 
x)/2] + Sin[(c + d*x)/2])^6)
 

Rubi [A] (verified)

Time = 0.48 (sec) , antiderivative size = 186, normalized size of antiderivative = 1.02, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.111, Rules used = {3042, 3351, 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 (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)^7}dx\)

\(\Big \downarrow \) 3351

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

\(\Big \downarrow \) 2009

\(\displaystyle \frac {-\frac {85 a^9 \text {arctanh}(\cos (c+d x))}{16 d}+\frac {3 a^9 \cos (c+d x)}{d}-\frac {3 a^9 \cot ^5(c+d x)}{5 d}+\frac {2 a^9 \cot ^3(c+d x)}{3 d}-\frac {a^9 \cot (c+d x)}{d}+\frac {a^9 \sin (c+d x) \cos (c+d x)}{2 d}-\frac {a^9 \cot (c+d x) \csc ^5(c+d x)}{6 d}-\frac {5 a^9 \cot (c+d x) \csc ^3(c+d x)}{24 d}+\frac {43 a^9 \cot (c+d x) \csc (c+d x)}{16 d}-\frac {a^9 x}{2}}{a^6}\)

Input:

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

Output:

(-1/2*(a^9*x) - (85*a^9*ArcTanh[Cos[c + d*x]])/(16*d) + (3*a^9*Cos[c + d*x 
])/d - (a^9*Cot[c + d*x])/d + (2*a^9*Cot[c + d*x]^3)/(3*d) - (3*a^9*Cot[c 
+ d*x]^5)/(5*d) + (43*a^9*Cot[c + d*x]*Csc[c + d*x])/(16*d) - (5*a^9*Cot[c 
 + d*x]*Csc[c + d*x]^3)/(24*d) - (a^9*Cot[c + d*x]*Csc[c + d*x]^5)/(6*d) + 
 (a^9*Cos[c + d*x]*Sin[c + d*x])/(2*d))/a^6
 

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 3351
Int[cos[(e_.) + (f_.)*(x_)]^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n_)*((a_) 
 + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> Simp[1/a^p   Int[Expan 
dTrig[(d*sin[e + f*x])^n*(a - b*sin[e + f*x])^(p/2)*(a + b*sin[e + f*x])^(m 
 + p/2), x], x], x] /; FreeQ[{a, b, d, e, f}, x] && EqQ[a^2 - b^2, 0] && In 
tegersQ[m, n, p/2] && ((GtQ[m, 0] && GtQ[p, 0] && LtQ[-m - p, n, -1]) || (G 
tQ[m, 2] && LtQ[p, 0] && GtQ[m + p/2, 0]))
 
Maple [C] (verified)

Result contains complex when optimal does not.

Time = 2.04 (sec) , antiderivative size = 268, normalized size of antiderivative = 1.47

method result size
risch \(-\frac {a^{3} x}{2}-\frac {i a^{3} {\mathrm e}^{2 i \left (d x +c \right )}}{8 d}+\frac {3 a^{3} {\mathrm e}^{i \left (d x +c \right )}}{2 d}+\frac {3 a^{3} {\mathrm e}^{-i \left (d x +c \right )}}{2 d}+\frac {i a^{3} {\mathrm e}^{-2 i \left (d x +c \right )}}{8 d}-\frac {a^{3} \left (645 \,{\mathrm e}^{11 i \left (d x +c \right )}-1735 \,{\mathrm e}^{9 i \left (d x +c \right )}+1440 i {\mathrm e}^{10 i \left (d x +c \right )}+450 \,{\mathrm e}^{7 i \left (d x +c \right )}-3360 i {\mathrm e}^{8 i \left (d x +c \right )}+450 \,{\mathrm e}^{5 i \left (d x +c \right )}+5440 i {\mathrm e}^{6 i \left (d x +c \right )}-1735 \,{\mathrm e}^{3 i \left (d x +c \right )}-4800 i {\mathrm e}^{4 i \left (d x +c \right )}+645 \,{\mathrm e}^{i \left (d x +c \right )}+1824 i {\mathrm e}^{2 i \left (d x +c \right )}-544 i\right )}{120 d \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{6}}-\frac {85 a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{16 d}+\frac {85 a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{16 d}\) \(268\)
derivativedivides \(\frac {a^{3} \left (-\frac {\cos \left (d x +c \right )^{7}}{3 \sin \left (d x +c \right )^{3}}+\frac {4 \cos \left (d x +c \right )^{7}}{3 \sin \left (d x +c \right )}+\frac {4 \left (\cos \left (d x +c \right )^{5}+\frac {5 \cos \left (d x +c \right )^{3}}{4}+\frac {15 \cos \left (d x +c \right )}{8}\right ) \sin \left (d x +c \right )}{3}+\frac {5 d x}{2}+\frac {5 c}{2}\right )+3 a^{3} \left (-\frac {\cos \left (d x +c \right )^{7}}{4 \sin \left (d x +c \right )^{4}}+\frac {3 \cos \left (d x +c \right )^{7}}{8 \sin \left (d x +c \right )^{2}}+\frac {3 \cos \left (d x +c \right )^{5}}{8}+\frac {5 \cos \left (d x +c \right )^{3}}{8}+\frac {15 \cos \left (d x +c \right )}{8}+\frac {15 \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{8}\right )+3 a^{3} \left (-\frac {\cot \left (d x +c \right )^{5}}{5}+\frac {\cot \left (d x +c \right )^{3}}{3}-\cot \left (d x +c \right )-d x -c \right )+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 )}{d}\) \(323\)
default \(\frac {a^{3} \left (-\frac {\cos \left (d x +c \right )^{7}}{3 \sin \left (d x +c \right )^{3}}+\frac {4 \cos \left (d x +c \right )^{7}}{3 \sin \left (d x +c \right )}+\frac {4 \left (\cos \left (d x +c \right )^{5}+\frac {5 \cos \left (d x +c \right )^{3}}{4}+\frac {15 \cos \left (d x +c \right )}{8}\right ) \sin \left (d x +c \right )}{3}+\frac {5 d x}{2}+\frac {5 c}{2}\right )+3 a^{3} \left (-\frac {\cos \left (d x +c \right )^{7}}{4 \sin \left (d x +c \right )^{4}}+\frac {3 \cos \left (d x +c \right )^{7}}{8 \sin \left (d x +c \right )^{2}}+\frac {3 \cos \left (d x +c \right )^{5}}{8}+\frac {5 \cos \left (d x +c \right )^{3}}{8}+\frac {15 \cos \left (d x +c \right )}{8}+\frac {15 \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{8}\right )+3 a^{3} \left (-\frac {\cot \left (d x +c \right )^{5}}{5}+\frac {\cot \left (d x +c \right )^{3}}{3}-\cot \left (d x +c \right )-d x -c \right )+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 )}{d}\) \(323\)

Input:

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

Output:

-1/2*a^3*x-1/8*I*a^3/d*exp(2*I*(d*x+c))+3/2*a^3/d*exp(I*(d*x+c))+3/2*a^3/d 
*exp(-I*(d*x+c))+1/8*I*a^3/d*exp(-2*I*(d*x+c))-1/120*a^3*(645*exp(11*I*(d* 
x+c))-1735*exp(9*I*(d*x+c))+1440*I*exp(10*I*(d*x+c))+450*exp(7*I*(d*x+c))- 
3360*I*exp(8*I*(d*x+c))+450*exp(5*I*(d*x+c))+5440*I*exp(6*I*(d*x+c))-1735* 
exp(3*I*(d*x+c))-4800*I*exp(4*I*(d*x+c))+645*exp(I*(d*x+c))+1824*I*exp(2*I 
*(d*x+c))-544*I)/d/(exp(2*I*(d*x+c))-1)^6-85/16*a^3/d*ln(exp(I*(d*x+c))+1) 
+85/16*a^3/d*ln(exp(I*(d*x+c))-1)
 

Fricas [A] (verification not implemented)

Time = 0.11 (sec) , antiderivative size = 316, normalized size of antiderivative = 1.74 \[ \int \cot ^6(c+d x) \csc (c+d x) (a+a \sin (c+d x))^3 \, dx=-\frac {240 \, a^{3} d x \cos \left (d x + c\right )^{6} - 1440 \, a^{3} \cos \left (d x + c\right )^{7} - 720 \, a^{3} d x \cos \left (d x + c\right )^{4} + 5610 \, a^{3} \cos \left (d x + c\right )^{5} + 720 \, a^{3} d x \cos \left (d x + c\right )^{2} - 6800 \, a^{3} \cos \left (d x + c\right )^{3} - 240 \, a^{3} d x + 2550 \, a^{3} \cos \left (d x + c\right ) + 1275 \, {\left (a^{3} \cos \left (d x + c\right )^{6} - 3 \, a^{3} \cos \left (d x + c\right )^{4} + 3 \, 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 ) - 1275 \, {\left (a^{3} \cos \left (d x + c\right )^{6} - 3 \, a^{3} \cos \left (d x + c\right )^{4} + 3 \, 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 ) - 16 \, {\left (15 \, a^{3} \cos \left (d x + c\right )^{7} + 23 \, a^{3} \cos \left (d x + c\right )^{5} - 35 \, a^{3} \cos \left (d x + c\right )^{3} + 15 \, a^{3} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{480 \, {\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)^6*csc(d*x+c)*(a+a*sin(d*x+c))^3,x, algorithm="fricas" 
)
 

Output:

-1/480*(240*a^3*d*x*cos(d*x + c)^6 - 1440*a^3*cos(d*x + c)^7 - 720*a^3*d*x 
*cos(d*x + c)^4 + 5610*a^3*cos(d*x + c)^5 + 720*a^3*d*x*cos(d*x + c)^2 - 6 
800*a^3*cos(d*x + c)^3 - 240*a^3*d*x + 2550*a^3*cos(d*x + c) + 1275*(a^3*c 
os(d*x + c)^6 - 3*a^3*cos(d*x + c)^4 + 3*a^3*cos(d*x + c)^2 - a^3)*log(1/2 
*cos(d*x + c) + 1/2) - 1275*(a^3*cos(d*x + c)^6 - 3*a^3*cos(d*x + c)^4 + 3 
*a^3*cos(d*x + c)^2 - a^3)*log(-1/2*cos(d*x + c) + 1/2) - 16*(15*a^3*cos(d 
*x + c)^7 + 23*a^3*cos(d*x + c)^5 - 35*a^3*cos(d*x + c)^3 + 15*a^3*cos(d*x 
 + c))*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 ^6(c+d x) \csc (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)*(a+a*sin(d*x+c))**3,x)
 

Output:

Timed out
 

Maxima [A] (verification not implemented)

Time = 0.13 (sec) , antiderivative size = 275, normalized size of antiderivative = 1.51 \[ \int \cot ^6(c+d x) \csc (c+d x) (a+a \sin (c+d x))^3 \, dx=\frac {80 \, {\left (15 \, d x + 15 \, c + \frac {15 \, \tan \left (d x + c\right )^{4} + 10 \, \tan \left (d x + c\right )^{2} - 2}{\tan \left (d x + c\right )^{5} + \tan \left (d x + c\right )^{3}}\right )} a^{3} - 96 \, {\left (15 \, d x + 15 \, c + \frac {15 \, \tan \left (d x + c\right )^{4} - 5 \, \tan \left (d x + c\right )^{2} + 3}{\tan \left (d x + c\right )^{5}}\right )} a^{3} + 5 \, 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 )} - 90 \, a^{3} {\left (\frac {2 \, {\left (9 \, \cos \left (d x + c\right )^{3} - 7 \, \cos \left (d x + c\right )\right )}}{\cos \left (d x + c\right )^{4} - 2 \, \cos \left (d x + c\right )^{2} + 1} - 16 \, \cos \left (d x + c\right ) + 15 \, \log \left (\cos \left (d x + c\right ) + 1\right ) - 15 \, \log \left (\cos \left (d x + c\right ) - 1\right )\right )}}{480 \, d} \] Input:

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

Output:

1/480*(80*(15*d*x + 15*c + (15*tan(d*x + c)^4 + 10*tan(d*x + c)^2 - 2)/(ta 
n(d*x + c)^5 + tan(d*x + c)^3))*a^3 - 96*(15*d*x + 15*c + (15*tan(d*x + c) 
^4 - 5*tan(d*x + c)^2 + 3)/tan(d*x + c)^5)*a^3 + 5*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)) - 90*a^3*(2*(9*cos(d*x + c)^3 - 7*cos(d*x + c))/(cos(d*x + c)^4 - 
2*cos(d*x + c)^2 + 1) - 16*cos(d*x + c) + 15*log(cos(d*x + c) + 1) - 15*lo 
g(cos(d*x + c) - 1)))/d
 

Giac [A] (verification not implemented)

Time = 0.26 (sec) , antiderivative size = 307, normalized size of antiderivative = 1.69 \[ \int \cot ^6(c+d x) \csc (c+d x) (a+a \sin (c+d x))^3 \, dx=\frac {5 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} + 36 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 45 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 340 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 1215 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 960 \, {\left (d x + c\right )} a^{3} + 10200 \, a^{3} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right ) + 1800 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \frac {1920 \, {\left (a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 6 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 6 \, a^{3}\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{2}} - \frac {24990 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} + 1800 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 1215 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 340 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 45 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 36 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 5 \, a^{3}}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6}}}{1920 \, d} \] Input:

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

Output:

1/1920*(5*a^3*tan(1/2*d*x + 1/2*c)^6 + 36*a^3*tan(1/2*d*x + 1/2*c)^5 + 45* 
a^3*tan(1/2*d*x + 1/2*c)^4 - 340*a^3*tan(1/2*d*x + 1/2*c)^3 - 1215*a^3*tan 
(1/2*d*x + 1/2*c)^2 - 960*(d*x + c)*a^3 + 10200*a^3*log(abs(tan(1/2*d*x + 
1/2*c))) + 1800*a^3*tan(1/2*d*x + 1/2*c) - 1920*(a^3*tan(1/2*d*x + 1/2*c)^ 
3 - 6*a^3*tan(1/2*d*x + 1/2*c)^2 - a^3*tan(1/2*d*x + 1/2*c) - 6*a^3)/(tan( 
1/2*d*x + 1/2*c)^2 + 1)^2 - (24990*a^3*tan(1/2*d*x + 1/2*c)^6 + 1800*a^3*t 
an(1/2*d*x + 1/2*c)^5 - 1215*a^3*tan(1/2*d*x + 1/2*c)^4 - 340*a^3*tan(1/2* 
d*x + 1/2*c)^3 + 45*a^3*tan(1/2*d*x + 1/2*c)^2 + 36*a^3*tan(1/2*d*x + 1/2* 
c) + 5*a^3)/tan(1/2*d*x + 1/2*c)^6)/d
 

Mupad [B] (verification not implemented)

Time = 33.38 (sec) , antiderivative size = 396, normalized size of antiderivative = 2.18 \[ \int \cot ^6(c+d x) \csc (c+d x) (a+a \sin (c+d x))^3 \, dx=\frac {3\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{128\,d}-\frac {17\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{96\,d}-\frac {81\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{128\,d}+\frac {3\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{160\,d}+\frac {a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6}{384\,d}+\frac {85\,a^3\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{16\,d}+\frac {a^3\,\mathrm {atan}\left (\frac {a^6}{\frac {85\,a^6}{8}+a^6\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}-\frac {85\,a^6\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{8\,\left (\frac {85\,a^6}{8}+a^6\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}\right )}{d}-\frac {124\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9-\frac {849\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8}{2}+\frac {134\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7}{3}-\frac {927\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6}{2}+\frac {578\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{15}-\frac {112\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{3}-\frac {134\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{15}+\frac {11\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{6}+\frac {6\,a^3\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{5}+\frac {a^3}{6}}{d\,\left (64\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}+128\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8+64\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\right )}+\frac {15\,a^3\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{16\,d} \] Input:

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

Output:

(3*a^3*tan(c/2 + (d*x)/2)^4)/(128*d) - (17*a^3*tan(c/2 + (d*x)/2)^3)/(96*d 
) - (81*a^3*tan(c/2 + (d*x)/2)^2)/(128*d) + (3*a^3*tan(c/2 + (d*x)/2)^5)/( 
160*d) + (a^3*tan(c/2 + (d*x)/2)^6)/(384*d) + (85*a^3*log(tan(c/2 + (d*x)/ 
2)))/(16*d) + (a^3*atan(a^6/((85*a^6)/8 + a^6*tan(c/2 + (d*x)/2)) - (85*a^ 
6*tan(c/2 + (d*x)/2))/(8*((85*a^6)/8 + a^6*tan(c/2 + (d*x)/2)))))/d - ((11 
*a^3*tan(c/2 + (d*x)/2)^2)/6 - (134*a^3*tan(c/2 + (d*x)/2)^3)/15 - (112*a^ 
3*tan(c/2 + (d*x)/2)^4)/3 + (578*a^3*tan(c/2 + (d*x)/2)^5)/15 - (927*a^3*t 
an(c/2 + (d*x)/2)^6)/2 + (134*a^3*tan(c/2 + (d*x)/2)^7)/3 - (849*a^3*tan(c 
/2 + (d*x)/2)^8)/2 + 124*a^3*tan(c/2 + (d*x)/2)^9 + a^3/6 + (6*a^3*tan(c/2 
 + (d*x)/2))/5)/(d*(64*tan(c/2 + (d*x)/2)^6 + 128*tan(c/2 + (d*x)/2)^8 + 6 
4*tan(c/2 + (d*x)/2)^10)) + (15*a^3*tan(c/2 + (d*x)/2))/(16*d)
 

Reduce [B] (verification not implemented)

Time = 0.18 (sec) , antiderivative size = 177, normalized size of antiderivative = 0.97 \[ \int \cot ^6(c+d x) \csc (c+d x) (a+a \sin (c+d x))^3 \, dx=\frac {a^{3} \left (960 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{7}+5760 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{6}-4352 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{5}+5160 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{4}+3584 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{3}-400 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{2}-1152 \cos \left (d x +c \right ) \sin \left (d x +c \right )-320 \cos \left (d x +c \right )+10200 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \sin \left (d x +c \right )^{6}-960 \sin \left (d x +c \right )^{6} d x -8145 \sin \left (d x +c \right )^{6}\right )}{1920 \sin \left (d x +c \right )^{6} d} \] Input:

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

Output:

(a**3*(960*cos(c + d*x)*sin(c + d*x)**7 + 5760*cos(c + d*x)*sin(c + d*x)** 
6 - 4352*cos(c + d*x)*sin(c + d*x)**5 + 5160*cos(c + d*x)*sin(c + d*x)**4 
+ 3584*cos(c + d*x)*sin(c + d*x)**3 - 400*cos(c + d*x)*sin(c + d*x)**2 - 1 
152*cos(c + d*x)*sin(c + d*x) - 320*cos(c + d*x) + 10200*log(tan((c + d*x) 
/2))*sin(c + d*x)**6 - 960*sin(c + d*x)**6*d*x - 8145*sin(c + d*x)**6))/(1 
920*sin(c + d*x)**6*d)