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

Optimal result
Mathematica [B] (verified)
Rubi [A] (verified)
Maple [A] (verified)
Fricas [A] (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 = 27, antiderivative size = 151 \[ \int \frac {\csc (c+d x) \sec ^2(c+d x)}{(a+a \sin (c+d x))^3} \, dx=-\frac {\text {arctanh}(\cos (c+d x))}{a^3 d}+\frac {\sec (c+d x)}{a^3 d}+\frac {\sec ^3(c+d x)}{3 a^3 d}+\frac {\sec ^5(c+d x)}{5 a^3 d}+\frac {4 \sec ^7(c+d x)}{7 a^3 d}-\frac {3 \tan (c+d x)}{a^3 d}-\frac {10 \tan ^3(c+d x)}{3 a^3 d}-\frac {11 \tan ^5(c+d x)}{5 a^3 d}-\frac {4 \tan ^7(c+d x)}{7 a^3 d} \] Output:

-arctanh(cos(d*x+c))/a^3/d+sec(d*x+c)/a^3/d+1/3*sec(d*x+c)^3/a^3/d+1/5*sec 
(d*x+c)^5/a^3/d+4/7*sec(d*x+c)^7/a^3/d-3*tan(d*x+c)/a^3/d-10/3*tan(d*x+c)^ 
3/a^3/d-11/5*tan(d*x+c)^5/a^3/d-4/7*tan(d*x+c)^7/a^3/d
 

Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(341\) vs. \(2(151)=302\).

Time = 1.63 (sec) , antiderivative size = 341, normalized size of antiderivative = 2.26 \[ \int \frac {\csc (c+d x) \sec ^2(c+d x)}{(a+a \sin (c+d x))^3} \, dx=\frac {60-\frac {120 \sin \left (\frac {1}{2} (c+d x)\right )}{\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )}-324 \sin \left (\frac {1}{2} (c+d x)\right ) \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )+162 \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )^2-706 \sin \left (\frac {1}{2} (c+d x)\right ) \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )^3+353 \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )^4-2281 \sin \left (\frac {1}{2} (c+d x)\right ) \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )^5-840 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right ) \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )^6+840 \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right ) \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )^6+\frac {105 \sin \left (\frac {1}{2} (c+d x)\right ) \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )^6}{\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )}}{840 d (a+a \sin (c+d x))^3} \] Input:

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

Output:

(60 - (120*Sin[(c + d*x)/2])/(Cos[(c + d*x)/2] + Sin[(c + d*x)/2]) - 324*S 
in[(c + d*x)/2]*(Cos[(c + d*x)/2] + Sin[(c + d*x)/2]) + 162*(Cos[(c + d*x) 
/2] + Sin[(c + d*x)/2])^2 - 706*Sin[(c + d*x)/2]*(Cos[(c + d*x)/2] + Sin[( 
c + d*x)/2])^3 + 353*(Cos[(c + d*x)/2] + Sin[(c + d*x)/2])^4 - 2281*Sin[(c 
 + d*x)/2]*(Cos[(c + d*x)/2] + Sin[(c + d*x)/2])^5 - 840*Log[Cos[(c + d*x) 
/2]]*(Cos[(c + d*x)/2] + Sin[(c + d*x)/2])^6 + 840*Log[Sin[(c + d*x)/2]]*( 
Cos[(c + d*x)/2] + Sin[(c + d*x)/2])^6 + (105*Sin[(c + d*x)/2]*(Cos[(c + d 
*x)/2] + Sin[(c + d*x)/2])^6)/(Cos[(c + d*x)/2] - Sin[(c + d*x)/2]))/(840* 
d*(a + a*Sin[c + d*x])^3)
 

Rubi [A] (verified)

Time = 0.59 (sec) , antiderivative size = 155, normalized size of antiderivative = 1.03, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.185, Rules used = {3042, 3354, 3042, 3352, 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 (c+d x) \sec ^2(c+d x)}{(a \sin (c+d x)+a)^3} \, dx\)

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3354

\(\displaystyle \frac {\int \csc (c+d x) \sec ^8(c+d x) (a-a \sin (c+d x))^3dx}{a^6}\)

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3352

\(\displaystyle \frac {\int \left (-3 a^3 \sec ^8(c+d x)+a^3 \csc (c+d x) \sec ^8(c+d x)+3 a^3 \tan (c+d x) \sec ^7(c+d x)-a^3 \tan ^2(c+d x) \sec ^6(c+d x)\right )dx}{a^6}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {-\frac {a^3 \text {arctanh}(\cos (c+d x))}{d}-\frac {4 a^3 \tan ^7(c+d x)}{7 d}-\frac {11 a^3 \tan ^5(c+d x)}{5 d}-\frac {10 a^3 \tan ^3(c+d x)}{3 d}-\frac {3 a^3 \tan (c+d x)}{d}+\frac {4 a^3 \sec ^7(c+d x)}{7 d}+\frac {a^3 \sec ^5(c+d x)}{5 d}+\frac {a^3 \sec ^3(c+d x)}{3 d}+\frac {a^3 \sec (c+d x)}{d}}{a^6}\)

