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

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 = 29, antiderivative size = 131 \[ \int \cos ^2(c+d x) \cot ^2(c+d x) (a+a \sin (c+d x))^3 \, dx=-\frac {3 a^3 x}{8}-\frac {3 a^3 \text {arctanh}(\cos (c+d x))}{d}+\frac {3 a^3 \cos (c+d x)}{d}+\frac {a^3 \cos ^3(c+d x)}{d}-\frac {a^3 \cos ^5(c+d x)}{5 d}-\frac {a^3 \cot (c+d x)}{d}+\frac {11 a^3 \cos (c+d x) \sin (c+d x)}{8 d}-\frac {3 a^3 \cos (c+d x) \sin ^3(c+d x)}{4 d} \] Output:

-3/8*a^3*x-3*a^3*arctanh(cos(d*x+c))/d+3*a^3*cos(d*x+c)/d+a^3*cos(d*x+c)^3 
/d-1/5*a^3*cos(d*x+c)^5/d-a^3*cot(d*x+c)/d+11/8*a^3*cos(d*x+c)*sin(d*x+c)/ 
d-3/4*a^3*cos(d*x+c)*sin(d*x+c)^3/d
 

Mathematica [A] (verified)

Time = 6.96 (sec) , antiderivative size = 148, normalized size of antiderivative = 1.13 \[ \int \cos ^2(c+d x) \cot ^2(c+d x) (a+a \sin (c+d x))^3 \, dx=\frac {(a+a \sin (c+d x))^3 \left (-60 (c+d x)+580 \cos (c+d x)+30 \cos (3 (c+d x))-2 \cos (5 (c+d x))-80 \cot \left (\frac {1}{2} (c+d x)\right )-480 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )+480 \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )+80 \sin (2 (c+d x))+15 \sin (4 (c+d x))+80 \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 )^6} \] Input:

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

Output:

((a + a*Sin[c + d*x])^3*(-60*(c + d*x) + 580*Cos[c + d*x] + 30*Cos[3*(c + 
d*x)] - 2*Cos[5*(c + d*x)] - 80*Cot[(c + d*x)/2] - 480*Log[Cos[(c + d*x)/2 
]] + 480*Log[Sin[(c + d*x)/2]] + 80*Sin[2*(c + d*x)] + 15*Sin[4*(c + d*x)] 
 + 80*Tan[(c + d*x)/2]))/(160*d*(Cos[(c + d*x)/2] + Sin[(c + d*x)/2])^6)
 

Rubi [A] (verified)

Time = 0.46 (sec) , antiderivative size = 135, 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.103, 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 ^2(c+d x) \cot ^2(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)^2}dx\)

\(\Big \downarrow \) 3351

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

\(\Big \downarrow \) 2009

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

Input:

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

Output:

((-3*a^7*x)/8 - (3*a^7*ArcTanh[Cos[c + d*x]])/d + (3*a^7*Cos[c + d*x])/d + 
 (a^7*Cos[c + d*x]^3)/d - (a^7*Cos[c + d*x]^5)/(5*d) - (a^7*Cot[c + d*x])/ 
d + (11*a^7*Cos[c + d*x]*Sin[c + d*x])/(8*d) - (3*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 = 6.66 (sec) , antiderivative size = 150, normalized size of antiderivative = 1.15

method result size
derivativedivides \(\frac {-\frac {a^{3} \cos \left (d x +c \right )^{5}}{5}+3 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 )+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 )}{d}\) \(150\)
default \(\frac {-\frac {a^{3} \cos \left (d x +c \right )^{5}}{5}+3 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 )+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 )}{d}\) \(150\)
risch \(-\frac {3 a^{3} x}{8}-\frac {i a^{3} {\mathrm e}^{2 i \left (d x +c \right )}}{4 d}+\frac {29 a^{3} {\mathrm e}^{i \left (d x +c \right )}}{16 d}+\frac {29 a^{3} {\mathrm e}^{-i \left (d x +c \right )}}{16 d}+\frac {i a^{3} {\mathrm e}^{-2 i \left (d x +c \right )}}{4 d}-\frac {2 i a^{3}}{d \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )}+\frac {3 a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{d}-\frac {3 a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{d}-\frac {a^{3} \cos \left (5 d x +5 c \right )}{80 d}+\frac {3 a^{3} \sin \left (4 d x +4 c \right )}{32 d}+\frac {3 a^{3} \cos \left (3 d x +3 c \right )}{16 d}\) \(191\)

Input:

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

Output:

1/d*(-1/5*a^3*cos(d*x+c)^5+3*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)))+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))
 

