\(\int \csc ^7(e+f x) (a+a \sin (e+f x))^2 (c-c \sin (e+f x)) \, dx\) [11]

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

Optimal result

Integrand size = 32, antiderivative size = 130 \[ \int \csc ^7(e+f x) (a+a \sin (e+f x))^2 (c-c \sin (e+f x)) \, dx=\frac {a^2 c \text {arctanh}(\cos (e+f x))}{16 f}-\frac {a^2 c \cot ^3(e+f x)}{3 f}-\frac {a^2 c \cot ^5(e+f x)}{5 f}+\frac {a^2 c \cot (e+f x) \csc (e+f x)}{16 f}+\frac {a^2 c \cot (e+f x) \csc ^3(e+f x)}{24 f}-\frac {a^2 c \cot (e+f x) \csc ^5(e+f x)}{6 f} \] Output:

1/16*a^2*c*arctanh(cos(f*x+e))/f-1/3*a^2*c*cot(f*x+e)^3/f-1/5*a^2*c*cot(f* 
x+e)^5/f+1/16*a^2*c*cot(f*x+e)*csc(f*x+e)/f+1/24*a^2*c*cot(f*x+e)*csc(f*x+ 
e)^3/f-1/6*a^2*c*cot(f*x+e)*csc(f*x+e)^5/f
 

Mathematica [A] (verified)

Time = 0.21 (sec) , antiderivative size = 204, normalized size of antiderivative = 1.57 \[ \int \csc ^7(e+f x) (a+a \sin (e+f x))^2 (c-c \sin (e+f x)) \, dx=\frac {2 a^2 c \cot (e+f x)}{15 f}+\frac {a^2 c \csc ^2\left (\frac {1}{2} (e+f x)\right )}{64 f}-\frac {a^2 c \csc ^6\left (\frac {1}{2} (e+f x)\right )}{384 f}+\frac {a^2 c \cot (e+f x) \csc ^2(e+f x)}{15 f}-\frac {a^2 c \cot (e+f x) \csc ^4(e+f x)}{5 f}+\frac {a^2 c \log \left (\cos \left (\frac {1}{2} (e+f x)\right )\right )}{16 f}-\frac {a^2 c \log \left (\sin \left (\frac {1}{2} (e+f x)\right )\right )}{16 f}-\frac {a^2 c \sec ^2\left (\frac {1}{2} (e+f x)\right )}{64 f}+\frac {a^2 c \sec ^6\left (\frac {1}{2} (e+f x)\right )}{384 f} \] Input:

Integrate[Csc[e + f*x]^7*(a + a*Sin[e + f*x])^2*(c - c*Sin[e + f*x]),x]
 

Output:

(2*a^2*c*Cot[e + f*x])/(15*f) + (a^2*c*Csc[(e + f*x)/2]^2)/(64*f) - (a^2*c 
*Csc[(e + f*x)/2]^6)/(384*f) + (a^2*c*Cot[e + f*x]*Csc[e + f*x]^2)/(15*f) 
- (a^2*c*Cot[e + f*x]*Csc[e + f*x]^4)/(5*f) + (a^2*c*Log[Cos[(e + f*x)/2]] 
)/(16*f) - (a^2*c*Log[Sin[(e + f*x)/2]])/(16*f) - (a^2*c*Sec[(e + f*x)/2]^ 
2)/(64*f) + (a^2*c*Sec[(e + f*x)/2]^6)/(384*f)
 

Rubi [A] (verified)

Time = 0.41 (sec) , antiderivative size = 130, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.094, Rules used = {3042, 3445, 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 ^7(e+f x) (a \sin (e+f x)+a)^2 (c-c \sin (e+f x)) \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {(a \sin (e+f x)+a)^2 (c-c \sin (e+f x))}{\sin (e+f x)^7}dx\)

\(\Big \downarrow \) 3445