Input:

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

Output:

(-((a^3*ArcTanh[Cos[c + d*x]])/d) + (a^3*Sec[c + d*x])/d + (a^3*Sec[c + d* 
x]^3)/(3*d) + (a^3*Sec[c + d*x]^5)/(5*d) + (4*a^3*Sec[c + d*x]^7)/(7*d) - 
(3*a^3*Tan[c + d*x])/d - (10*a^3*Tan[c + d*x]^3)/(3*d) - (11*a^3*Tan[c + d 
*x]^5)/(5*d) - (4*a^3*Tan[c + d*x]^7)/(7*d))/a^6
 

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 3352
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] && EqQ[a^2 - b^2, 0] && IGtQ[m, 0]
 

rule 3354
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n 
_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> Simp[(a/g)^(2* 
m)   Int[(g*Cos[e + f*x])^(2*m + p)*((d*Sin[e + f*x])^n/(a - b*Sin[e + f*x] 
)^m), x], x] /; FreeQ[{a, b, d, e, f, g, n, p}, x] && EqQ[a^2 - b^2, 0] && 
ILtQ[m, 0]
 
Maple [A] (verified)

Time = 1.04 (sec) , antiderivative size = 139, normalized size of antiderivative = 0.92

method result size
derivativedivides \(\frac {\frac {8}{7 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{7}}-\frac {4}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{6}}+\frac {42}{5 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{5}}-\frac {11}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{4}}+\frac {67}{6 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}-\frac {31}{4 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}+\frac {49}{8 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}-\frac {1}{8 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}+\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d \,a^{3}}\) \(139\)
default \(\frac {\frac {8}{7 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{7}}-\frac {4}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{6}}+\frac {42}{5 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{5}}-\frac {11}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{4}}+\frac {67}{6 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}-\frac {31}{4 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}+\frac {49}{8 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}-\frac {1}{8 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}+\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d \,a^{3}}\) \(139\)
risch \(\frac {12 i {\mathrm e}^{6 i \left (d x +c \right )}+2 \,{\mathrm e}^{7 i \left (d x +c \right )}-24 i {\mathrm e}^{4 i \left (d x +c \right )}-\frac {82 \,{\mathrm e}^{5 i \left (d x +c \right )}}{3}-\frac {364 i {\mathrm e}^{2 i \left (d x +c \right )}}{15}-\frac {134 \,{\mathrm e}^{3 i \left (d x +c \right )}}{15}+\frac {272 i}{105}+\frac {474 \,{\mathrm e}^{i \left (d x +c \right )}}{35}}{\left ({\mathrm e}^{i \left (d x +c \right )}+i\right )^{7} \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) a^{3} d}+\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{d \,a^{3}}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{d \,a^{3}}\) \(160\)
parallelrisch \(\frac {105 \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 )^{7} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )+630 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}+2310 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}+3430 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}+1050 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}-2758 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}-3878 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-2022 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-442}{105 d \,a^{3} \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 )^{7}}\) \(162\)
norman \(\frac {\frac {10 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}}{d a}-\frac {442}{105 a d}+\frac {6 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{d a}+\frac {98 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{3 d a}+\frac {22 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}}{d a}-\frac {394 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{15 d a}-\frac {554 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}{15 d a}-\frac {674 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{35 d a}}{a^{2} \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 )^{7}}+\frac {\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d \,a^{3}}\) \(189\)

Input:

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

Output:

1/d/a^3*(8/7/(tan(1/2*d*x+1/2*c)+1)^7-4/(tan(1/2*d*x+1/2*c)+1)^6+42/5/(tan 
(1/2*d*x+1/2*c)+1)^5-11/(tan(1/2*d*x+1/2*c)+1)^4+67/6/(tan(1/2*d*x+1/2*c)+ 
1)^3-31/4/(tan(1/2*d*x+1/2*c)+1)^2+49/8/(tan(1/2*d*x+1/2*c)+1)-1/8/(tan(1/ 
2*d*x+1/2*c)-1)+ln(tan(1/2*d*x+1/2*c)))
 

Fricas [A] (verification not implemented)

Time = 0.09 (sec) , antiderivative size = 218, normalized size of antiderivative = 1.44 \[ \int \frac {\csc (c+d x) \sec ^2(c+d x)}{(a+a \sin (c+d x))^3} \, dx=\frac {272 \, \cos \left (d x + c\right )^{4} - 594 \, \cos \left (d x + c\right )^{2} - 105 \, {\left (3 \, \cos \left (d x + c\right )^{3} + {\left (\cos \left (d x + c\right )^{3} - 4 \, \cos \left (d x + c\right )\right )} \sin \left (d x + c\right ) - 4 \, \cos \left (d x + c\right )\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) + 105 \, {\left (3 \, \cos \left (d x + c\right )^{3} + {\left (\cos \left (d x + c\right )^{3} - 4 \, \cos \left (d x + c\right )\right )} \sin \left (d x + c\right ) - 4 \, \cos \left (d x + c\right )\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - 6 \, {\left (101 \, \cos \left (d x + c\right )^{2} + 15\right )} \sin \left (d x + c\right ) - 120}{210 \, {\left (3 \, a^{3} d \cos \left (d x + c\right )^{3} - 4 \, a^{3} d \cos \left (d x + c\right ) + {\left (a^{3} d \cos \left (d x + c\right )^{3} - 4 \, a^{3} d \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )\right )}} \] Input:

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

Output:

1/210*(272*cos(d*x + c)^4 - 594*cos(d*x + c)^2 - 105*(3*cos(d*x + c)^3 + ( 
cos(d*x + c)^3 - 4*cos(d*x + c))*sin(d*x + c) - 4*cos(d*x + c))*log(1/2*co 
s(d*x + c) + 1/2) + 105*(3*cos(d*x + c)^3 + (cos(d*x + c)^3 - 4*cos(d*x + 
c))*sin(d*x + c) - 4*cos(d*x + c))*log(-1/2*cos(d*x + c) + 1/2) - 6*(101*c 
os(d*x + c)^2 + 15)*sin(d*x + c) - 120)/(3*a^3*d*cos(d*x + c)^3 - 4*a^3*d* 
cos(d*x + c) + (a^3*d*cos(d*x + c)^3 - 4*a^3*d*cos(d*x + c))*sin(d*x + c))
 

Sympy [F]

\[ \int \frac {\csc (c+d x) \sec ^2(c+d x)}{(a+a \sin (c+d x))^3} \, dx=\frac {\int \frac {\csc {\left (c + d x \right )} \sec ^{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}{a^{3}} \] Input:

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

Output:

Integral(csc(c + d*x)*sec(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. 336 vs. \(2 (139) = 278\).

Time = 0.04 (sec) , antiderivative size = 336, normalized size of antiderivative = 2.23 \[ \int \frac {\csc (c+d x) \sec ^2(c+d x)}{(a+a \sin (c+d x))^3} \, dx=\frac {\frac {2 \, {\left (\frac {1011 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {1939 \, \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {1379 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} - \frac {525 \, \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} - \frac {1715 \, \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}} - \frac {1155 \, \sin \left (d x + c\right )^{6}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{6}} - \frac {315 \, \sin \left (d x + c\right )^{7}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{7}} + 221\right )}}{a^{3} + \frac {6 \, a^{3} \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {14 \, a^{3} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {14 \, a^{3} \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} - \frac {14 \, a^{3} \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}} - \frac {14 \, a^{3} \sin \left (d x + c\right )^{6}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{6}} - \frac {6 \, a^{3} \sin \left (d x + c\right )^{7}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{7}} - \frac {a^{3} \sin \left (d x + c\right )^{8}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{8}}} + \frac {105 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a^{3}}}{105 \, d} \] Input:

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

Output:

1/105*(2*(1011*sin(d*x + c)/(cos(d*x + c) + 1) + 1939*sin(d*x + c)^2/(cos( 
d*x + c) + 1)^2 + 1379*sin(d*x + c)^3/(cos(d*x + c) + 1)^3 - 525*sin(d*x + 
 c)^4/(cos(d*x + c) + 1)^4 - 1715*sin(d*x + c)^5/(cos(d*x + c) + 1)^5 - 11 
55*sin(d*x + c)^6/(cos(d*x + c) + 1)^6 - 315*sin(d*x + c)^7/(cos(d*x + c) 
+ 1)^7 + 221)/(a^3 + 6*a^3*sin(d*x + c)/(cos(d*x + c) + 1) + 14*a^3*sin(d* 
x + c)^2/(cos(d*x + c) + 1)^2 + 14*a^3*sin(d*x + c)^3/(cos(d*x + c) + 1)^3 
 - 14*a^3*sin(d*x + c)^5/(cos(d*x + c) + 1)^5 - 14*a^3*sin(d*x + c)^6/(cos 
(d*x + c) + 1)^6 - 6*a^3*sin(d*x + c)^7/(cos(d*x + c) + 1)^7 - a^3*sin(d*x 
 + c)^8/(cos(d*x + c) + 1)^8) + 105*log(sin(d*x + c)/(cos(d*x + c) + 1))/a 
^3)/d
 

Giac [A] (verification not implemented)

Time = 0.16 (sec) , antiderivative size = 135, normalized size of antiderivative = 0.89 \[ \int \frac {\csc (c+d x) \sec ^2(c+d x)}{(a+a \sin (c+d x))^3} \, dx=\frac {\frac {840 \, \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right )}{a^{3}} - \frac {105}{a^{3} {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1\right )}} + \frac {5145 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} + 24360 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 54005 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 66080 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 47691 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 18872 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 3431}{a^{3} {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right )}^{7}}}{840 \, d} \] Input:

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

Output:

1/840*(840*log(abs(tan(1/2*d*x + 1/2*c)))/a^3 - 105/(a^3*(tan(1/2*d*x + 1/ 
2*c) - 1)) + (5145*tan(1/2*d*x + 1/2*c)^6 + 24360*tan(1/2*d*x + 1/2*c)^5 + 
 54005*tan(1/2*d*x + 1/2*c)^4 + 66080*tan(1/2*d*x + 1/2*c)^3 + 47691*tan(1 
/2*d*x + 1/2*c)^2 + 18872*tan(1/2*d*x + 1/2*c) + 3431)/(a^3*(tan(1/2*d*x + 
 1/2*c) + 1)^7))/d
 

Mupad [B] (verification not implemented)

Time = 33.93 (sec) , antiderivative size = 143, normalized size of antiderivative = 0.95 \[ \int \frac {\csc (c+d x) \sec ^2(c+d x)}{(a+a \sin (c+d x))^3} \, dx=\frac {\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{a^3\,d}-\frac {-6\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7-22\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6-\frac {98\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{3}-10\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+\frac {394\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{15}+\frac {554\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{15}+\frac {674\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{35}+\frac {442}{105}}{a^3\,d\,\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-1\right )\,{\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+1\right )}^7} \] Input:

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

Output:

log(tan(c/2 + (d*x)/2))/(a^3*d) - ((674*tan(c/2 + (d*x)/2))/35 + (554*tan( 
c/2 + (d*x)/2)^2)/15 + (394*tan(c/2 + (d*x)/2)^3)/15 - 10*tan(c/2 + (d*x)/ 
2)^4 - (98*tan(c/2 + (d*x)/2)^5)/3 - 22*tan(c/2 + (d*x)/2)^6 - 6*tan(c/2 + 
 (d*x)/2)^7 + 442/105)/(a^3*d*(tan(c/2 + (d*x)/2) - 1)*(tan(c/2 + (d*x)/2) 
 + 1)^7)
 

Reduce [B] (verification not implemented)

Time = 85.43 (sec) , antiderivative size = 234, normalized size of antiderivative = 1.55 \[ \int \frac {\csc (c+d x) \sec ^2(c+d x)}{(a+a \sin (c+d x))^3} \, dx=\frac {105 \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 )^{3}+315 \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}+315 \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 )+105 \cos \left (d x +c \right ) \mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )+116 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{3}+348 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{2}+348 \cos \left (d x +c \right ) \sin \left (d x +c \right )+116 \cos \left (d x +c \right )-136 \sin \left (d x +c \right )^{4}-303 \sin \left (d x +c \right )^{3}-25 \sin \left (d x +c \right )^{2}+348 \sin \left (d x +c \right )+221}{105 \cos \left (d x +c \right ) a^{3} d \left (\sin \left (d x +c \right )^{3}+3 \sin \left (d x +c \right )^{2}+3 \sin \left (d x +c \right )+1\right )} \] Input:

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

Output:

(105*cos(c + d*x)*log(tan((c + d*x)/2))*sin(c + d*x)**3 + 315*cos(c + d*x) 
*log(tan((c + d*x)/2))*sin(c + d*x)**2 + 315*cos(c + d*x)*log(tan((c + d*x 
)/2))*sin(c + d*x) + 105*cos(c + d*x)*log(tan((c + d*x)/2)) + 116*cos(c + 
d*x)*sin(c + d*x)**3 + 348*cos(c + d*x)*sin(c + d*x)**2 + 348*cos(c + d*x) 
*sin(c + d*x) + 116*cos(c + d*x) - 136*sin(c + d*x)**4 - 303*sin(c + d*x)* 
*3 - 25*sin(c + d*x)**2 + 348*sin(c + d*x) + 221)/(105*cos(c + d*x)*a**3*d 
*(sin(c + d*x)**3 + 3*sin(c + d*x)**2 + 3*sin(c + d*x) + 1))