\(\int \cos (c+d x) \cot ^3(c+d x) (a+a \sin (c+d x))^3 \, dx\) [398]

Optimal result
Mathematica [A] (verified)
Rubi [A] (verified)
Maple [A] (verified)
Fricas [A] (verification not implemented)
Sympy [F]
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 = 137 \[ \int \cos (c+d x) \cot ^3(c+d x) (a+a \sin (c+d x))^3 \, dx=-\frac {33 a^3 x}{8}-\frac {3 a^3 \text {arctanh}(\cos (c+d x))}{2 d}+\frac {2 a^3 \cos (c+d x)}{d}+\frac {a^3 \cos ^3(c+d x)}{d}-\frac {3 a^3 \cot (c+d x)}{d}-\frac {a^3 \cot (c+d x) \csc (c+d x)}{2 d}-\frac {7 a^3 \cos (c+d x) \sin (c+d x)}{8 d}-\frac {a^3 \cos (c+d x) \sin ^3(c+d x)}{4 d} \] Output:

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

Mathematica [A] (verified)

Time = 7.40 (sec) , antiderivative size = 164, normalized size of antiderivative = 1.20 \[ \int \cos (c+d x) \cot ^3(c+d x) (a+a \sin (c+d x))^3 \, dx=\frac {(a+a \sin (c+d x))^3 \left (-132 (c+d x)+88 \cos (c+d x)+8 \cos (3 (c+d x))-48 \cot \left (\frac {1}{2} (c+d x)\right )-4 \csc ^2\left (\frac {1}{2} (c+d x)\right )-48 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )+48 \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )+4 \sec ^2\left (\frac {1}{2} (c+d x)\right )-16 \sin (2 (c+d x))+\sin (4 (c+d x))+48 \tan \left (\frac {1}{2} (c+d x)\right )\right )}{32 d \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )^6} \] Input:

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

Output:

((a + a*Sin[c + d*x])^3*(-132*(c + d*x) + 88*Cos[c + d*x] + 8*Cos[3*(c + d 
*x)] - 48*Cot[(c + d*x)/2] - 4*Csc[(c + d*x)/2]^2 - 48*Log[Cos[(c + d*x)/2 
]] + 48*Log[Sin[(c + d*x)/2]] + 4*Sec[(c + d*x)/2]^2 - 16*Sin[2*(c + d*x)] 
 + Sin[4*(c + d*x)] + 48*Tan[(c + d*x)/2]))/(32*d*(Cos[(c + d*x)/2] + Sin[ 
(c + d*x)/2])^6)
 

Rubi [A] (verified)

Time = 0.42 (sec) , antiderivative size = 141, 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.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 \cos (c+d x) \cot ^3(c+d x) (a \sin (c+d x)+a)^3 \, dx\)

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3351

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

\(\Big \downarrow \) 2009

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

Input:

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

Output:

((-33*a^7*x)/8 - (3*a^7*ArcTanh[Cos[c + d*x]])/(2*d) + (2*a^7*Cos[c + d*x] 
)/d + (a^7*Cos[c + d*x]^3)/d - (3*a^7*Cot[c + d*x])/d - (a^7*Cot[c + d*x]* 
Csc[c + d*x])/(2*d) - (7*a^7*Cos[c + d*x]*Sin[c + d*x])/(8*d) - (a^7*Cos[c 
 + d*x]*Sin[c + d*x]^3)/(4*d))/a^4
 

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 [A] (verified)

Time = 3.49 (sec) , antiderivative size = 196, normalized size of antiderivative = 1.43