\(\displaystyle \int \left (a^2 c \csc ^7(e+f x)+a^2 c \csc ^6(e+f x)-a^2 c \csc ^5(e+f x)-a^2 c \csc ^4(e+f x)\right )dx\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {a^2 c \text {arctanh}(\cos (e+f x))}{16 f}-\frac {a^2 c \cot ^5(e+f x)}{5 f}-\frac {a^2 c \cot ^3(e+f x)}{3 f}-\frac {a^2 c \cot (e+f x) \csc ^5(e+f x)}{6 f}+\frac {a^2 c \cot (e+f x) \csc ^3(e+f x)}{24 f}+\frac {a^2 c \cot (e+f x) \csc (e+f x)}{16 f}\)

Input:

Int[Csc[e + f*x]^7*(a + a*Sin[e + f*x])^2*(c - c*Sin[e + f*x]),x]
 

Output:

(a^2*c*ArcTanh[Cos[e + f*x]])/(16*f) - (a^2*c*Cot[e + f*x]^3)/(3*f) - (a^2 
*c*Cot[e + f*x]^5)/(5*f) + (a^2*c*Cot[e + f*x]*Csc[e + f*x])/(16*f) + (a^2 
*c*Cot[e + f*x]*Csc[e + f*x]^3)/(24*f) - (a^2*c*Cot[e + f*x]*Csc[e + f*x]^ 
5)/(6*f)
 

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 3445
Int[sin[(e_.) + (f_.)*(x_)]^(n_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m 
_.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Int[ExpandTrig[si 
n[e + f*x]^n*(a + b*sin[e + f*x])^m*(A + B*sin[e + f*x]), x], x] /; FreeQ[{ 
a, b, e, f, A, B}, x] && EqQ[A*b + a*B, 0] && EqQ[a^2 - b^2, 0] && IntegerQ 
[m] && IntegerQ[n]
 
Maple [C] (verified)

Result contains complex when optimal does not.

Time = 2.48 (sec) , antiderivative size = 171, normalized size of antiderivative = 1.32

method result size
risch \(-\frac {a^{2} c \left (15 \,{\mathrm e}^{11 i \left (f x +e \right )}-85 \,{\mathrm e}^{9 i \left (f x +e \right )}-570 \,{\mathrm e}^{7 i \left (f x +e \right )}+480 i {\mathrm e}^{8 i \left (f x +e \right )}-570 \,{\mathrm e}^{5 i \left (f x +e \right )}-320 i {\mathrm e}^{6 i \left (f x +e \right )}-85 \,{\mathrm e}^{3 i \left (f x +e \right )}+15 \,{\mathrm e}^{i \left (f x +e \right )}-192 i {\mathrm e}^{2 i \left (f x +e \right )}+32 i\right )}{120 f \left ({\mathrm e}^{2 i \left (f x +e \right )}-1\right )^{6}}+\frac {a^{2} c \ln \left ({\mathrm e}^{i \left (f x +e \right )}+1\right )}{16 f}-\frac {a^{2} c \ln \left ({\mathrm e}^{i \left (f x +e \right )}-1\right )}{16 f}\) \(171\)
parallelrisch \(-\frac {\left (\cot \left (\frac {f x}{2}+\frac {e}{2}\right )^{6}-\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{6}+\frac {12 \cot \left (\frac {f x}{2}+\frac {e}{2}\right )^{5}}{5}-\frac {12 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{5}}{5}+3 \cot \left (\frac {f x}{2}+\frac {e}{2}\right )^{4}-3 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{4}+4 \cot \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}-4 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}-3 \cot \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}+3 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}-24 \cot \left (\frac {f x}{2}+\frac {e}{2}\right )+24 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )+24 \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )\right ) c \,a^{2}}{384 f}\) \(173\)
derivativedivides \(\frac {-a^{2} c \left (-\frac {2}{3}-\frac {\csc \left (f x +e \right )^{2}}{3}\right ) \cot \left (f x +e \right )-a^{2} c \left (\left (-\frac {\csc \left (f x +e \right )^{3}}{4}-\frac {3 \csc \left (f x +e \right )}{8}\right ) \cot \left (f x +e \right )+\frac {3 \ln \left (\csc \left (f x +e \right )-\cot \left (f x +e \right )\right )}{8}\right )+a^{2} c \left (-\frac {8}{15}-\frac {\csc \left (f x +e \right )^{4}}{5}-\frac {4 \csc \left (f x +e \right )^{2}}{15}\right ) \cot \left (f x +e \right )+a^{2} c \left (\left (-\frac {\csc \left (f x +e \right )^{5}}{6}-\frac {5 \csc \left (f x +e \right )^{3}}{24}-\frac {5 \csc \left (f x +e \right )}{16}\right ) \cot \left (f x +e \right )+\frac {5 \ln \left (\csc \left (f x +e \right )-\cot \left (f x +e \right )\right )}{16}\right )}{f}\) \(174\)
default \(\frac {-a^{2} c \left (-\frac {2}{3}-\frac {\csc \left (f x +e \right )^{2}}{3}\right ) \cot \left (f x +e \right )-a^{2} c \left (\left (-\frac {\csc \left (f x +e \right )^{3}}{4}-\frac {3 \csc \left (f x +e \right )}{8}\right ) \cot \left (f x +e \right )+\frac {3 \ln \left (\csc \left (f x +e \right )-\cot \left (f x +e \right )\right )}{8}\right )+a^{2} c \left (-\frac {8}{15}-\frac {\csc \left (f x +e \right )^{4}}{5}-\frac {4 \csc \left (f x +e \right )^{2}}{15}\right ) \cot \left (f x +e \right )+a^{2} c \left (\left (-\frac {\csc \left (f x +e \right )^{5}}{6}-\frac {5 \csc \left (f x +e \right )^{3}}{24}-\frac {5 \csc \left (f x +e \right )}{16}\right ) \cot \left (f x +e \right )+\frac {5 \ln \left (\csc \left (f x +e \right )-\cot \left (f x +e \right )\right )}{16}\right )}{f}\) \(174\)

