\(\int \frac {\csc ^2(c+d x) (A-A \sin (c+d x))}{(a+a \sin (c+d x))^3} \, dx\) [241]

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

Optimal result

Integrand size = 32, antiderivative size = 113 \[ \int \frac {\csc ^2(c+d x) (A-A \sin (c+d x))}{(a+a \sin (c+d x))^3} \, dx=\frac {4 A \text {arctanh}(\cos (c+d x))}{a^3 d}-\frac {A \cot (c+d x)}{a^3 d}-\frac {2 A \cot (c+d x)}{5 a^3 d (1+\csc (c+d x))^3}+\frac {31 A \cot (c+d x)}{15 a^3 d (1+\csc (c+d x))^2}-\frac {104 A \cot (c+d x)}{15 a^3 d (1+\csc (c+d x))} \] Output:

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

Mathematica [A] (verified)

Time = 4.27 (sec) , antiderivative size = 167, normalized size of antiderivative = 1.48 \[ \int \frac {\csc ^2(c+d x) (A-A \sin (c+d x))}{(a+a \sin (c+d x))^3} \, dx=-\frac {A \left (15 \cot \left (\frac {1}{2} (c+d x)\right )-120 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )+120 \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )+\frac {12}{\left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )^4}+\frac {38}{\left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )^2}+\frac {2 \sin \left (\frac {1}{2} (c+d x)\right ) (-287+79 \cos (2 (c+d x))-354 \sin (c+d x))}{\left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )^5}-15 \tan \left (\frac {1}{2} (c+d x)\right )\right )}{30 a^3 d} \] Input:

Integrate[(Csc[c + d*x]^2*(A - A*Sin[c + d*x]))/(a + a*Sin[c + d*x])^3,x]
 

Output:

-1/30*(A*(15*Cot[(c + d*x)/2] - 120*Log[Cos[(c + d*x)/2]] + 120*Log[Sin[(c 
 + d*x)/2]] + 12/(Cos[(c + d*x)/2] + Sin[(c + d*x)/2])^4 + 38/(Cos[(c + d* 
x)/2] + Sin[(c + d*x)/2])^2 + (2*Sin[(c + d*x)/2]*(-287 + 79*Cos[2*(c + d* 
x)] - 354*Sin[c + d*x]))/(Cos[(c + d*x)/2] + Sin[(c + d*x)/2])^5 - 15*Tan[ 
(c + d*x)/2]))/(a^3*d)
 

Rubi [A] (verified)

Time = 0.64 (sec) , antiderivative size = 113, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.156, Rules used = {3042, 3429, 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 \frac {\csc ^2(c+d x) (A-A \sin (c+d x))}{(a \sin (c+d x)+a)^3} \, dx\)

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3429

\(\displaystyle a A \int \frac {\cot ^2(c+d x)}{(\sin (c+d x) a+a)^4}dx\)

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3188

\(\displaystyle \frac {A \int \left (\frac {\csc ^2(c+d x)}{a^2}-\frac {4 \csc (c+d x)}{a^2}-\frac {16}{a^2 (\csc (c+d x)+1)}+\frac {9}{a^2}+\frac {9}{a^2 (\csc (c+d x)+1)^2}-\frac {2}{a^2 (\csc (c+d x)+1)^3}\right )dx}{a}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {A \left (\frac {4 \text {arctanh}(\cos (c+d x))}{a^2 d}-\frac {\cot (c+d x)}{a^2 d}-\frac {104 \cot (c+d x)}{15 a^2 d (\csc (c+d x)+1)}+\frac {31 \cot (c+d x)}{15 a^2 d (\csc (c+d x)+1)^2}-\frac {2 \cot (c+d x)}{5 a^2 d (\csc (c+d x)+1)^3}\right )}{a}\)

Input:

Int[(Csc[c + d*x]^2*(A - A*Sin[c + d*x]))/(a + a*Sin[c + d*x])^3,x]
 

Output:

(A*((4*ArcTanh[Cos[c + d*x]])/(a^2*d) - Cot[c + d*x]/(a^2*d) - (2*Cot[c + 
d*x])/(5*a^2*d*(1 + Csc[c + d*x])^3) + (31*Cot[c + d*x])/(15*a^2*d*(1 + Cs 
c[c + d*x])^2) - (104*Cot[c + d*x])/(15*a^2*d*(1 + Csc[c + d*x]))))/a
 

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])
 