method result size
derivativedivides \(\frac {a^{3} \left (\frac {\left (\cos \left (d x +c \right )^{3}+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )+3 a^{3} \left (\frac {\cos \left (d x +c \right )^{3}}{3}+\cos \left (d x +c \right )+\ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )\right )+3 a^{3} \left (-\frac {\cos \left (d x +c \right )^{5}}{\sin \left (d x +c \right )}-\left (\cos \left (d x +c \right )^{3}+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )-\frac {3 d x}{2}-\frac {3 c}{2}\right )+a^{3} \left (-\frac {\cos \left (d x +c \right )^{5}}{2 \sin \left (d x +c \right )^{2}}-\frac {\cos \left (d x +c \right )^{3}}{2}-\frac {3 \cos \left (d x +c \right )}{2}-\frac {3 \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{2}\right )}{d}\) \(196\)
default \(\frac {a^{3} \left (\frac {\left (\cos \left (d x +c \right )^{3}+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )+3 a^{3} \left (\frac {\cos \left (d x +c \right )^{3}}{3}+\cos \left (d x +c \right )+\ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )\right )+3 a^{3} \left (-\frac {\cos \left (d x +c \right )^{5}}{\sin \left (d x +c \right )}-\left (\cos \left (d x +c \right )^{3}+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )-\frac {3 d x}{2}-\frac {3 c}{2}\right )+a^{3} \left (-\frac {\cos \left (d x +c \right )^{5}}{2 \sin \left (d x +c \right )^{2}}-\frac {\cos \left (d x +c \right )^{3}}{2}-\frac {3 \cos \left (d x +c \right )}{2}-\frac {3 \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{2}\right )}{d}\) \(196\)
risch \(-\frac {33 a^{3} x}{8}+\frac {a^{3} {\mathrm e}^{3 i \left (d x +c \right )}}{8 d}+\frac {i a^{3} {\mathrm e}^{2 i \left (d x +c \right )}}{4 d}+\frac {11 a^{3} {\mathrm e}^{i \left (d x +c \right )}}{8 d}+\frac {11 a^{3} {\mathrm e}^{-i \left (d x +c \right )}}{8 d}-\frac {i a^{3} {\mathrm e}^{-2 i \left (d x +c \right )}}{4 d}+\frac {a^{3} {\mathrm e}^{-3 i \left (d x +c \right )}}{8 d}+\frac {a^{3} \left ({\mathrm e}^{3 i \left (d x +c \right )}+{\mathrm e}^{i \left (d x +c \right )}-6 i {\mathrm e}^{2 i \left (d x +c \right )}+6 i\right )}{d \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{2}}+\frac {3 a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{2 d}-\frac {3 a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{2 d}+\frac {a^{3} \sin \left (4 d x +4 c \right )}{32 d}\) \(222\)

Input:

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

Output:

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

Fricas [A] (verification not implemented)

Time = 0.10 (sec) , antiderivative size = 185, normalized size of antiderivative = 1.35 \[ \int \cos (c+d x) \cot ^3(c+d x) (a+a \sin (c+d x))^3 \, dx=\frac {8 \, a^{3} \cos \left (d x + c\right )^{5} - 33 \, a^{3} d x \cos \left (d x + c\right )^{2} + 8 \, a^{3} \cos \left (d x + c\right )^{3} + 33 \, a^{3} d x - 12 \, a^{3} \cos \left (d x + c\right ) - 6 \, {\left (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 ) + 6 \, {\left (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 ) + {\left (2 \, a^{3} \cos \left (d x + c\right )^{5} - 11 \, a^{3} \cos \left (d x + c\right )^{3} + 33 \, a^{3} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{8 \, {\left (d \cos \left (d x + c\right )^{2} - d\right )}} \] Input:

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

Output:

1/8*(8*a^3*cos(d*x + c)^5 - 33*a^3*d*x*cos(d*x + c)^2 + 8*a^3*cos(d*x + c) 
^3 + 33*a^3*d*x - 12*a^3*cos(d*x + c) - 6*(a^3*cos(d*x + c)^2 - a^3)*log(1 
/2*cos(d*x + c) + 1/2) + 6*(a^3*cos(d*x + c)^2 - a^3)*log(-1/2*cos(d*x + c 
) + 1/2) + (2*a^3*cos(d*x + c)^5 - 11*a^3*cos(d*x + c)^3 + 33*a^3*cos(d*x 
+ c))*sin(d*x + c))/(d*cos(d*x + c)^2 - d)
 

Sympy [F]

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

integrate(cos(d*x+c)*cot(d*x+c)**3*(a+a*sin(d*x+c))**3,x)
 

Output:

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

Maxima [A] (verification not implemented)

Time = 0.11 (sec) , antiderivative size = 183, normalized size of antiderivative = 1.34 \[ \int \cos (c+d x) \cot ^3(c+d x) (a+a \sin (c+d x))^3 \, dx=\frac {16 \, {\left (2 \, \cos \left (d x + c\right )^{3} + 6 \, \cos \left (d x + c\right ) - 3 \, \log \left (\cos \left (d x + c\right ) + 1\right ) + 3 \, \log \left (\cos \left (d x + c\right ) - 1\right )\right )} a^{3} + {\left (12 \, d x + 12 \, c + \sin \left (4 \, d x + 4 \, c\right ) + 8 \, \sin \left (2 \, d x + 2 \, c\right )\right )} a^{3} - 48 \, {\left (3 \, d x + 3 \, c + \frac {3 \, \tan \left (d x + c\right )^{2} + 2}{\tan \left (d x + c\right )^{3} + \tan \left (d x + c\right )}\right )} a^{3} + 8 \, a^{3} {\left (\frac {2 \, \cos \left (d x + c\right )}{\cos \left (d x + c\right )^{2} - 1} - 4 \, \cos \left (d x + c\right ) + 3 \, \log \left (\cos \left (d x + c\right ) + 1\right ) - 3 \, \log \left (\cos \left (d x + c\right ) - 1\right )\right )}}{32 \, d} \] Input:

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

Output:

1/32*(16*(2*cos(d*x + c)^3 + 6*cos(d*x + c) - 3*log(cos(d*x + c) + 1) + 3* 
log(cos(d*x + c) - 1))*a^3 + (12*d*x + 12*c + sin(4*d*x + 4*c) + 8*sin(2*d 
*x + 2*c))*a^3 - 48*(3*d*x + 3*c + (3*tan(d*x + c)^2 + 2)/(tan(d*x + c)^3 
+ tan(d*x + c)))*a^3 + 8*a^3*(2*cos(d*x + c)/(cos(d*x + c)^2 - 1) - 4*cos( 
d*x + c) + 3*log(cos(d*x + c) + 1) - 3*log(cos(d*x + c) - 1)))/d
 

Giac [A] (verification not implemented)

Time = 0.20 (sec) , antiderivative size = 241, normalized size of antiderivative = 1.76 \[ \int \cos (c+d x) \cot ^3(c+d x) (a+a \sin (c+d x))^3 \, dx=\frac {a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 33 \, {\left (d x + c\right )} a^{3} + 12 \, a^{3} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right ) + 12 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \frac {18 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 12 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + a^{3}}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2}} + \frac {2 \, {\left (7 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 40 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} + 15 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 72 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 15 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 56 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 7 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 24 \, a^{3}\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{4}}}{8 \, d} \] Input:

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

Output:

1/8*(a^3*tan(1/2*d*x + 1/2*c)^2 - 33*(d*x + c)*a^3 + 12*a^3*log(abs(tan(1/ 
2*d*x + 1/2*c))) + 12*a^3*tan(1/2*d*x + 1/2*c) - (18*a^3*tan(1/2*d*x + 1/2 
*c)^2 + 12*a^3*tan(1/2*d*x + 1/2*c) + a^3)/tan(1/2*d*x + 1/2*c)^2 + 2*(7*a 
^3*tan(1/2*d*x + 1/2*c)^7 + 40*a^3*tan(1/2*d*x + 1/2*c)^6 + 15*a^3*tan(1/2 
*d*x + 1/2*c)^5 + 72*a^3*tan(1/2*d*x + 1/2*c)^4 - 15*a^3*tan(1/2*d*x + 1/2 
*c)^3 + 56*a^3*tan(1/2*d*x + 1/2*c)^2 - 7*a^3*tan(1/2*d*x + 1/2*c) + 24*a^ 
3)/(tan(1/2*d*x + 1/2*c)^2 + 1)^4)/d
 

Mupad [B] (verification not implemented)

Time = 17.75 (sec) , antiderivative size = 347, normalized size of antiderivative = 2.53 \[ \int \cos (c+d x) \cot ^3(c+d x) (a+a \sin (c+d x))^3 \, dx=\frac {a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{8\,d}+\frac {3\,a^3\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{2\,d}+\frac {33\,a^3\,\mathrm {atan}\left (\frac {1089\,a^6}{16\,\left (\frac {99\,a^6}{4}+\frac {1089\,a^6\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{16}\right )}-\frac {99\,a^6\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{4\,\left (\frac {99\,a^6}{4}+\frac {1089\,a^6\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{16}\right )}\right )}{4\,d}+\frac {a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9+\frac {79\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8}{2}-9\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7+70\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6-51\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+53\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-31\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+22\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-6\,a^3\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-\frac {a^3}{2}}{d\,\left (4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}+16\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8+24\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+16\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\right )}+\frac {3\,a^3\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2\,d} \] Input:

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

Output:

(a^3*tan(c/2 + (d*x)/2)^2)/(8*d) + (3*a^3*log(tan(c/2 + (d*x)/2)))/(2*d) + 
 (33*a^3*atan((1089*a^6)/(16*((99*a^6)/4 + (1089*a^6*tan(c/2 + (d*x)/2))/1 
6)) - (99*a^6*tan(c/2 + (d*x)/2))/(4*((99*a^6)/4 + (1089*a^6*tan(c/2 + (d* 
x)/2))/16))))/(4*d) + (22*a^3*tan(c/2 + (d*x)/2)^2 - 31*a^3*tan(c/2 + (d*x 
)/2)^3 + 53*a^3*tan(c/2 + (d*x)/2)^4 - 51*a^3*tan(c/2 + (d*x)/2)^5 + 70*a^ 
3*tan(c/2 + (d*x)/2)^6 - 9*a^3*tan(c/2 + (d*x)/2)^7 + (79*a^3*tan(c/2 + (d 
*x)/2)^8)/2 + a^3*tan(c/2 + (d*x)/2)^9 - a^3/2 - 6*a^3*tan(c/2 + (d*x)/2)) 
/(d*(4*tan(c/2 + (d*x)/2)^2 + 16*tan(c/2 + (d*x)/2)^4 + 24*tan(c/2 + (d*x) 
/2)^6 + 16*tan(c/2 + (d*x)/2)^8 + 4*tan(c/2 + (d*x)/2)^10)) + (3*a^3*tan(c 
/2 + (d*x)/2))/(2*d)
 

Reduce [B] (verification not implemented)

Time = 0.18 (sec) , antiderivative size = 145, normalized size of antiderivative = 1.06 \[ \int \cos (c+d x) \cot ^3(c+d x) (a+a \sin (c+d x))^3 \, dx=\frac {a^{3} \left (-2 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{5}-8 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{4}-7 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{3}+24 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{2}-24 \cos \left (d x +c \right ) \sin \left (d x +c \right )-4 \cos \left (d x +c \right )+12 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \sin \left (d x +c \right )^{2}-33 \sin \left (d x +c \right )^{2} d x -20 \sin \left (d x +c \right )^{2}\right )}{8 \sin \left (d x +c \right )^{2} d} \] Input:

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

Output:

(a**3*( - 2*cos(c + d*x)*sin(c + d*x)**5 - 8*cos(c + d*x)*sin(c + d*x)**4 
- 7*cos(c + d*x)*sin(c + d*x)**3 + 24*cos(c + d*x)*sin(c + d*x)**2 - 24*co 
s(c + d*x)*sin(c + d*x) - 4*cos(c + d*x) + 12*log(tan((c + d*x)/2))*sin(c 
+ d*x)**2 - 33*sin(c + d*x)**2*d*x - 20*sin(c + d*x)**2))/(8*sin(c + d*x)* 
*2*d)