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

Optimal result
Mathematica [B] (verified)
Rubi [A] (verified)
Maple [A] (verified)
Fricas [A] (verification not implemented)
Sympy [F(-1)]
Maxima [B] (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 = 164 \[ \int \frac {\csc ^2(c+d x) \sec ^4(c+d x)}{(a+a \sin (c+d x))^2} \, dx=\frac {2 \text {arctanh}(\cos (c+d x))}{a^2 d}-\frac {\cot (c+d x)}{a^2 d}-\frac {2 \sec (c+d x)}{a^2 d}-\frac {2 \sec ^3(c+d x)}{3 a^2 d}-\frac {2 \sec ^5(c+d x)}{5 a^2 d}-\frac {2 \sec ^7(c+d x)}{7 a^2 d}+\frac {5 \tan (c+d x)}{a^2 d}+\frac {3 \tan ^3(c+d x)}{a^2 d}+\frac {7 \tan ^5(c+d x)}{5 a^2 d}+\frac {2 \tan ^7(c+d x)}{7 a^2 d} \] Output:

2*arctanh(cos(d*x+c))/a^2/d-cot(d*x+c)/a^2/d-2*sec(d*x+c)/a^2/d-2/3*sec(d* 
x+c)^3/a^2/d-2/5*sec(d*x+c)^5/a^2/d-2/7*sec(d*x+c)^7/a^2/d+5*tan(d*x+c)/a^ 
2/d+3*tan(d*x+c)^3/a^2/d+7/5*tan(d*x+c)^5/a^2/d+2/7*tan(d*x+c)^7/a^2/d
 

Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(442\) vs. \(2(164)=328\).

Time = 6.41 (sec) , antiderivative size = 442, normalized size of antiderivative = 2.70 \[ \int \frac {\csc ^2(c+d x) \sec ^4(c+d x)}{(a+a \sin (c+d x))^2} \, dx=\frac {16 \left (-\frac {\cot \left (\frac {1}{2} (c+d x)\right )}{32 d}+\frac {\log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )}{8 d}-\frac {\log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )}{8 d}+\frac {1}{768 d \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )^2}+\frac {\sin \left (\frac {1}{2} (c+d x)\right )}{384 d \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )^3}+\frac {13 \sin \left (\frac {1}{2} (c+d x)\right )}{384 d \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )}+\frac {\sin \left (\frac {1}{2} (c+d x)\right )}{224 d \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )^7}-\frac {1}{448 d \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )^6}+\frac {3 \sin \left (\frac {1}{2} (c+d x)\right )}{140 d \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )^5}-\frac {3}{280 d \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )^4}+\frac {997 \sin \left (\frac {1}{2} (c+d x)\right )}{13440 d \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )^3}-\frac {997}{26880 d \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )^2}+\frac {4777 \sin \left (\frac {1}{2} (c+d x)\right )}{13440 d \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )}+\frac {\tan \left (\frac {1}{2} (c+d x)\right )}{32 d}\right )}{a^2} \] Input:

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

Output:

(16*(-1/32*Cot[(c + d*x)/2]/d + Log[Cos[(c + d*x)/2]]/(8*d) - Log[Sin[(c + 
 d*x)/2]]/(8*d) + 1/(768*d*(Cos[(c + d*x)/2] - Sin[(c + d*x)/2])^2) + Sin[ 
(c + d*x)/2]/(384*d*(Cos[(c + d*x)/2] - Sin[(c + d*x)/2])^3) + (13*Sin[(c 
+ d*x)/2])/(384*d*(Cos[(c + d*x)/2] - Sin[(c + d*x)/2])) + Sin[(c + d*x)/2 
]/(224*d*(Cos[(c + d*x)/2] + Sin[(c + d*x)/2])^7) - 1/(448*d*(Cos[(c + d*x 
)/2] + Sin[(c + d*x)/2])^6) + (3*Sin[(c + d*x)/2])/(140*d*(Cos[(c + d*x)/2 
] + Sin[(c + d*x)/2])^5) - 3/(280*d*(Cos[(c + d*x)/2] + Sin[(c + d*x)/2])^ 
4) + (997*Sin[(c + d*x)/2])/(13440*d*(Cos[(c + d*x)/2] + Sin[(c + d*x)/2]) 
^3) - 997/(26880*d*(Cos[(c + d*x)/2] + Sin[(c + d*x)/2])^2) + (4777*Sin[(c 
 + d*x)/2])/(13440*d*(Cos[(c + d*x)/2] + Sin[(c + d*x)/2])) + Tan[(c + d*x 
)/2]/(32*d)))/a^2
 

