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

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

Optimal result

Integrand size = 21, antiderivative size = 139 \[ \int \cot ^6(c+d x) (a+a \sin (c+d x))^2 \, dx=\frac {3 a^2 x}{2}-\frac {15 a^2 \text {arctanh}(\cos (c+d x))}{4 d}+\frac {2 a^2 \cos (c+d x)}{d}+\frac {a^2 \cot (c+d x)}{d}-\frac {a^2 \cot ^5(c+d x)}{5 d}+\frac {9 a^2 \cot (c+d x) \csc (c+d x)}{4 d}-\frac {a^2 \cot (c+d x) \csc ^3(c+d x)}{2 d}+\frac {a^2 \cos (c+d x) \sin (c+d x)}{2 d} \] Output:

3/2*a^2*x-15/4*a^2*arctanh(cos(d*x+c))/d+2*a^2*cos(d*x+c)/d+a^2*cot(d*x+c) 
/d-1/5*a^2*cot(d*x+c)^5/d+9/4*a^2*cot(d*x+c)*csc(d*x+c)/d-1/2*a^2*cot(d*x+ 
c)*csc(d*x+c)^3/d+1/2*a^2*cos(d*x+c)*sin(d*x+c)/d
 

Mathematica [A] (verified)

Time = 7.31 (sec) , antiderivative size = 264, normalized size of antiderivative = 1.90 \[ \int \cot ^6(c+d x) (a+a \sin (c+d x))^2 \, dx=\frac {a^2 (1+\sin (c+d x))^2 \left (240 (c+d x)+320 \cos (c+d x)+64 \cot \left (\frac {1}{2} (c+d x)\right )+90 \csc ^2\left (\frac {1}{2} (c+d x)\right )-5 \csc ^4\left (\frac {1}{2} (c+d x)\right )-600 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )+600 \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )-90 \sec ^2\left (\frac {1}{2} (c+d x)\right )+5 \sec ^4\left (\frac {1}{2} (c+d x)\right )-56 \csc ^3(c+d x) \sin ^4\left (\frac {1}{2} (c+d x)\right )+\frac {7}{2} \csc ^4\left (\frac {1}{2} (c+d x)\right ) \sin (c+d x)-\frac {1}{2} \csc ^6\left (\frac {1}{2} (c+d x)\right ) \sin (c+d x)+40 \sin (2 (c+d x))-64 \tan \left (\frac {1}{2} (c+d x)\right )+\sec ^4\left (\frac {1}{2} (c+d x)\right ) \tan \left (\frac {1}{2} (c+d x)\right )\right )}{160 d \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )^4} \] Input:

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

Output:

(a^2*(1 + Sin[c + d*x])^2*(240*(c + d*x) + 320*Cos[c + d*x] + 64*Cot[(c + 
d*x)/2] + 90*Csc[(c + d*x)/2]^2 - 5*Csc[(c + d*x)/2]^4 - 600*Log[Cos[(c + 
d*x)/2]] + 600*Log[Sin[(c + d*x)/2]] - 90*Sec[(c + d*x)/2]^2 + 5*Sec[(c + 
d*x)/2]^4 - 56*Csc[c + d*x]^3*Sin[(c + d*x)/2]^4 + (7*Csc[(c + d*x)/2]^4*S 
in[c + d*x])/2 - (Csc[(c + d*x)/2]^6*Sin[c + d*x])/2 + 40*Sin[2*(c + d*x)] 
 - 64*Tan[(c + d*x)/2] + Sec[(c + d*x)/2]^4*Tan[(c + d*x)/2]))/(160*d*(Cos 
[(c + d*x)/2] + Sin[(c + d*x)/2])^4)
 

Rubi [A] (verified)

Time = 0.48 (sec) , antiderivative size = 143, normalized size of antiderivative = 1.03, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {3042, 3188, 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) (a \sin (c+d x)+a)^2 \, dx\)

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3188

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

\(\Big \downarrow \) 2009

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

Input:

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

Output:

((3*a^8*x)/2 - (15*a^8*ArcTanh[Cos[c + d*x]])/(4*d) + (2*a^8*Cos[c + d*x]) 
/d + (a^8*Cot[c + d*x])/d - (a^8*Cot[c + d*x]^5)/(5*d) + (9*a^8*Cot[c + d* 
x]*Csc[c + d*x])/(4*d) - (a^8*Cot[c + d*x]*Csc[c + d*x]^3)/(2*d) + (a^8*Co 
s[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 3188
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*tan[(e_.) + (f_.)*(x_)]^(p_ 
), x_Symbol] :> Simp[a^p   Int[ExpandIntegrand[Sin[e + f*x]^p*((a + b*Sin[e 
 + f*x])^(m - p/2)/(a - b*Sin[e + f*x])^(p/2)), x], x], x] /; FreeQ[{a, b, 
e, f}, x] && EqQ[a^2 - b^2, 0] && IntegersQ[m, p/2] && (LtQ[p, 0] || GtQ[m 
- p/2, 0])
 
Maple [A] (verified)

Time = 2.51 (sec) , antiderivative size = 217, normalized size of antiderivative = 1.56

method result size
derivativedivides \(\frac {a^{2} \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 )+2 a^{2} \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 )+a^{2} \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 )}{d}\) \(217\)
default \(\frac {a^{2} \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 )+2 a^{2} \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 )+a^{2} \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 )}{d}\) \(217\)
risch \(\frac {3 a^{2} x}{2}-\frac {i a^{2} {\mathrm e}^{2 i \left (d x +c \right )}}{8 d}+\frac {a^{2} {\mathrm e}^{i \left (d x +c \right )}}{d}+\frac {a^{2} {\mathrm e}^{-i \left (d x +c \right )}}{d}+\frac {i a^{2} {\mathrm e}^{-2 i \left (d x +c \right )}}{8 d}-\frac {a^{2} \left (45 \,{\mathrm e}^{9 i \left (d x +c \right )}+80 i {\mathrm e}^{6 i \left (d x +c \right )}-50 \,{\mathrm e}^{7 i \left (d x +c \right )}-80 i {\mathrm e}^{4 i \left (d x +c \right )}+80 i {\mathrm e}^{2 i \left (d x +c \right )}+50 \,{\mathrm e}^{3 i \left (d x +c \right )}-16 i-45 \,{\mathrm e}^{i \left (d x +c \right )}\right )}{10 d \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{5}}+\frac {15 a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{4 d}-\frac {15 a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{4 d}\) \(220\)

Input:

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

Output:

1/d*(a^2*(-1/3/sin(d*x+c)^3*cos(d*x+c)^7+4/3/sin(d*x+c)*cos(d*x+c)^7+4/3*( 
cos(d*x+c)^5+5/4*cos(d*x+c)^3+15/8*cos(d*x+c))*sin(d*x+c)+5/2*d*x+5/2*c)+2 
*a^2*(-1/4/sin(d*x+c)^4*cos(d*x+c)^7+3/8/sin(d*x+c)^2*cos(d*x+c)^7+3/8*cos 
(d*x+c)^5+5/8*cos(d*x+c)^3+15/8*cos(d*x+c)+15/8*ln(csc(d*x+c)-cot(d*x+c))) 
+a^2*(-1/5*cot(d*x+c)^5+1/3*cot(d*x+c)^3-cot(d*x+c)-d*x-c))
 

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 265 vs. \(2 (127) = 254\).

Time = 0.11 (sec) , antiderivative size = 265, normalized size of antiderivative = 1.91 \[ \int \cot ^6(c+d x) (a+a \sin (c+d x))^2 \, dx=-\frac {20 \, a^{2} \cos \left (d x + c\right )^{7} - 92 \, a^{2} \cos \left (d x + c\right )^{5} + 140 \, a^{2} \cos \left (d x + c\right )^{3} - 60 \, a^{2} \cos \left (d x + c\right ) + 75 \, {\left (a^{2} \cos \left (d x + c\right )^{4} - 2 \, a^{2} \cos \left (d x + c\right )^{2} + a^{2}\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) \sin \left (d x + c\right ) - 75 \, {\left (a^{2} \cos \left (d x + c\right )^{4} - 2 \, a^{2} \cos \left (d x + c\right )^{2} + a^{2}\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) \sin \left (d x + c\right ) - 10 \, {\left (6 \, a^{2} d x \cos \left (d x + c\right )^{4} + 8 \, a^{2} \cos \left (d x + c\right )^{5} - 12 \, a^{2} d x \cos \left (d x + c\right )^{2} - 25 \, a^{2} \cos \left (d x + c\right )^{3} + 6 \, a^{2} d x + 15 \, a^{2} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{40 \, {\left (d \cos \left (d x + c\right )^{4} - 2 \, d \cos \left (d x + c\right )^{2} + d\right )} \sin \left (d x + c\right )} \] Input:

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

Output:

-1/40*(20*a^2*cos(d*x + c)^7 - 92*a^2*cos(d*x + c)^5 + 140*a^2*cos(d*x + c 
)^3 - 60*a^2*cos(d*x + c) + 75*(a^2*cos(d*x + c)^4 - 2*a^2*cos(d*x + c)^2 
+ a^2)*log(1/2*cos(d*x + c) + 1/2)*sin(d*x + c) - 75*(a^2*cos(d*x + c)^4 - 
 2*a^2*cos(d*x + c)^2 + a^2)*log(-1/2*cos(d*x + c) + 1/2)*sin(d*x + c) - 1 
0*(6*a^2*d*x*cos(d*x + c)^4 + 8*a^2*cos(d*x + c)^5 - 12*a^2*d*x*cos(d*x + 
c)^2 - 25*a^2*cos(d*x + c)^3 + 6*a^2*d*x + 15*a^2*cos(d*x + c))*sin(d*x + 
c))/((d*cos(d*x + c)^4 - 2*d*cos(d*x + c)^2 + d)*sin(d*x + c))
 

Sympy [F]

\[ \int \cot ^6(c+d x) (a+a \sin (c+d x))^2 \, dx=a^{2} \left (\int 2 \sin {\left (c + d x \right )} \cot ^{6}{\left (c + d x \right )}\, dx + \int \sin ^{2}{\left (c + d x \right )} \cot ^{6}{\left (c + d x \right )}\, dx + \int \cot ^{6}{\left (c + d x \right )}\, dx\right ) \] Input:

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

Output:

a**2*(Integral(2*sin(c + d*x)*cot(c + d*x)**6, x) + Integral(sin(c + d*x)* 
*2*cot(c + d*x)**6, x) + Integral(cot(c + d*x)**6, x))
 

Maxima [A] (verification not implemented)

Time = 0.11 (sec) , antiderivative size = 184, normalized size of antiderivative = 1.32 \[ \int \cot ^6(c+d x) (a+a \sin (c+d x))^2 \, dx=\frac {20 \, {\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^{2} - 8 \, {\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^{2} - 15 \, a^{2} {\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 )}}{120 \, d} \] Input:

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

Output:

1/120*(20*(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^2 - 8*(15*d*x + 15*c + (15*tan(d*x + c)^ 
4 - 5*tan(d*x + c)^2 + 3)/tan(d*x + c)^5)*a^2 - 15*a^2*(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*log(cos(d*x + c) - 1)))/d
 

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 272 vs. \(2 (127) = 254\).

Time = 0.21 (sec) , antiderivative size = 272, normalized size of antiderivative = 1.96 \[ \int \cot ^6(c+d x) (a+a \sin (c+d x))^2 \, dx=\frac {a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 5 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 5 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 80 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 240 \, {\left (d x + c\right )} a^{2} + 600 \, a^{2} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right ) - 70 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \frac {160 \, {\left (a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 4 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 4 \, a^{2}\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{2}} - \frac {1370 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 70 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 80 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 5 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 5 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + a^{2}}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5}}}{160 \, d} \] Input:

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

Output:

1/160*(a^2*tan(1/2*d*x + 1/2*c)^5 + 5*a^2*tan(1/2*d*x + 1/2*c)^4 - 5*a^2*t 
an(1/2*d*x + 1/2*c)^3 - 80*a^2*tan(1/2*d*x + 1/2*c)^2 + 240*(d*x + c)*a^2 
+ 600*a^2*log(abs(tan(1/2*d*x + 1/2*c))) - 70*a^2*tan(1/2*d*x + 1/2*c) - 1 
60*(a^2*tan(1/2*d*x + 1/2*c)^3 - 4*a^2*tan(1/2*d*x + 1/2*c)^2 - a^2*tan(1/ 
2*d*x + 1/2*c) - 4*a^2)/(tan(1/2*d*x + 1/2*c)^2 + 1)^2 - (1370*a^2*tan(1/2 
*d*x + 1/2*c)^5 - 70*a^2*tan(1/2*d*x + 1/2*c)^4 - 80*a^2*tan(1/2*d*x + 1/2 
*c)^3 - 5*a^2*tan(1/2*d*x + 1/2*c)^2 + 5*a^2*tan(1/2*d*x + 1/2*c) + a^2)/t 
an(1/2*d*x + 1/2*c)^5)/d
 

Mupad [B] (verification not implemented)

Time = 33.17 (sec) , antiderivative size = 363, normalized size of antiderivative = 2.61 \[ \int \cot ^6(c+d x) (a+a \sin (c+d x))^2 \, dx=\frac {a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{32\,d}-\frac {a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{32\,d}-\frac {a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{2\,d}+\frac {a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{160\,d}+\frac {15\,a^2\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{4\,d}+\frac {-18\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8+144\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7+61\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+159\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+\frac {79\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{5}+14\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+\frac {3\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{5}-a^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-\frac {a^2}{5}}{d\,\left (32\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9+64\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7+32\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5\right )}+\frac {3\,a^2\,\mathrm {atan}\left (\frac {9\,a^4}{\frac {45\,a^4}{2}-9\,a^4\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}+\frac {45\,a^4\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2\,\left (\frac {45\,a^4}{2}-9\,a^4\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}\right )}{d}-\frac {7\,a^2\,\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))^2,x)
 

Output:

(a^2*tan(c/2 + (d*x)/2)^4)/(32*d) - (a^2*tan(c/2 + (d*x)/2)^3)/(32*d) - (a 
^2*tan(c/2 + (d*x)/2)^2)/(2*d) + (a^2*tan(c/2 + (d*x)/2)^5)/(160*d) + (15* 
a^2*log(tan(c/2 + (d*x)/2)))/(4*d) + ((3*a^2*tan(c/2 + (d*x)/2)^2)/5 + 14* 
a^2*tan(c/2 + (d*x)/2)^3 + (79*a^2*tan(c/2 + (d*x)/2)^4)/5 + 159*a^2*tan(c 
/2 + (d*x)/2)^5 + 61*a^2*tan(c/2 + (d*x)/2)^6 + 144*a^2*tan(c/2 + (d*x)/2) 
^7 - 18*a^2*tan(c/2 + (d*x)/2)^8 - a^2/5 - a^2*tan(c/2 + (d*x)/2))/(d*(32* 
tan(c/2 + (d*x)/2)^5 + 64*tan(c/2 + (d*x)/2)^7 + 32*tan(c/2 + (d*x)/2)^9)) 
 + (3*a^2*atan((9*a^4)/((45*a^4)/2 - 9*a^4*tan(c/2 + (d*x)/2)) + (45*a^4*t 
an(c/2 + (d*x)/2))/(2*((45*a^4)/2 - 9*a^4*tan(c/2 + (d*x)/2)))))/d - (7*a^ 
2*tan(c/2 + (d*x)/2))/(16*d)
 

Reduce [B] (verification not implemented)

Time = 0.16 (sec) , antiderivative size = 161, normalized size of antiderivative = 1.16 \[ \int \cot ^6(c+d x) (a+a \sin (c+d x))^2 \, dx=\frac {a^{2} \left (80 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{6}+320 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{5}+128 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{4}+360 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{3}+64 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{2}-80 \cos \left (d x +c \right ) \sin \left (d x +c \right )-32 \cos \left (d x +c \right )+600 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \sin \left (d x +c \right )^{5}+240 \sin \left (d x +c \right )^{5} d x -475 \sin \left (d x +c \right )^{5}\right )}{160 \sin \left (d x +c \right )^{5} d} \] Input:

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

Output:

(a**2*(80*cos(c + d*x)*sin(c + d*x)**6 + 320*cos(c + d*x)*sin(c + d*x)**5 
+ 128*cos(c + d*x)*sin(c + d*x)**4 + 360*cos(c + d*x)*sin(c + d*x)**3 + 64 
*cos(c + d*x)*sin(c + d*x)**2 - 80*cos(c + d*x)*sin(c + d*x) - 32*cos(c + 
d*x) + 600*log(tan((c + d*x)/2))*sin(c + d*x)**5 + 240*sin(c + d*x)**5*d*x 
 - 475*sin(c + d*x)**5))/(160*sin(c + d*x)**5*d)