\(\int \csc ^3(c+d x) \sec ^2(c+d x) (a+b \sin (c+d x))^3 \, dx\) [1458]

Optimal result
Mathematica [B] (verified)
Rubi [A] (verified)
Maple [A] (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 = 127 \[ \int \csc ^3(c+d x) \sec ^2(c+d x) (a+b \sin (c+d x))^3 \, dx=-\frac {3 a^3 \text {arctanh}(\cos (c+d x))}{2 d}-\frac {3 a b^2 \text {arctanh}(\cos (c+d x))}{d}-\frac {3 a^2 b \cot (c+d x)}{d}-\frac {a^3 \cot (c+d x) \csc (c+d x)}{2 d}+\frac {a^3 \sec (c+d x)}{d}+\frac {3 a b^2 \sec (c+d x)}{d}+\frac {3 a^2 b \tan (c+d x)}{d}+\frac {b^3 \tan (c+d x)}{d} \] Output:

-3/2*a^3*arctanh(cos(d*x+c))/d-3*a*b^2*arctanh(cos(d*x+c))/d-3*a^2*b*cot(d 
*x+c)/d-1/2*a^3*cot(d*x+c)*csc(d*x+c)/d+a^3*sec(d*x+c)/d+3*a*b^2*sec(d*x+c 
)/d+3*a^2*b*tan(d*x+c)/d+b^3*tan(d*x+c)/d
 

Mathematica [B] (verified)

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

Time = 1.93 (sec) , antiderivative size = 267, normalized size of antiderivative = 2.10 \[ \int \csc ^3(c+d x) \sec ^2(c+d x) (a+b \sin (c+d x))^3 \, dx=\frac {\csc ^4(c+d x) \left (2 a^3+12 a b^2-6 \left (a^3+2 a b^2\right ) \cos (2 (c+d x))+3 a^3 \cos (3 (c+d x)) \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )+6 a b^2 \cos (3 (c+d x)) \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )-3 a \left (a^2+2 b^2\right ) \cos (c+d x) \left (\log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )-\log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )\right )-3 a^3 \cos (3 (c+d x)) \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )-6 a b^2 \cos (3 (c+d x)) \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )+12 a^2 b \sin (c+d x)+6 b^3 \sin (c+d x)-12 a^2 b \sin (3 (c+d x))-2 b^3 \sin (3 (c+d x))\right )}{2 d \left (\csc ^2\left (\frac {1}{2} (c+d x)\right )-\sec ^2\left (\frac {1}{2} (c+d x)\right )\right )} \] Input:

Integrate[Csc[c + d*x]^3*Sec[c + d*x]^2*(a + b*Sin[c + d*x])^3,x]
 

Output:

(Csc[c + d*x]^4*(2*a^3 + 12*a*b^2 - 6*(a^3 + 2*a*b^2)*Cos[2*(c + d*x)] + 3 
*a^3*Cos[3*(c + d*x)]*Log[Cos[(c + d*x)/2]] + 6*a*b^2*Cos[3*(c + d*x)]*Log 
[Cos[(c + d*x)/2]] - 3*a*(a^2 + 2*b^2)*Cos[c + d*x]*(Log[Cos[(c + d*x)/2]] 
 - Log[Sin[(c + d*x)/2]]) - 3*a^3*Cos[3*(c + d*x)]*Log[Sin[(c + d*x)/2]] - 
 6*a*b^2*Cos[3*(c + d*x)]*Log[Sin[(c + d*x)/2]] + 12*a^2*b*Sin[c + d*x] + 
6*b^3*Sin[c + d*x] - 12*a^2*b*Sin[3*(c + d*x)] - 2*b^3*Sin[3*(c + d*x)]))/ 
(2*d*(Csc[(c + d*x)/2]^2 - Sec[(c + d*x)/2]^2))
 

Rubi [A] (verified)

Time = 0.45 (sec) , antiderivative size = 132, normalized size of antiderivative = 1.04, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.103, Rules used = {3042, 3391, 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 \csc ^3(c+d x) \sec ^2(c+d x) (a+b \sin (c+d x))^3 \, dx\)

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3391

\(\displaystyle \int \left (a^3 \csc ^3(c+d x) \sec ^2(c+d x)+3 a^2 b \csc ^2(c+d x) \sec ^2(c+d x)+3 a b^2 \csc (c+d x) \sec ^2(c+d x)+b^3 \sec ^2(c+d x)\right )dx\)

\(\Big \downarrow \) 2009

\(\displaystyle -\frac {3 a^3 \text {arctanh}(\cos (c+d x))}{2 d}+\frac {3 a^3 \sec (c+d x)}{2 d}-\frac {a^3 \csc ^2(c+d x) \sec (c+d x)}{2 d}+\frac {3 a^2 b \tan (c+d x)}{d}-\frac {3 a^2 b \cot (c+d x)}{d}-\frac {3 a b^2 \text {arctanh}(\cos (c+d x))}{d}+\frac {3 a b^2 \sec (c+d x)}{d}+\frac {b^3 \tan (c+d x)}{d}\)