Input:

int(csc(f*x+e)^7*(a+a*sin(f*x+e))^2*(c-c*sin(f*x+e)),x,method=_RETURNVERBO 
SE)
 

Output:

-1/120*a^2*c*(15*exp(11*I*(f*x+e))-85*exp(9*I*(f*x+e))-570*exp(7*I*(f*x+e) 
)+480*I*exp(8*I*(f*x+e))-570*exp(5*I*(f*x+e))-320*I*exp(6*I*(f*x+e))-85*ex 
p(3*I*(f*x+e))+15*exp(I*(f*x+e))-192*I*exp(2*I*(f*x+e))+32*I)/f/(exp(2*I*( 
f*x+e))-1)^6+1/16*a^2*c/f*ln(exp(I*(f*x+e))+1)-1/16*a^2*c/f*ln(exp(I*(f*x+ 
e))-1)
 

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 240 vs. \(2 (118) = 236\).

Time = 0.09 (sec) , antiderivative size = 240, normalized size of antiderivative = 1.85 \[ \int \csc ^7(e+f x) (a+a \sin (e+f x))^2 (c-c \sin (e+f x)) \, dx=-\frac {30 \, a^{2} c \cos \left (f x + e\right )^{5} - 80 \, a^{2} c \cos \left (f x + e\right )^{3} - 30 \, a^{2} c \cos \left (f x + e\right ) - 15 \, {\left (a^{2} c \cos \left (f x + e\right )^{6} - 3 \, a^{2} c \cos \left (f x + e\right )^{4} + 3 \, a^{2} c \cos \left (f x + e\right )^{2} - a^{2} c\right )} \log \left (\frac {1}{2} \, \cos \left (f x + e\right ) + \frac {1}{2}\right ) + 15 \, {\left (a^{2} c \cos \left (f x + e\right )^{6} - 3 \, a^{2} c \cos \left (f x + e\right )^{4} + 3 \, a^{2} c \cos \left (f x + e\right )^{2} - a^{2} c\right )} \log \left (-\frac {1}{2} \, \cos \left (f x + e\right ) + \frac {1}{2}\right ) + 32 \, {\left (2 \, a^{2} c \cos \left (f x + e\right )^{5} - 5 \, a^{2} c \cos \left (f x + e\right )^{3}\right )} \sin \left (f x + e\right )}{480 \, {\left (f \cos \left (f x + e\right )^{6} - 3 \, f \cos \left (f x + e\right )^{4} + 3 \, f \cos \left (f x + e\right )^{2} - f\right )}} \] Input:

integrate(csc(f*x+e)^7*(a+a*sin(f*x+e))^2*(c-c*sin(f*x+e)),x, algorithm="f 
ricas")
 

Output:

-1/480*(30*a^2*c*cos(f*x + e)^5 - 80*a^2*c*cos(f*x + e)^3 - 30*a^2*c*cos(f 
*x + e) - 15*(a^2*c*cos(f*x + e)^6 - 3*a^2*c*cos(f*x + e)^4 + 3*a^2*c*cos( 
f*x + e)^2 - a^2*c)*log(1/2*cos(f*x + e) + 1/2) + 15*(a^2*c*cos(f*x + e)^6 
 - 3*a^2*c*cos(f*x + e)^4 + 3*a^2*c*cos(f*x + e)^2 - a^2*c)*log(-1/2*cos(f 
*x + e) + 1/2) + 32*(2*a^2*c*cos(f*x + e)^5 - 5*a^2*c*cos(f*x + e)^3)*sin( 
f*x + e))/(f*cos(f*x + e)^6 - 3*f*cos(f*x + e)^4 + 3*f*cos(f*x + e)^2 - f)
 

Sympy [F(-1)]

Timed out. \[ \int \csc ^7(e+f x) (a+a \sin (e+f x))^2 (c-c \sin (e+f x)) \, dx=\text {Timed out} \] Input:

integrate(csc(f*x+e)**7*(a+a*sin(f*x+e))**2*(c-c*sin(f*x+e)),x)
 

Output:

Timed out
 

Maxima [A] (verification not implemented)

Time = 0.04 (sec) , antiderivative size = 232, normalized size of antiderivative = 1.78 \[ \int \csc ^7(e+f x) (a+a \sin (e+f x))^2 (c-c \sin (e+f x)) \, dx=\frac {5 \, a^{2} c {\left (\frac {2 \, {\left (15 \, \cos \left (f x + e\right )^{5} - 40 \, \cos \left (f x + e\right )^{3} + 33 \, \cos \left (f x + e\right )\right )}}{\cos \left (f x + e\right )^{6} - 3 \, \cos \left (f x + e\right )^{4} + 3 \, \cos \left (f x + e\right )^{2} - 1} - 15 \, \log \left (\cos \left (f x + e\right ) + 1\right ) + 15 \, \log \left (\cos \left (f x + e\right ) - 1\right )\right )} - 30 \, a^{2} c {\left (\frac {2 \, {\left (3 \, \cos \left (f x + e\right )^{3} - 5 \, \cos \left (f x + e\right )\right )}}{\cos \left (f x + e\right )^{4} - 2 \, \cos \left (f x + e\right )^{2} + 1} - 3 \, \log \left (\cos \left (f x + e\right ) + 1\right ) + 3 \, \log \left (\cos \left (f x + e\right ) - 1\right )\right )} + \frac {160 \, {\left (3 \, \tan \left (f x + e\right )^{2} + 1\right )} a^{2} c}{\tan \left (f x + e\right )^{3}} - \frac {32 \, {\left (15 \, \tan \left (f x + e\right )^{4} + 10 \, \tan \left (f x + e\right )^{2} + 3\right )} a^{2} c}{\tan \left (f x + e\right )^{5}}}{480 \, f} \] Input:

integrate(csc(f*x+e)^7*(a+a*sin(f*x+e))^2*(c-c*sin(f*x+e)),x, algorithm="m 
axima")
 

Output:

1/480*(5*a^2*c*(2*(15*cos(f*x + e)^5 - 40*cos(f*x + e)^3 + 33*cos(f*x + e) 
)/(cos(f*x + e)^6 - 3*cos(f*x + e)^4 + 3*cos(f*x + e)^2 - 1) - 15*log(cos( 
f*x + e) + 1) + 15*log(cos(f*x + e) - 1)) - 30*a^2*c*(2*(3*cos(f*x + e)^3 
- 5*cos(f*x + e))/(cos(f*x + e)^4 - 2*cos(f*x + e)^2 + 1) - 3*log(cos(f*x 
+ e) + 1) + 3*log(cos(f*x + e) - 1)) + 160*(3*tan(f*x + e)^2 + 1)*a^2*c/ta 
n(f*x + e)^3 - 32*(15*tan(f*x + e)^4 + 10*tan(f*x + e)^2 + 3)*a^2*c/tan(f* 
x + e)^5)/f
 

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 242 vs. \(2 (118) = 236\).

Time = 0.39 (sec) , antiderivative size = 242, normalized size of antiderivative = 1.86 \[ \int \csc ^7(e+f x) (a+a \sin (e+f x))^2 (c-c \sin (e+f x)) \, dx=\frac {5 \, a^{2} c \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{6} + 12 \, a^{2} c \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5} + 15 \, a^{2} c \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} + 20 \, a^{2} c \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} - 15 \, a^{2} c \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - 120 \, a^{2} c \log \left ({\left | \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) \right |}\right ) - 120 \, a^{2} c \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + \frac {294 \, a^{2} c \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{6} + 120 \, a^{2} c \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5} + 15 \, a^{2} c \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} - 20 \, a^{2} c \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} - 15 \, a^{2} c \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - 12 \, a^{2} c \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 5 \, a^{2} c}{\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{6}}}{1920 \, f} \] Input:

integrate(csc(f*x+e)^7*(a+a*sin(f*x+e))^2*(c-c*sin(f*x+e)),x, algorithm="g 
iac")
 

Output:

1/1920*(5*a^2*c*tan(1/2*f*x + 1/2*e)^6 + 12*a^2*c*tan(1/2*f*x + 1/2*e)^5 + 
 15*a^2*c*tan(1/2*f*x + 1/2*e)^4 + 20*a^2*c*tan(1/2*f*x + 1/2*e)^3 - 15*a^ 
2*c*tan(1/2*f*x + 1/2*e)^2 - 120*a^2*c*log(abs(tan(1/2*f*x + 1/2*e))) - 12 
0*a^2*c*tan(1/2*f*x + 1/2*e) + (294*a^2*c*tan(1/2*f*x + 1/2*e)^6 + 120*a^2 
*c*tan(1/2*f*x + 1/2*e)^5 + 15*a^2*c*tan(1/2*f*x + 1/2*e)^4 - 20*a^2*c*tan 
(1/2*f*x + 1/2*e)^3 - 15*a^2*c*tan(1/2*f*x + 1/2*e)^2 - 12*a^2*c*tan(1/2*f 
*x + 1/2*e) - 5*a^2*c)/tan(1/2*f*x + 1/2*e)^6)/f
 

Mupad [B] (verification not implemented)

Time = 35.67 (sec) , antiderivative size = 340, normalized size of antiderivative = 2.62 \[ \int \csc ^7(e+f x) (a+a \sin (e+f x))^2 (c-c \sin (e+f x)) \, dx=-\frac {a^2\,c\,\left (5\,{\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^{12}-5\,{\sin \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^{12}-12\,\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )\,{\sin \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^{11}+12\,{\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^{11}\,\sin \left (\frac {e}{2}+\frac {f\,x}{2}\right )-15\,{\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2\,{\sin \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^{10}-20\,{\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3\,{\sin \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^9+15\,{\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4\,{\sin \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^8+120\,{\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^5\,{\sin \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^7-120\,{\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^7\,{\sin \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^5-15\,{\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^8\,{\sin \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4+20\,{\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^9\,{\sin \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3+15\,{\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^{10}\,{\sin \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2+120\,{\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^6\,\ln \left (\frac {\sin \left (\frac {e}{2}+\frac {f\,x}{2}\right )}{\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )}\right )\,{\sin \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^6\right )}{1920\,f\,{\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^6\,{\sin \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^6} \] Input:

int(((a + a*sin(e + f*x))^2*(c - c*sin(e + f*x)))/sin(e + f*x)^7,x)
 

Output:

-(a^2*c*(5*cos(e/2 + (f*x)/2)^12 - 5*sin(e/2 + (f*x)/2)^12 - 12*cos(e/2 + 
(f*x)/2)*sin(e/2 + (f*x)/2)^11 + 12*cos(e/2 + (f*x)/2)^11*sin(e/2 + (f*x)/ 
2) - 15*cos(e/2 + (f*x)/2)^2*sin(e/2 + (f*x)/2)^10 - 20*cos(e/2 + (f*x)/2) 
^3*sin(e/2 + (f*x)/2)^9 + 15*cos(e/2 + (f*x)/2)^4*sin(e/2 + (f*x)/2)^8 + 1 
20*cos(e/2 + (f*x)/2)^5*sin(e/2 + (f*x)/2)^7 - 120*cos(e/2 + (f*x)/2)^7*si 
n(e/2 + (f*x)/2)^5 - 15*cos(e/2 + (f*x)/2)^8*sin(e/2 + (f*x)/2)^4 + 20*cos 
(e/2 + (f*x)/2)^9*sin(e/2 + (f*x)/2)^3 + 15*cos(e/2 + (f*x)/2)^10*sin(e/2 
+ (f*x)/2)^2 + 120*cos(e/2 + (f*x)/2)^6*log(sin(e/2 + (f*x)/2)/cos(e/2 + ( 
f*x)/2))*sin(e/2 + (f*x)/2)^6))/(1920*f*cos(e/2 + (f*x)/2)^6*sin(e/2 + (f* 
x)/2)^6)
 

Reduce [B] (verification not implemented)

Time = 0.20 (sec) , antiderivative size = 124, normalized size of antiderivative = 0.95 \[ \int \csc ^7(e+f x) (a+a \sin (e+f x))^2 (c-c \sin (e+f x)) \, dx=\frac {a^{2} c \left (32 \cos \left (f x +e \right ) \sin \left (f x +e \right )^{5}+15 \cos \left (f x +e \right ) \sin \left (f x +e \right )^{4}+16 \cos \left (f x +e \right ) \sin \left (f x +e \right )^{3}+10 \cos \left (f x +e \right ) \sin \left (f x +e \right )^{2}-48 \cos \left (f x +e \right ) \sin \left (f x +e \right )-40 \cos \left (f x +e \right )-15 \,\mathrm {log}\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right ) \sin \left (f x +e \right )^{6}\right )}{240 \sin \left (f x +e \right )^{6} f} \] Input:

int(csc(f*x+e)^7*(a+a*sin(f*x+e))^2*(c-c*sin(f*x+e)),x)
 

Output:

(a**2*c*(32*cos(e + f*x)*sin(e + f*x)**5 + 15*cos(e + f*x)*sin(e + f*x)**4 
 + 16*cos(e + f*x)*sin(e + f*x)**3 + 10*cos(e + f*x)*sin(e + f*x)**2 - 48* 
cos(e + f*x)*sin(e + f*x) - 40*cos(e + f*x) - 15*log(tan((e + f*x)/2))*sin 
(e + f*x)**6))/(240*sin(e + f*x)**6*f)