Fricas [A] (verification not implemented)

Time = 0.11 (sec) , antiderivative size = 147, normalized size of antiderivative = 1.12 \[ \int \cos ^2(c+d x) \cot ^2(c+d x) (a+a \sin (c+d x))^3 \, dx=-\frac {30 \, a^{3} \cos \left (d x + c\right )^{5} - 5 \, a^{3} \cos \left (d x + c\right )^{3} + 60 \, a^{3} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) \sin \left (d x + c\right ) - 60 \, a^{3} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) \sin \left (d x + c\right ) + 15 \, a^{3} \cos \left (d x + c\right ) + {\left (8 \, a^{3} \cos \left (d x + c\right )^{5} - 40 \, a^{3} \cos \left (d x + c\right )^{3} + 15 \, a^{3} d x - 120 \, a^{3} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{40 \, d \sin \left (d x + c\right )} \] Input:

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

Output:

-1/40*(30*a^3*cos(d*x + c)^5 - 5*a^3*cos(d*x + c)^3 + 60*a^3*log(1/2*cos(d 
*x + c) + 1/2)*sin(d*x + c) - 60*a^3*log(-1/2*cos(d*x + c) + 1/2)*sin(d*x 
+ c) + 15*a^3*cos(d*x + c) + (8*a^3*cos(d*x + c)^5 - 40*a^3*cos(d*x + c)^3 
 + 15*a^3*d*x - 120*a^3*cos(d*x + c))*sin(d*x + c))/(d*sin(d*x + c))
 

Sympy [F]

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

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

Output:

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

Maxima [A] (verification not implemented)

Time = 0.11 (sec) , antiderivative size = 141, normalized size of antiderivative = 1.08 \[ \int \cos ^2(c+d x) \cot ^2(c+d x) (a+a \sin (c+d x))^3 \, dx=-\frac {32 \, a^{3} \cos \left (d x + c\right )^{5} - 80 \, {\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} - 15 \, {\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} + 80 \, {\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}}{160 \, d} \] Input:

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

Output:

-1/160*(32*a^3*cos(d*x + c)^5 - 80*(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 - 15*(12*d*x + 12*c + 
 sin(4*d*x + 4*c) + 8*sin(2*d*x + 2*c))*a^3 + 80*(3*d*x + 3*c + (3*tan(d*x 
 + c)^2 + 2)/(tan(d*x + c)^3 + tan(d*x + c)))*a^3)/d
 

Giac [A] (verification not implemented)

Time = 0.21 (sec) , antiderivative size = 226, normalized size of antiderivative = 1.73 \[ \int \cos ^2(c+d x) \cot ^2(c+d x) (a+a \sin (c+d x))^3 \, dx=-\frac {15 \, {\left (d x + c\right )} a^{3} - 120 \, a^{3} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right ) - 20 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + \frac {20 \, {\left (6 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + a^{3}\right )}}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )} + \frac {2 \, {\left (55 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} - 200 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{8} - 10 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 720 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} - 800 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 10 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 560 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 55 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 152 \, a^{3}\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{5}}}{40 \, d} \] Input:

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

Output:

-1/40*(15*(d*x + c)*a^3 - 120*a^3*log(abs(tan(1/2*d*x + 1/2*c))) - 20*a^3* 
tan(1/2*d*x + 1/2*c) + 20*(6*a^3*tan(1/2*d*x + 1/2*c) + a^3)/tan(1/2*d*x + 
 1/2*c) + 2*(55*a^3*tan(1/2*d*x + 1/2*c)^9 - 200*a^3*tan(1/2*d*x + 1/2*c)^ 
8 - 10*a^3*tan(1/2*d*x + 1/2*c)^7 - 720*a^3*tan(1/2*d*x + 1/2*c)^6 - 800*a 
^3*tan(1/2*d*x + 1/2*c)^4 + 10*a^3*tan(1/2*d*x + 1/2*c)^3 - 560*a^3*tan(1/ 
2*d*x + 1/2*c)^2 - 55*a^3*tan(1/2*d*x + 1/2*c) - 152*a^3)/(tan(1/2*d*x + 1 
/2*c)^2 + 1)^5)/d
 