Input:

Int[Csc[c + d*x]^3*Sec[c + d*x]^2*(a + b*Sin[c + d*x])^3,x]
 

Output:

(-3*a^3*ArcTanh[Cos[c + d*x]])/(2*d) - (3*a*b^2*ArcTanh[Cos[c + d*x]])/d - 
 (3*a^2*b*Cot[c + d*x])/d + (3*a^3*Sec[c + d*x])/(2*d) + (3*a*b^2*Sec[c + 
d*x])/d - (a^3*Csc[c + d*x]^2*Sec[c + d*x])/(2*d) + (3*a^2*b*Tan[c + d*x]) 
/d + (b^3*Tan[c + d*x])/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 3391
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] && NeQ[a^2 - b^2, 0] && IntegerQ[m] && (G 
tQ[m, 0] || IntegerQ[n])
 
Maple [A] (verified)

Time = 1.74 (sec) , antiderivative size = 130, normalized size of antiderivative = 1.02

method result size
derivativedivides \(\frac {a^{3} \left (-\frac {1}{2 \sin \left (d x +c \right )^{2} \cos \left (d x +c \right )}+\frac {3}{2 \cos \left (d x +c \right )}+\frac {3 \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{2}\right )+3 a^{2} b \left (\frac {1}{\sin \left (d x +c \right ) \cos \left (d x +c \right )}-2 \cot \left (d x +c \right )\right )+3 a \,b^{2} \left (\frac {1}{\cos \left (d x +c \right )}+\ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )\right )+b^{3} \tan \left (d x +c \right )}{d}\) \(130\)
default \(\frac {a^{3} \left (-\frac {1}{2 \sin \left (d x +c \right )^{2} \cos \left (d x +c \right )}+\frac {3}{2 \cos \left (d x +c \right )}+\frac {3 \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{2}\right )+3 a^{2} b \left (\frac {1}{\sin \left (d x +c \right ) \cos \left (d x +c \right )}-2 \cot \left (d x +c \right )\right )+3 a \,b^{2} \left (\frac {1}{\cos \left (d x +c \right )}+\ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )\right )+b^{3} \tan \left (d x +c \right )}{d}\) \(130\)
parallelrisch \(\frac {12 a \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) \left (a^{2}+2 b^{2}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4} a^{3}+12 b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3} a^{2}+\left (-72 a^{2} b -16 b^{3}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+a \left (\cot \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} a^{2}+12 \cot \left (\frac {d x}{2}+\frac {c}{2}\right ) a b -18 a^{2}-48 b^{2}\right )}{8 d \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-8 d}\) \(162\)
risch \(\frac {i \left (-3 i a^{3} {\mathrm e}^{5 i \left (d x +c \right )}-6 i a \,b^{2} {\mathrm e}^{5 i \left (d x +c \right )}+2 i a^{3} {\mathrm e}^{3 i \left (d x +c \right )}+12 i a \,b^{2} {\mathrm e}^{3 i \left (d x +c \right )}+2 b^{3} {\mathrm e}^{4 i \left (d x +c \right )}-3 i a^{3} {\mathrm e}^{i \left (d x +c \right )}-6 i a \,b^{2} {\mathrm e}^{i \left (d x +c \right )}-12 a^{2} b \,{\mathrm e}^{2 i \left (d x +c \right )}-4 b^{3} {\mathrm e}^{2 i \left (d x +c \right )}+12 a^{2} b +2 b^{3}\right )}{d \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{2} \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 )}{2 d}+\frac {3 a \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right ) b^{2}}{d}-\frac {3 a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{2 d}-\frac {3 a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right ) b^{2}}{d}\) \(264\)
norman \(\frac {\frac {a^{3}}{8 d}+\frac {a^{3} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{12}}{8 d}-\frac {\left (3 a^{3}+12 a \,b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}{2 d}-\frac {\left (21 a^{3}+48 a \,b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}}{8 d}-\frac {\left (45 a^{3}+144 a \,b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}}{8 d}-\frac {a \left (13 a^{2}+36 b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}}{2 d}+\frac {3 a^{2} b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 d}+\frac {3 a^{2} b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{11}}{2 d}-\frac {3 b \left (7 a^{2}+2 b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{d}-\frac {3 b \left (7 a^{2}+2 b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{d}-\frac {b \left (9 a^{2}+4 b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{2 d}-\frac {b \left (9 a^{2}+4 b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{9}}{2 d}}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right ) \left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{3}}+\frac {3 a \left (a^{2}+2 b^{2}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 d}\) \(359\)

Input:

int(csc(d*x+c)^3*sec(d*x+c)^2*(a+b*sin(d*x+c))^3,x,method=_RETURNVERBOSE)
 

Output:

1/d*(a^3*(-1/2/sin(d*x+c)^2/cos(d*x+c)+3/2/cos(d*x+c)+3/2*ln(csc(d*x+c)-co 
t(d*x+c)))+3*a^2*b*(1/sin(d*x+c)/cos(d*x+c)-2*cot(d*x+c))+3*a*b^2*(1/cos(d 
*x+c)+ln(csc(d*x+c)-cot(d*x+c)))+b^3*tan(d*x+c))
 

Fricas [A] (verification not implemented)

Time = 0.09 (sec) , antiderivative size = 196, normalized size of antiderivative = 1.54 \[ \int \csc ^3(c+d x) \sec ^2(c+d x) (a+b \sin (c+d x))^3 \, dx=-\frac {4 \, a^{3} + 12 \, a b^{2} - 6 \, {\left (a^{3} + 2 \, a b^{2}\right )} \cos \left (d x + c\right )^{2} + 3 \, {\left ({\left (a^{3} + 2 \, a b^{2}\right )} \cos \left (d x + c\right )^{3} - {\left (a^{3} + 2 \, a b^{2}\right )} \cos \left (d x + c\right )\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - 3 \, {\left ({\left (a^{3} + 2 \, a b^{2}\right )} \cos \left (d x + c\right )^{3} - {\left (a^{3} + 2 \, a b^{2}\right )} \cos \left (d x + c\right )\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) + 4 \, {\left (3 \, a^{2} b + b^{3} - {\left (6 \, a^{2} b + b^{3}\right )} \cos \left (d x + c\right )^{2}\right )} \sin \left (d x + c\right )}{4 \, {\left (d \cos \left (d x + c\right )^{3} - d \cos \left (d x + c\right )\right )}} \] Input:

integrate(csc(d*x+c)^3*sec(d*x+c)^2*(a+b*sin(d*x+c))^3,x, algorithm="frica 
s")
 

Output:

-1/4*(4*a^3 + 12*a*b^2 - 6*(a^3 + 2*a*b^2)*cos(d*x + c)^2 + 3*((a^3 + 2*a* 
b^2)*cos(d*x + c)^3 - (a^3 + 2*a*b^2)*cos(d*x + c))*log(1/2*cos(d*x + c) + 
 1/2) - 3*((a^3 + 2*a*b^2)*cos(d*x + c)^3 - (a^3 + 2*a*b^2)*cos(d*x + c))* 
log(-1/2*cos(d*x + c) + 1/2) + 4*(3*a^2*b + b^3 - (6*a^2*b + b^3)*cos(d*x 
+ c)^2)*sin(d*x + c))/(d*cos(d*x + c)^3 - d*cos(d*x + c))
 

Sympy [F(-1)]

Timed out. \[ \int \csc ^3(c+d x) \sec ^2(c+d x) (a+b \sin (c+d x))^3 \, dx=\text {Timed out} \] Input:

integrate(csc(d*x+c)**3*sec(d*x+c)**2*(a+b*sin(d*x+c))**3,x)
 

Output:

Timed out
 

Maxima [A] (verification not implemented)

Time = 0.04 (sec) , antiderivative size = 137, normalized size of antiderivative = 1.08 \[ \int \csc ^3(c+d x) \sec ^2(c+d x) (a+b \sin (c+d x))^3 \, dx=\frac {a^{3} {\left (\frac {2 \, {\left (3 \, \cos \left (d x + c\right )^{2} - 2\right )}}{\cos \left (d x + c\right )^{3} - \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 )} + 6 \, a b^{2} {\left (\frac {2}{\cos \left (d x + c\right )} - \log \left (\cos \left (d x + c\right ) + 1\right ) + \log \left (\cos \left (d x + c\right ) - 1\right )\right )} - 12 \, a^{2} b {\left (\frac {1}{\tan \left (d x + c\right )} - \tan \left (d x + c\right )\right )} + 4 \, b^{3} \tan \left (d x + c\right )}{4 \, d} \] Input:

integrate(csc(d*x+c)^3*sec(d*x+c)^2*(a+b*sin(d*x+c))^3,x, algorithm="maxim 
a")
 

Output:

1/4*(a^3*(2*(3*cos(d*x + c)^2 - 2)/(cos(d*x + c)^3 - cos(d*x + c)) - 3*log 
(cos(d*x + c) + 1) + 3*log(cos(d*x + c) - 1)) + 6*a*b^2*(2/cos(d*x + c) - 
log(cos(d*x + c) + 1) + log(cos(d*x + c) - 1)) - 12*a^2*b*(1/tan(d*x + c) 
- tan(d*x + c)) + 4*b^3*tan(d*x + c))/d
 

Giac [A] (verification not implemented)

Time = 0.44 (sec) , antiderivative size = 179, normalized size of antiderivative = 1.41 \[ \int \csc ^3(c+d x) \sec ^2(c+d x) (a+b \sin (c+d x))^3 \, dx=\frac {a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 12 \, a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 12 \, {\left (a^{3} + 2 \, a b^{2}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right ) - \frac {16 \, {\left (3 \, a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + a^{3} + 3 \, a b^{2}\right )}}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1} - \frac {18 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 36 \, a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 12 \, a^{2} b \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}}}{8 \, d} \] Input:

integrate(csc(d*x+c)^3*sec(d*x+c)^2*(a+b*sin(d*x+c))^3,x, algorithm="giac" 
)
 

Output:

1/8*(a^3*tan(1/2*d*x + 1/2*c)^2 + 12*a^2*b*tan(1/2*d*x + 1/2*c) + 12*(a^3 
+ 2*a*b^2)*log(abs(tan(1/2*d*x + 1/2*c))) - 16*(3*a^2*b*tan(1/2*d*x + 1/2* 
c) + b^3*tan(1/2*d*x + 1/2*c) + a^3 + 3*a*b^2)/(tan(1/2*d*x + 1/2*c)^2 - 1 
) - (18*a^3*tan(1/2*d*x + 1/2*c)^2 + 36*a*b^2*tan(1/2*d*x + 1/2*c)^2 + 12* 
a^2*b*tan(1/2*d*x + 1/2*c) + a^3)/tan(1/2*d*x + 1/2*c)^2)/d
 

Mupad [B] (verification not implemented)

Time = 19.84 (sec) , antiderivative size = 166, normalized size of antiderivative = 1.31 \[ \int \csc ^3(c+d x) \sec ^2(c+d x) (a+b \sin (c+d x))^3 \, dx=\frac {a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{8\,d}+\frac {\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )\,\left (\frac {3\,a^3}{2}+3\,a\,b^2\right )}{d}+\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,\left (\frac {17\,a^3}{2}+24\,a\,b^2\right )+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (30\,a^2\,b+8\,b^3\right )-\frac {a^3}{2}-6\,a^2\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left (4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\right )}+\frac {3\,a^2\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2\,d} \] Input:

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

Output:

(a^3*tan(c/2 + (d*x)/2)^2)/(8*d) + (log(tan(c/2 + (d*x)/2))*(3*a*b^2 + (3* 
a^3)/2))/d + (tan(c/2 + (d*x)/2)^2*(24*a*b^2 + (17*a^3)/2) + tan(c/2 + (d* 
x)/2)^3*(30*a^2*b + 8*b^3) - a^3/2 - 6*a^2*b*tan(c/2 + (d*x)/2))/(d*(4*tan 
(c/2 + (d*x)/2)^2 - 4*tan(c/2 + (d*x)/2)^4)) + (3*a^2*b*tan(c/2 + (d*x)/2) 
)/(2*d)
 

Reduce [B] (verification not implemented)

Time = 0.18 (sec) , antiderivative size = 191, normalized size of antiderivative = 1.50 \[ \int \csc ^3(c+d x) \sec ^2(c+d x) (a+b \sin (c+d x))^3 \, dx=\frac {12 \cos \left (d x +c \right ) \mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \sin \left (d x +c \right )^{2} a^{3}+24 \cos \left (d x +c \right ) \mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \sin \left (d x +c \right )^{2} a \,b^{2}-9 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{2} a^{3}-24 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{2} a \,b^{2}+48 \sin \left (d x +c \right )^{3} a^{2} b +8 \sin \left (d x +c \right )^{3} b^{3}+12 \sin \left (d x +c \right )^{2} a^{3}+24 \sin \left (d x +c \right )^{2} a \,b^{2}-24 \sin \left (d x +c \right ) a^{2} b -4 a^{3}}{8 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{2} d} \] Input:

int(csc(d*x+c)^3*sec(d*x+c)^2*(a+b*sin(d*x+c))^3,x)
 

Output:

(12*cos(c + d*x)*log(tan((c + d*x)/2))*sin(c + d*x)**2*a**3 + 24*cos(c + d 
*x)*log(tan((c + d*x)/2))*sin(c + d*x)**2*a*b**2 - 9*cos(c + d*x)*sin(c + 
d*x)**2*a**3 - 24*cos(c + d*x)*sin(c + d*x)**2*a*b**2 + 48*sin(c + d*x)**3 
*a**2*b + 8*sin(c + d*x)**3*b**3 + 12*sin(c + d*x)**2*a**3 + 24*sin(c + d* 
x)**2*a*b**2 - 24*sin(c + d*x)*a**2*b - 4*a**3)/(8*cos(c + d*x)*sin(c + d* 
x)**2*d)