Rubi [A] (verified)

Time = 0.62 (sec) , antiderivative size = 168, normalized size of antiderivative = 1.02, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.172, 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 ^2(c+d x) \sec ^4(c+d x)}{(a \sin (c+d x)+a)^2} \, dx\)

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3354

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3352

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

\(\Big \downarrow \) 2009

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

Input:

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

Output:

((2*a^2*ArcTanh[Cos[c + d*x]])/d - (a^2*Cot[c + d*x])/d - (2*a^2*Sec[c + d 
*x])/d - (2*a^2*Sec[c + d*x]^3)/(3*d) - (2*a^2*Sec[c + d*x]^5)/(5*d) - (2* 
a^2*Sec[c + d*x]^7)/(7*d) + (5*a^2*Tan[c + d*x])/d + (3*a^2*Tan[c + d*x]^3 
)/d + (7*a^2*Tan[c + d*x]^5)/(5*d) + (2*a^2*Tan[c + d*x]^7)/(7*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 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.47 (sec) , antiderivative size = 194, normalized size of antiderivative = 1.18

method result size
derivativedivides \(\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-\frac {1}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}-4 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )-\frac {1}{6 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{3}}-\frac {1}{4 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{2}}-\frac {5}{4 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}-\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 {48}{5 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{5}}+\frac {14}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{4}}-\frac {107}{6 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}+\frac {59}{4 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}-\frac {75}{4 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}}{2 d \,a^{2}}\) \(194\)
default \(\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-\frac {1}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}-4 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )-\frac {1}{6 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{3}}-\frac {1}{4 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{2}}-\frac {5}{4 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}-\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 {48}{5 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{5}}+\frac {14}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{4}}-\frac {107}{6 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}+\frac {59}{4 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}-\frac {75}{4 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}}{2 d \,a^{2}}\) \(194\)
parallelrisch \(\frac {-420 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{3} \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 )+105 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{11}-3570 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{9}-7560 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}+1575 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}+18480 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}+11172 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}-12992 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}-16409 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}-816 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+105 \cot \left (\frac {d x}{2}+\frac {c}{2}\right )+5422 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+2248}{210 d \,a^{2} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{3} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{7}}\) \(214\)
risch \(-\frac {4 \left (-385 \,{\mathrm e}^{9 i \left (d x +c \right )}+420 i {\mathrm e}^{10 i \left (d x +c \right )}-1274 \,{\mathrm e}^{7 i \left (d x +c \right )}+560 i {\mathrm e}^{8 i \left (d x +c \right )}-616 i {\mathrm e}^{6 i \left (d x +c \right )}+1249 \,{\mathrm e}^{3 i \left (d x +c \right )}-1816 i {\mathrm e}^{4 i \left (d x +c \right )}+759 \,{\mathrm e}^{i \left (d x +c \right )}-444 i {\mathrm e}^{2 i \left (d x +c \right )}+216 i-454 \,{\mathrm e}^{5 i \left (d x +c \right )}+105 \,{\mathrm e}^{11 i \left (d x +c \right )}\right )}{105 \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right ) \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )^{7} \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )^{3} d \,a^{2}}-\frac {2 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{d \,a^{2}}+\frac {2 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{d \,a^{2}}\) \(220\)
norman \(\frac {\frac {1}{2 a d}+\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{12}}{2 a d}+\frac {266 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}}{5 d a}-\frac {93 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{9}}{4 d a}+\frac {17 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{11}}{4 a d}-\frac {53 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}}{2 d a}+\frac {57 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{2 d a}+\frac {2711 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{420 d a}+\frac {926 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}{105 d a}-\frac {71 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{30 d a}-\frac {2329 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{140 d a}-\frac {9269 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}}{210 d a}}{a \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{3} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{7}}-\frac {2 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d \,a^{2}}\) \(277\)

Input:

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

Output:

1/2/d/a^2*(tan(1/2*d*x+1/2*c)-1/tan(1/2*d*x+1/2*c)-4*ln(tan(1/2*d*x+1/2*c) 
)-1/6/(tan(1/2*d*x+1/2*c)-1)^3-1/4/(tan(1/2*d*x+1/2*c)-1)^2-5/4/(tan(1/2*d 
*x+1/2*c)-1)-8/7/(tan(1/2*d*x+1/2*c)+1)^7+4/(tan(1/2*d*x+1/2*c)+1)^6-48/5/ 
(tan(1/2*d*x+1/2*c)+1)^5+14/(tan(1/2*d*x+1/2*c)+1)^4-107/6/(tan(1/2*d*x+1/ 
2*c)+1)^3+59/4/(tan(1/2*d*x+1/2*c)+1)^2-75/4/(tan(1/2*d*x+1/2*c)+1))
 

Fricas [A] (verification not implemented)

Time = 0.09 (sec) , antiderivative size = 250, normalized size of antiderivative = 1.52 \[ \int \frac {\csc ^2(c+d x) \sec ^4(c+d x)}{(a+a \sin (c+d x))^2} \, dx=-\frac {432 \, \cos \left (d x + c\right )^{6} - 660 \, \cos \left (d x + c\right )^{4} + 98 \, \cos \left (d x + c\right )^{2} - 105 \, {\left (2 \, \cos \left (d x + c\right )^{5} - 2 \, \cos \left (d x + c\right )^{3} + {\left (\cos \left (d x + c\right )^{5} - 2 \, \cos \left (d x + c\right )^{3}\right )} \sin \left (d x + c\right )\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) + 105 \, {\left (2 \, \cos \left (d x + c\right )^{5} - 2 \, \cos \left (d x + c\right )^{3} + {\left (\cos \left (d x + c\right )^{5} - 2 \, \cos \left (d x + c\right )^{3}\right )} \sin \left (d x + c\right )\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - 2 \, {\left (327 \, \cos \left (d x + c\right )^{4} - 41 \, \cos \left (d x + c\right )^{2} - 5\right )} \sin \left (d x + c\right ) + 25}{105 \, {\left (2 \, a^{2} d \cos \left (d x + c\right )^{5} - 2 \, a^{2} d \cos \left (d x + c\right )^{3} + {\left (a^{2} d \cos \left (d x + c\right )^{5} - 2 \, a^{2} d \cos \left (d x + c\right )^{3}\right )} \sin \left (d x + c\right )\right )}} \] Input:

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

Output:

-1/105*(432*cos(d*x + c)^6 - 660*cos(d*x + c)^4 + 98*cos(d*x + c)^2 - 105* 
(2*cos(d*x + c)^5 - 2*cos(d*x + c)^3 + (cos(d*x + c)^5 - 2*cos(d*x + c)^3) 
*sin(d*x + c))*log(1/2*cos(d*x + c) + 1/2) + 105*(2*cos(d*x + c)^5 - 2*cos 
(d*x + c)^3 + (cos(d*x + c)^5 - 2*cos(d*x + c)^3)*sin(d*x + c))*log(-1/2*c 
os(d*x + c) + 1/2) - 2*(327*cos(d*x + c)^4 - 41*cos(d*x + c)^2 - 5)*sin(d* 
x + c) + 25)/(2*a^2*d*cos(d*x + c)^5 - 2*a^2*d*cos(d*x + c)^3 + (a^2*d*cos 
(d*x + c)^5 - 2*a^2*d*cos(d*x + c)^3)*sin(d*x + c))
 

Sympy [F(-1)]

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

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

Output:

Timed out
 

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 481 vs. \(2 (154) = 308\).

Time = 0.04 (sec) , antiderivative size = 481, normalized size of antiderivative = 2.93 \[ \int \frac {\csc ^2(c+d x) \sec ^4(c+d x)}{(a+a \sin (c+d x))^2} \, dx =\text {Too large to display} \] Input:

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

Output:

-1/210*((1828*sin(d*x + c)/(cos(d*x + c) + 1) + 3847*sin(d*x + c)^2/(cos(d 
*x + c) + 1)^2 - 1656*sin(d*x + c)^3/(cos(d*x + c) + 1)^3 - 12734*sin(d*x 
+ c)^4/(cos(d*x + c) + 1)^4 - 7952*sin(d*x + c)^5/(cos(d*x + c) + 1)^5 + 9 
702*sin(d*x + c)^6/(cos(d*x + c) + 1)^6 + 12600*sin(d*x + c)^7/(cos(d*x + 
c) + 1)^7 - 315*sin(d*x + c)^8/(cos(d*x + c) + 1)^8 - 5460*sin(d*x + c)^9/ 
(cos(d*x + c) + 1)^9 - 2205*sin(d*x + c)^10/(cos(d*x + c) + 1)^10 + 105)/( 
a^2*sin(d*x + c)/(cos(d*x + c) + 1) + 4*a^2*sin(d*x + c)^2/(cos(d*x + c) + 
 1)^2 + 3*a^2*sin(d*x + c)^3/(cos(d*x + c) + 1)^3 - 8*a^2*sin(d*x + c)^4/( 
cos(d*x + c) + 1)^4 - 14*a^2*sin(d*x + c)^5/(cos(d*x + c) + 1)^5 + 14*a^2* 
sin(d*x + c)^7/(cos(d*x + c) + 1)^7 + 8*a^2*sin(d*x + c)^8/(cos(d*x + c) + 
 1)^8 - 3*a^2*sin(d*x + c)^9/(cos(d*x + c) + 1)^9 - 4*a^2*sin(d*x + c)^10/ 
(cos(d*x + c) + 1)^10 - a^2*sin(d*x + c)^11/(cos(d*x + c) + 1)^11) + 420*l 
og(sin(d*x + c)/(cos(d*x + c) + 1))/a^2 - 105*sin(d*x + c)/(a^2*(cos(d*x + 
 c) + 1)))/d
 

Giac [A] (verification not implemented)

Time = 0.17 (sec) , antiderivative size = 204, normalized size of antiderivative = 1.24 \[ \int \frac {\csc ^2(c+d x) \sec ^4(c+d x)}{(a+a \sin (c+d x))^2} \, dx=-\frac {\frac {1680 \, \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right )}{a^{2}} - \frac {420 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a^{2}} - \frac {420 \, {\left (4 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1\right )}}{a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )} + \frac {35 \, {\left (15 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 27 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 14\right )}}{a^{2} {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1\right )}^{3}} + \frac {7875 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} + 41055 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 94640 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 119630 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 87507 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 34979 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 6122}{a^{2} {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right )}^{7}}}{840 \, d} \] Input:

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