Mupad [B] (verification not implemented)

Time = 17.83 (sec) , antiderivative size = 356, normalized size of antiderivative = 2.72 \[ \int \cos ^2(c+d x) \cot ^2(c+d x) (a+a \sin (c+d x))^3 \, dx=\frac {3\,a^3\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{d}+\frac {-\frac {13\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}}{2}+20\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9-4\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8+72\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7-10\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+80\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5-11\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+56\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+\frac {a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{2}+\frac {76\,a^3\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{5}-a^3}{d\,\left (2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{11}+10\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9+20\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7+20\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+10\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}+\frac {3\,a^3\,\mathrm {atan}\left (\frac {9\,a^6}{16\,\left (\frac {9\,a^6}{2}+\frac {9\,a^6\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{16}\right )}-\frac {9\,a^6\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2\,\left (\frac {9\,a^6}{2}+\frac {9\,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 )}{2\,d} \] Input:

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

Output:

(3*a^3*log(tan(c/2 + (d*x)/2)))/d + ((a^3*tan(c/2 + (d*x)/2)^2)/2 + 56*a^3 
*tan(c/2 + (d*x)/2)^3 - 11*a^3*tan(c/2 + (d*x)/2)^4 + 80*a^3*tan(c/2 + (d* 
x)/2)^5 - 10*a^3*tan(c/2 + (d*x)/2)^6 + 72*a^3*tan(c/2 + (d*x)/2)^7 - 4*a^ 
3*tan(c/2 + (d*x)/2)^8 + 20*a^3*tan(c/2 + (d*x)/2)^9 - (13*a^3*tan(c/2 + ( 
d*x)/2)^10)/2 - a^3 + (76*a^3*tan(c/2 + (d*x)/2))/5)/(d*(2*tan(c/2 + (d*x) 
/2) + 10*tan(c/2 + (d*x)/2)^3 + 20*tan(c/2 + (d*x)/2)^5 + 20*tan(c/2 + (d* 
x)/2)^7 + 10*tan(c/2 + (d*x)/2)^9 + 2*tan(c/2 + (d*x)/2)^11)) + (3*a^3*ata 
n((9*a^6)/(16*((9*a^6)/2 + (9*a^6*tan(c/2 + (d*x)/2))/16)) - (9*a^6*tan(c/ 
2 + (d*x)/2))/(2*((9*a^6)/2 + (9*a^6*tan(c/2 + (d*x)/2))/16))))/(4*d) + (a 
^3*tan(c/2 + (d*x)/2))/(2*d)
 

Reduce [B] (verification not implemented)

Time = 0.17 (sec) , antiderivative size = 139, normalized size of antiderivative = 1.06 \[ \int \cos ^2(c+d x) \cot ^2(c+d x) (a+a \sin (c+d x))^3 \, dx=\frac {a^{3} \left (-8 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{5}-30 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{4}-24 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{3}+55 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{2}+152 \cos \left (d x +c \right ) \sin \left (d x +c \right )-40 \cos \left (d x +c \right )+120 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \sin \left (d x +c \right )-15 \sin \left (d x +c \right ) d x -152 \sin \left (d x +c \right )\right )}{40 \sin \left (d x +c \right ) d} \] Input:

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

Output:

(a**3*( - 8*cos(c + d*x)*sin(c + d*x)**5 - 30*cos(c + d*x)*sin(c + d*x)**4 
 - 24*cos(c + d*x)*sin(c + d*x)**3 + 55*cos(c + d*x)*sin(c + d*x)**2 + 152 
*cos(c + d*x)*sin(c + d*x) - 40*cos(c + d*x) + 120*log(tan((c + d*x)/2))*s 
in(c + d*x) - 15*sin(c + d*x)*d*x - 152*sin(c + d*x)))/(40*sin(c + d*x)*d)