rule 3429
Int[sin[(e_.) + (f_.)*(x_)]^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_ 
.)*((c_) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Simp[a^n*c^n 
  Int[Tan[e + f*x]^p*(a + b*Sin[e + f*x])^(m - n), x], x] /; FreeQ[{a, b, c 
, d, e, f, m}, x] && EqQ[b*c + a*d, 0] && EqQ[a^2 - b^2, 0] && EqQ[p + 2*n, 
 0] && IntegerQ[n]
 
Maple [A] (verified)

Time = 0.72 (sec) , antiderivative size = 120, normalized size of antiderivative = 1.06

method result size
derivativedivides \(\frac {A \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-\frac {1}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}-8 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )-\frac {32}{5 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{5}}+\frac {16}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{4}}-\frac {88}{3 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}+\frac {28}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}-\frac {36}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1}\right )}{2 d \,a^{3}}\) \(120\)
default \(\frac {A \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-\frac {1}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}-8 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )-\frac {32}{5 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{5}}+\frac {16}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{4}}-\frac {88}{3 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}+\frac {28}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}-\frac {36}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1}\right )}{2 d \,a^{3}}\) \(120\)
parallelrisch \(-\frac {\left (8 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{5} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )-\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}+52 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}+161 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}+\frac {649 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}{3}+\cot \left (\frac {d x}{2}+\frac {c}{2}\right )+\frac {410 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{3}+\frac {566}{15}\right ) A}{2 d \,a^{3} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{5}}\) \(122\)
risch \(-\frac {4 \left (-320 A \,{\mathrm e}^{4 i \left (d x +c \right )}+150 i A \,{\mathrm e}^{5 i \left (d x +c \right )}+367 A \,{\mathrm e}^{2 i \left (d x +c \right )}-385 i A \,{\mathrm e}^{3 i \left (d x +c \right )}-47 A +205 i A \,{\mathrm e}^{i \left (d x +c \right )}+30 A \,{\mathrm e}^{6 i \left (d x +c \right )}\right )}{15 \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right ) \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )^{5} d \,a^{3}}-\frac {4 A \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{d \,a^{3}}+\frac {4 A \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{d \,a^{3}}\) \(158\)
norman \(\frac {-\frac {A}{2 a d}+\frac {A \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{9}}{2 a d}-\frac {3811 A \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{30 a d}-\frac {893 A \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}}{6 a d}-\frac {413 A \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}{6 a d}-\frac {161 A \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}}{2 a d}-\frac {805 A \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{6 a d}-\frac {283 A \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{15 a d}-\frac {51 A \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{2 a d}}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right ) a^{2} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{5}}-\frac {4 A \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d \,a^{3}}\) \(232\)

Input:

int(csc(d*x+c)^2*(A-A*sin(d*x+c))/(a+a*sin(d*x+c))^3,x,method=_RETURNVERBO 
SE)
 

Output:

1/2/d*A/a^3*(tan(1/2*d*x+1/2*c)-1/tan(1/2*d*x+1/2*c)-8*ln(tan(1/2*d*x+1/2* 
c))-32/5/(tan(1/2*d*x+1/2*c)+1)^5+16/(tan(1/2*d*x+1/2*c)+1)^4-88/3/(tan(1/ 
2*d*x+1/2*c)+1)^3+28/(tan(1/2*d*x+1/2*c)+1)^2-36/(tan(1/2*d*x+1/2*c)+1))
 

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 406 vs. \(2 (107) = 214\).

Time = 0.09 (sec) , antiderivative size = 406, normalized size of antiderivative = 3.59 \[ \int \frac {\csc ^2(c+d x) (A-A \sin (c+d x))}{(a+a \sin (c+d x))^3} \, dx=\frac {94 \, A \cos \left (d x + c\right )^{4} + 222 \, A \cos \left (d x + c\right )^{3} - 115 \, A \cos \left (d x + c\right )^{2} - 237 \, A \cos \left (d x + c\right ) + 30 \, {\left (A \cos \left (d x + c\right )^{4} - 2 \, A \cos \left (d x + c\right )^{3} - 5 \, A \cos \left (d x + c\right )^{2} + 2 \, A \cos \left (d x + c\right ) - {\left (A \cos \left (d x + c\right )^{3} + 3 \, A \cos \left (d x + c\right )^{2} - 2 \, A \cos \left (d x + c\right ) - 4 \, A\right )} \sin \left (d x + c\right ) + 4 \, A\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - 30 \, {\left (A \cos \left (d x + c\right )^{4} - 2 \, A \cos \left (d x + c\right )^{3} - 5 \, A \cos \left (d x + c\right )^{2} + 2 \, A \cos \left (d x + c\right ) - {\left (A \cos \left (d x + c\right )^{3} + 3 \, A \cos \left (d x + c\right )^{2} - 2 \, A \cos \left (d x + c\right ) - 4 \, A\right )} \sin \left (d x + c\right ) + 4 \, A\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) + {\left (94 \, A \cos \left (d x + c\right )^{3} - 128 \, A \cos \left (d x + c\right )^{2} - 243 \, A \cos \left (d x + c\right ) - 6 \, A\right )} \sin \left (d x + c\right ) + 6 \, A}{15 \, {\left (a^{3} d \cos \left (d x + c\right )^{4} - 2 \, a^{3} d \cos \left (d x + c\right )^{3} - 5 \, a^{3} d \cos \left (d x + c\right )^{2} + 2 \, a^{3} d \cos \left (d x + c\right ) + 4 \, a^{3} d - {\left (a^{3} d \cos \left (d x + c\right )^{3} + 3 \, a^{3} d \cos \left (d x + c\right )^{2} - 2 \, a^{3} d \cos \left (d x + c\right ) - 4 \, a^{3} d\right )} \sin \left (d x + c\right )\right )}} \] Input:

integrate(csc(d*x+c)^2*(A-A*sin(d*x+c))/(a+a*sin(d*x+c))^3,x, algorithm="f 
ricas")
 

Output:

1/15*(94*A*cos(d*x + c)^4 + 222*A*cos(d*x + c)^3 - 115*A*cos(d*x + c)^2 - 
237*A*cos(d*x + c) + 30*(A*cos(d*x + c)^4 - 2*A*cos(d*x + c)^3 - 5*A*cos(d 
*x + c)^2 + 2*A*cos(d*x + c) - (A*cos(d*x + c)^3 + 3*A*cos(d*x + c)^2 - 2* 
A*cos(d*x + c) - 4*A)*sin(d*x + c) + 4*A)*log(1/2*cos(d*x + c) + 1/2) - 30 
*(A*cos(d*x + c)^4 - 2*A*cos(d*x + c)^3 - 5*A*cos(d*x + c)^2 + 2*A*cos(d*x 
 + c) - (A*cos(d*x + c)^3 + 3*A*cos(d*x + c)^2 - 2*A*cos(d*x + c) - 4*A)*s 
in(d*x + c) + 4*A)*log(-1/2*cos(d*x + c) + 1/2) + (94*A*cos(d*x + c)^3 - 1 
28*A*cos(d*x + c)^2 - 243*A*cos(d*x + c) - 6*A)*sin(d*x + c) + 6*A)/(a^3*d 
*cos(d*x + c)^4 - 2*a^3*d*cos(d*x + c)^3 - 5*a^3*d*cos(d*x + c)^2 + 2*a^3* 
d*cos(d*x + c) + 4*a^3*d - (a^3*d*cos(d*x + c)^3 + 3*a^3*d*cos(d*x + c)^2 
- 2*a^3*d*cos(d*x + c) - 4*a^3*d)*sin(d*x + c))
 

Sympy [F]

\[ \int \frac {\csc ^2(c+d x) (A-A \sin (c+d x))}{(a+a \sin (c+d x))^3} \, dx=- \frac {A \left (\int \left (- \frac {\csc ^{2}{\left (c + d x \right )}}{\sin ^{3}{\left (c + d x \right )} + 3 \sin ^{2}{\left (c + d x \right )} + 3 \sin {\left (c + d x \right )} + 1}\right )\, dx + \int \frac {\sin {\left (c + d x \right )} \csc ^{2}{\left (c + d x \right )}}{\sin ^{3}{\left (c + d x \right )} + 3 \sin ^{2}{\left (c + d x \right )} + 3 \sin {\left (c + d x \right )} + 1}\, dx\right )}{a^{3}} \] Input:

integrate(csc(d*x+c)**2*(A-A*sin(d*x+c))/(a+a*sin(d*x+c))**3,x)
 

Output:

-A*(Integral(-csc(c + d*x)**2/(sin(c + d*x)**3 + 3*sin(c + d*x)**2 + 3*sin 
(c + d*x) + 1), x) + Integral(sin(c + d*x)*csc(c + d*x)**2/(sin(c + d*x)** 
3 + 3*sin(c + d*x)**2 + 3*sin(c + d*x) + 1), x))/a**3
 

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 519 vs. \(2 (107) = 214\).

Time = 0.05 (sec) , antiderivative size = 519, normalized size of antiderivative = 4.59 \[ \int \frac {\csc ^2(c+d x) (A-A \sin (c+d x))}{(a+a \sin (c+d x))^3} \, dx =\text {Too large to display} \] Input:

integrate(csc(d*x+c)^2*(A-A*sin(d*x+c))/(a+a*sin(d*x+c))^3,x, algorithm="m 
axima")
 

Output:

-1/30*(3*A*((121*sin(d*x + c)/(cos(d*x + c) + 1) + 410*sin(d*x + c)^2/(cos 
(d*x + c) + 1)^2 + 610*sin(d*x + c)^3/(cos(d*x + c) + 1)^3 + 425*sin(d*x + 
 c)^4/(cos(d*x + c) + 1)^4 + 125*sin(d*x + c)^5/(cos(d*x + c) + 1)^5 + 5)/ 
(a^3*sin(d*x + c)/(cos(d*x + c) + 1) + 5*a^3*sin(d*x + c)^2/(cos(d*x + c) 
+ 1)^2 + 10*a^3*sin(d*x + c)^3/(cos(d*x + c) + 1)^3 + 10*a^3*sin(d*x + c)^ 
4/(cos(d*x + c) + 1)^4 + 5*a^3*sin(d*x + c)^5/(cos(d*x + c) + 1)^5 + a^3*s 
in(d*x + c)^6/(cos(d*x + c) + 1)^6) + 30*log(sin(d*x + c)/(cos(d*x + c) + 
1))/a^3 - 5*sin(d*x + c)/(a^3*(cos(d*x + c) + 1))) + 2*A*(2*(115*sin(d*x + 
 c)/(cos(d*x + c) + 1) + 185*sin(d*x + c)^2/(cos(d*x + c) + 1)^2 + 135*sin 
(d*x + c)^3/(cos(d*x + c) + 1)^3 + 45*sin(d*x + c)^4/(cos(d*x + c) + 1)^4 
+ 32)/(a^3 + 5*a^3*sin(d*x + c)/(cos(d*x + c) + 1) + 10*a^3*sin(d*x + c)^2 
/(cos(d*x + c) + 1)^2 + 10*a^3*sin(d*x + c)^3/(cos(d*x + c) + 1)^3 + 5*a^3 
*sin(d*x + c)^4/(cos(d*x + c) + 1)^4 + a^3*sin(d*x + c)^5/(cos(d*x + c) + 
1)^5) + 15*log(sin(d*x + c)/(cos(d*x + c) + 1))/a^3))/d
 

Giac [A] (verification not implemented)

Time = 0.24 (sec) , antiderivative size = 146, normalized size of antiderivative = 1.29 \[ \int \frac {\csc ^2(c+d x) (A-A \sin (c+d x))}{(a+a \sin (c+d x))^3} \, dx=-\frac {\frac {120 \, A \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right )}{a^{3}} - \frac {15 \, A \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a^{3}} - \frac {15 \, {\left (8 \, A \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - A\right )}}{a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )} + \frac {4 \, {\left (135 \, A \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 435 \, A \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 605 \, A \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 385 \, A \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 104 \, A\right )}}{a^{3} {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right )}^{5}}}{30 \, d} \] Input:

integrate(csc(d*x+c)^2*(A-A*sin(d*x+c))/(a+a*sin(d*x+c))^3,x, algorithm="g 
iac")
 

Output:

-1/30*(120*A*log(abs(tan(1/2*d*x + 1/2*c)))/a^3 - 15*A*tan(1/2*d*x + 1/2*c 
)/a^3 - 15*(8*A*tan(1/2*d*x + 1/2*c) - A)/(a^3*tan(1/2*d*x + 1/2*c)) + 4*( 
135*A*tan(1/2*d*x + 1/2*c)^4 + 435*A*tan(1/2*d*x + 1/2*c)^3 + 605*A*tan(1/ 
2*d*x + 1/2*c)^2 + 385*A*tan(1/2*d*x + 1/2*c) + 104*A)/(a^3*(tan(1/2*d*x + 
 1/2*c) + 1)^5))/d
 

Mupad [B] (verification not implemented)

Time = 37.96 (sec) , antiderivative size = 210, normalized size of antiderivative = 1.86 \[ \int \frac {\csc ^2(c+d x) (A-A \sin (c+d x))}{(a+a \sin (c+d x))^3} \, dx=\frac {A\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2\,a^3\,d}-\frac {4\,A\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{a^3\,d}-\frac {37\,A\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+121\,A\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+\frac {514\,A\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{3}+\frac {338\,A\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{3}+\frac {491\,A\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{15}+A}{d\,\left (2\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+10\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+20\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+20\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+10\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+2\,a^3\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )} \] Input:

int((A - A*sin(c + d*x))/(sin(c + d*x)^2*(a + a*sin(c + d*x))^3),x)
 

Output:

(A*tan(c/2 + (d*x)/2))/(2*a^3*d) - (4*A*log(tan(c/2 + (d*x)/2)))/(a^3*d) - 
 (A + (491*A*tan(c/2 + (d*x)/2))/15 + (338*A*tan(c/2 + (d*x)/2)^2)/3 + (51 
4*A*tan(c/2 + (d*x)/2)^3)/3 + 121*A*tan(c/2 + (d*x)/2)^4 + 37*A*tan(c/2 + 
(d*x)/2)^5)/(d*(10*a^3*tan(c/2 + (d*x)/2)^2 + 20*a^3*tan(c/2 + (d*x)/2)^3 
+ 20*a^3*tan(c/2 + (d*x)/2)^4 + 10*a^3*tan(c/2 + (d*x)/2)^5 + 2*a^3*tan(c/ 
2 + (d*x)/2)^6 + 2*a^3*tan(c/2 + (d*x)/2)))
 

Reduce [B] (verification not implemented)

Time = 0.17 (sec) , antiderivative size = 298, normalized size of antiderivative = 2.64 \[ \int \frac {\csc ^2(c+d x) (A-A \sin (c+d x))}{(a+a \sin (c+d x))^3} \, dx=\frac {-120 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}-600 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}-1200 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}-1200 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}-600 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-120 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+15 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}+156 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}-855 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}-1685 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}-1270 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-410 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-15}{30 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) a^{2} d \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}+5 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}+10 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}+10 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+5 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )} \] Input:

int(csc(d*x+c)^2*(A-A*sin(d*x+c))/(a+a*sin(d*x+c))^3,x)
 

Output:

( - 120*log(tan((c + d*x)/2))*tan((c + d*x)/2)**6 - 600*log(tan((c + d*x)/ 
2))*tan((c + d*x)/2)**5 - 1200*log(tan((c + d*x)/2))*tan((c + d*x)/2)**4 - 
 1200*log(tan((c + d*x)/2))*tan((c + d*x)/2)**3 - 600*log(tan((c + d*x)/2) 
)*tan((c + d*x)/2)**2 - 120*log(tan((c + d*x)/2))*tan((c + d*x)/2) + 15*ta 
n((c + d*x)/2)**7 + 156*tan((c + d*x)/2)**6 - 855*tan((c + d*x)/2)**4 - 16 
85*tan((c + d*x)/2)**3 - 1270*tan((c + d*x)/2)**2 - 410*tan((c + d*x)/2) - 
 15)/(30*tan((c + d*x)/2)*a**2*d*(tan((c + d*x)/2)**5 + 5*tan((c + d*x)/2) 
**4 + 10*tan((c + d*x)/2)**3 + 10*tan((c + d*x)/2)**2 + 5*tan((c + d*x)/2) 
 + 1))