Output:

-1/840*(1680*log(abs(tan(1/2*d*x + 1/2*c)))/a^2 - 420*tan(1/2*d*x + 1/2*c) 
/a^2 - 420*(4*tan(1/2*d*x + 1/2*c) - 1)/(a^2*tan(1/2*d*x + 1/2*c)) + 35*(1 
5*tan(1/2*d*x + 1/2*c)^2 - 27*tan(1/2*d*x + 1/2*c) + 14)/(a^2*(tan(1/2*d*x 
 + 1/2*c) - 1)^3) + (7875*tan(1/2*d*x + 1/2*c)^6 + 41055*tan(1/2*d*x + 1/2 
*c)^5 + 94640*tan(1/2*d*x + 1/2*c)^4 + 119630*tan(1/2*d*x + 1/2*c)^3 + 875 
07*tan(1/2*d*x + 1/2*c)^2 + 34979*tan(1/2*d*x + 1/2*c) + 6122)/(a^2*(tan(1 
/2*d*x + 1/2*c) + 1)^7))/d
 

Mupad [B] (verification not implemented)

Time = 35.15 (sec) , antiderivative size = 331, normalized size of antiderivative = 2.02 \[ \int \frac {\csc ^2(c+d x) \sec ^4(c+d x)}{(a+a \sin (c+d x))^2} \, dx=\frac {21\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}+52\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9+3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8-120\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7-\frac {462\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6}{5}+\frac {1136\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{15}+\frac {12734\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{105}+\frac {552\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{35}-\frac {3847\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{105}-\frac {1828\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{105}-1}{d\,\left (-2\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{11}-8\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}-6\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9+16\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8+28\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7-28\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5-16\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+6\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+8\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+2\,a^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}-\frac {2\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{a^2\,d}+\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2\,a^2\,d} \] Input:

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

Output:

((552*tan(c/2 + (d*x)/2)^3)/35 - (3847*tan(c/2 + (d*x)/2)^2)/105 - (1828*t 
an(c/2 + (d*x)/2))/105 + (12734*tan(c/2 + (d*x)/2)^4)/105 + (1136*tan(c/2 
+ (d*x)/2)^5)/15 - (462*tan(c/2 + (d*x)/2)^6)/5 - 120*tan(c/2 + (d*x)/2)^7 
 + 3*tan(c/2 + (d*x)/2)^8 + 52*tan(c/2 + (d*x)/2)^9 + 21*tan(c/2 + (d*x)/2 
)^10 - 1)/(d*(8*a^2*tan(c/2 + (d*x)/2)^2 + 6*a^2*tan(c/2 + (d*x)/2)^3 - 16 
*a^2*tan(c/2 + (d*x)/2)^4 - 28*a^2*tan(c/2 + (d*x)/2)^5 + 28*a^2*tan(c/2 + 
 (d*x)/2)^7 + 16*a^2*tan(c/2 + (d*x)/2)^8 - 6*a^2*tan(c/2 + (d*x)/2)^9 - 8 
*a^2*tan(c/2 + (d*x)/2)^10 - 2*a^2*tan(c/2 + (d*x)/2)^11 + 2*a^2*tan(c/2 + 
 (d*x)/2))) - (2*log(tan(c/2 + (d*x)/2)))/(a^2*d) + tan(c/2 + (d*x)/2)/(2* 
a^2*d)
 

Reduce [B] (verification not implemented)

Time = 0.19 (sec) , antiderivative size = 278, normalized size of antiderivative = 1.70 \[ \int \frac {\csc ^2(c+d x) \sec ^4(c+d x)}{(a+a \sin (c+d x))^2} \, dx=\frac {-840 \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 )^{5}-1680 \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 )^{4}+1680 \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}+840 \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 )-463 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{5}-926 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{4}+926 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{2}+463 \cos \left (d x +c \right ) \sin \left (d x +c \right )+1728 \sin \left (d x +c \right )^{6}+2616 \sin \left (d x +c \right )^{5}-2544 \sin \left (d x +c \right )^{4}-4904 \sin \left (d x +c \right )^{3}+296 \sin \left (d x +c \right )^{2}+2248 \sin \left (d x +c \right )+420}{420 \cos \left (d x +c \right ) \sin \left (d x +c \right ) a^{2} d \left (\sin \left (d x +c \right )^{4}+2 \sin \left (d x +c \right )^{3}-2 \sin \left (d x +c \right )-1\right )} \] Input:

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

Output:

( - 840*cos(c + d*x)*log(tan((c + d*x)/2))*sin(c + d*x)**5 - 1680*cos(c + 
d*x)*log(tan((c + d*x)/2))*sin(c + d*x)**4 + 1680*cos(c + d*x)*log(tan((c 
+ d*x)/2))*sin(c + d*x)**2 + 840*cos(c + d*x)*log(tan((c + d*x)/2))*sin(c 
+ d*x) - 463*cos(c + d*x)*sin(c + d*x)**5 - 926*cos(c + d*x)*sin(c + d*x)* 
*4 + 926*cos(c + d*x)*sin(c + d*x)**2 + 463*cos(c + d*x)*sin(c + d*x) + 17 
28*sin(c + d*x)**6 + 2616*sin(c + d*x)**5 - 2544*sin(c + d*x)**4 - 4904*si 
n(c + d*x)**3 + 296*sin(c + d*x)**2 + 2248*sin(c + d*x) + 420)/(420*cos(c 
+ d*x)*sin(c + d*x)*a**2*d*(sin(c + d*x)**4 + 2*sin(c + d*x)**3 - 2*sin(c 
+ d*x) - 1))