Integrand size = 27, antiderivative size = 176 \[ \int \frac {\cot ^8(c+d x) \csc (c+d x)}{(a+a \sin (c+d x))^2} \, dx=-\frac {11 \text {arctanh}(\cos (c+d x))}{128 a^2 d}+\frac {2 \cot ^5(c+d x)}{5 a^2 d}+\frac {2 \cot ^7(c+d x)}{7 a^2 d}-\frac {11 \cot (c+d x) \csc (c+d x)}{128 a^2 d}+\frac {7 \cot (c+d x) \csc ^3(c+d x)}{64 a^2 d}-\frac {\cot ^3(c+d x) \csc ^3(c+d x)}{6 a^2 d}+\frac {\cot (c+d x) \csc ^5(c+d x)}{16 a^2 d}-\frac {\cot ^3(c+d x) \csc ^5(c+d x)}{8 a^2 d} \] Output:
-11/128*arctanh(cos(d*x+c))/a^2/d+2/5*cot(d*x+c)^5/a^2/d+2/7*cot(d*x+c)^7/ a^2/d-11/128*cot(d*x+c)*csc(d*x+c)/a^2/d+7/64*cot(d*x+c)*csc(d*x+c)^3/a^2/ d-1/6*cot(d*x+c)^3*csc(d*x+c)^3/a^2/d+1/16*cot(d*x+c)*csc(d*x+c)^5/a^2/d-1 /8*cot(d*x+c)^3*csc(d*x+c)^5/a^2/d
Time = 3.72 (sec) , antiderivative size = 291, normalized size of antiderivative = 1.65 \[ \int \frac {\cot ^8(c+d x) \csc (c+d x)}{(a+a \sin (c+d x))^2} \, dx=-\frac {\csc ^8(c+d x) \left (158270 \cos (c+d x)+77210 \cos (3 (c+d x))-18130 \cos (5 (c+d x))-2310 \cos (7 (c+d x))+40425 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )-64680 \cos (2 (c+d x)) \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )+32340 \cos (4 (c+d x)) \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )-9240 \cos (6 (c+d x)) \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )+1155 \cos (8 (c+d x)) \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )-40425 \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )+64680 \cos (2 (c+d x)) \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )-32340 \cos (4 (c+d x)) \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )+9240 \cos (6 (c+d x)) \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )-1155 \cos (8 (c+d x)) \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )-86016 \sin (2 (c+d x))-64512 \sin (4 (c+d x))-12288 \sin (6 (c+d x))+1536 \sin (8 (c+d x))\right )}{1720320 a^2 d} \] Input:
Integrate[(Cot[c + d*x]^8*Csc[c + d*x])/(a + a*Sin[c + d*x])^2,x]
Output:
-1/1720320*(Csc[c + d*x]^8*(158270*Cos[c + d*x] + 77210*Cos[3*(c + d*x)] - 18130*Cos[5*(c + d*x)] - 2310*Cos[7*(c + d*x)] + 40425*Log[Cos[(c + d*x)/ 2]] - 64680*Cos[2*(c + d*x)]*Log[Cos[(c + d*x)/2]] + 32340*Cos[4*(c + d*x) ]*Log[Cos[(c + d*x)/2]] - 9240*Cos[6*(c + d*x)]*Log[Cos[(c + d*x)/2]] + 11 55*Cos[8*(c + d*x)]*Log[Cos[(c + d*x)/2]] - 40425*Log[Sin[(c + d*x)/2]] + 64680*Cos[2*(c + d*x)]*Log[Sin[(c + d*x)/2]] - 32340*Cos[4*(c + d*x)]*Log[ Sin[(c + d*x)/2]] + 9240*Cos[6*(c + d*x)]*Log[Sin[(c + d*x)/2]] - 1155*Cos [8*(c + d*x)]*Log[Sin[(c + d*x)/2]] - 86016*Sin[2*(c + d*x)] - 64512*Sin[4 *(c + d*x)] - 12288*Sin[6*(c + d*x)] + 1536*Sin[8*(c + d*x)]))/(a^2*d)
Time = 0.70 (sec) , antiderivative size = 180, 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.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 {\cot ^8(c+d x) \csc (c+d x)}{(a \sin (c+d x)+a)^2} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\cos (c+d x)^8}{\sin (c+d x)^9 (a \sin (c+d x)+a)^2}dx\) |
\(\Big \downarrow \) 3354 |
\(\displaystyle \frac {\int \cot ^4(c+d x) \csc ^5(c+d x) (a-a \sin (c+d x))^2dx}{a^4}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \frac {\cos (c+d x)^4 (a-a \sin (c+d x))^2}{\sin (c+d x)^9}dx}{a^4}\) |
\(\Big \downarrow \) 3352 |
\(\displaystyle \frac {\int \left (a^2 \cot ^4(c+d x) \csc ^5(c+d x)-2 a^2 \cot ^4(c+d x) \csc ^4(c+d x)+a^2 \cot ^4(c+d x) \csc ^3(c+d x)\right )dx}{a^4}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {-\frac {11 a^2 \text {arctanh}(\cos (c+d x))}{128 d}+\frac {2 a^2 \cot ^7(c+d x)}{7 d}+\frac {2 a^2 \cot ^5(c+d x)}{5 d}-\frac {a^2 \cot ^3(c+d x) \csc ^5(c+d x)}{8 d}-\frac {a^2 \cot ^3(c+d x) \csc ^3(c+d x)}{6 d}+\frac {a^2 \cot (c+d x) \csc ^5(c+d x)}{16 d}+\frac {7 a^2 \cot (c+d x) \csc ^3(c+d x)}{64 d}-\frac {11 a^2 \cot (c+d x) \csc (c+d x)}{128 d}}{a^4}\) |
Input:
Int[(Cot[c + d*x]^8*Csc[c + d*x])/(a + a*Sin[c + d*x])^2,x]
Output:
((-11*a^2*ArcTanh[Cos[c + d*x]])/(128*d) + (2*a^2*Cot[c + d*x]^5)/(5*d) + (2*a^2*Cot[c + d*x]^7)/(7*d) - (11*a^2*Cot[c + d*x]*Csc[c + d*x])/(128*d) + (7*a^2*Cot[c + d*x]*Csc[c + d*x]^3)/(64*d) - (a^2*Cot[c + d*x]^3*Csc[c + d*x]^3)/(6*d) + (a^2*Cot[c + d*x]*Csc[c + d*x]^5)/(16*d) - (a^2*Cot[c + d *x]^3*Csc[c + d*x]^5)/(8*d))/a^4
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]
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]
Result contains complex when optimal does not.
Time = 7.08 (sec) , antiderivative size = 214, normalized size of antiderivative = 1.22
method | result | size |
risch | \(\frac {1155 \,{\mathrm e}^{15 i \left (d x +c \right )}-53760 i {\mathrm e}^{12 i \left (d x +c \right )}+9065 \,{\mathrm e}^{13 i \left (d x +c \right )}-38605 \,{\mathrm e}^{11 i \left (d x +c \right )}-53760 i {\mathrm e}^{8 i \left (d x +c \right )}-79135 \,{\mathrm e}^{9 i \left (d x +c \right )}+86016 i {\mathrm e}^{6 i \left (d x +c \right )}-79135 \,{\mathrm e}^{7 i \left (d x +c \right )}+10752 i {\mathrm e}^{4 i \left (d x +c \right )}-38605 \,{\mathrm e}^{5 i \left (d x +c \right )}+12288 i {\mathrm e}^{2 i \left (d x +c \right )}+9065 \,{\mathrm e}^{3 i \left (d x +c \right )}-1536 i+1155 \,{\mathrm e}^{i \left (d x +c \right )}}{6720 d \,a^{2} \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{8}}-\frac {11 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{128 d \,a^{2}}+\frac {11 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{128 d \,a^{2}}\) | \(214\) |
derivativedivides | \(\frac {\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}}{8}-\frac {4 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{7}+\frac {2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}}{3}+\frac {4 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{5}-3 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}+4 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}-2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-12 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+22 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\frac {12}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}-\frac {4}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}+\frac {2}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}-\frac {4}{5 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}+\frac {4}{7 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}+\frac {3}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}}-\frac {2}{3 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}}-\frac {1}{8 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}}}{256 d \,a^{2}}\) | \(228\) |
default | \(\frac {\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}}{8}-\frac {4 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{7}+\frac {2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}}{3}+\frac {4 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{5}-3 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}+4 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}-2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-12 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+22 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\frac {12}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}-\frac {4}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}+\frac {2}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}-\frac {4}{5 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}+\frac {4}{7 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}+\frac {3}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}}-\frac {2}{3 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}}-\frac {1}{8 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}}}{256 d \,a^{2}}\) | \(228\) |
Input:
int(cot(d*x+c)^8*csc(d*x+c)/(a+a*sin(d*x+c))^2,x,method=_RETURNVERBOSE)
Output:
1/6720*(1155*exp(15*I*(d*x+c))-53760*I*exp(12*I*(d*x+c))+9065*exp(13*I*(d* x+c))-38605*exp(11*I*(d*x+c))-53760*I*exp(8*I*(d*x+c))-79135*exp(9*I*(d*x+ c))+86016*I*exp(6*I*(d*x+c))-79135*exp(7*I*(d*x+c))+10752*I*exp(4*I*(d*x+c ))-38605*exp(5*I*(d*x+c))+12288*I*exp(2*I*(d*x+c))+9065*exp(3*I*(d*x+c))-1 536*I+1155*exp(I*(d*x+c)))/d/a^2/(exp(2*I*(d*x+c))-1)^8-11/128/d/a^2*ln(ex p(I*(d*x+c))+1)+11/128/d/a^2*ln(exp(I*(d*x+c))-1)
Time = 0.09 (sec) , antiderivative size = 239, normalized size of antiderivative = 1.36 \[ \int \frac {\cot ^8(c+d x) \csc (c+d x)}{(a+a \sin (c+d x))^2} \, dx=\frac {2310 \, \cos \left (d x + c\right )^{7} + 490 \, \cos \left (d x + c\right )^{5} - 8470 \, \cos \left (d x + c\right )^{3} - 1155 \, {\left (\cos \left (d x + c\right )^{8} - 4 \, \cos \left (d x + c\right )^{6} + 6 \, \cos \left (d x + c\right )^{4} - 4 \, \cos \left (d x + c\right )^{2} + 1\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) + 1155 \, {\left (\cos \left (d x + c\right )^{8} - 4 \, \cos \left (d x + c\right )^{6} + 6 \, \cos \left (d x + c\right )^{4} - 4 \, \cos \left (d x + c\right )^{2} + 1\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - 1536 \, {\left (2 \, \cos \left (d x + c\right )^{7} - 7 \, \cos \left (d x + c\right )^{5}\right )} \sin \left (d x + c\right ) + 2310 \, \cos \left (d x + c\right )}{26880 \, {\left (a^{2} d \cos \left (d x + c\right )^{8} - 4 \, a^{2} d \cos \left (d x + c\right )^{6} + 6 \, a^{2} d \cos \left (d x + c\right )^{4} - 4 \, a^{2} d \cos \left (d x + c\right )^{2} + a^{2} d\right )}} \] Input:
integrate(cot(d*x+c)^8*csc(d*x+c)/(a+a*sin(d*x+c))^2,x, algorithm="fricas" )
Output:
1/26880*(2310*cos(d*x + c)^7 + 490*cos(d*x + c)^5 - 8470*cos(d*x + c)^3 - 1155*(cos(d*x + c)^8 - 4*cos(d*x + c)^6 + 6*cos(d*x + c)^4 - 4*cos(d*x + c )^2 + 1)*log(1/2*cos(d*x + c) + 1/2) + 1155*(cos(d*x + c)^8 - 4*cos(d*x + c)^6 + 6*cos(d*x + c)^4 - 4*cos(d*x + c)^2 + 1)*log(-1/2*cos(d*x + c) + 1/ 2) - 1536*(2*cos(d*x + c)^7 - 7*cos(d*x + c)^5)*sin(d*x + c) + 2310*cos(d* x + c))/(a^2*d*cos(d*x + c)^8 - 4*a^2*d*cos(d*x + c)^6 + 6*a^2*d*cos(d*x + c)^4 - 4*a^2*d*cos(d*x + c)^2 + a^2*d)
Timed out. \[ \int \frac {\cot ^8(c+d x) \csc (c+d x)}{(a+a \sin (c+d x))^2} \, dx=\text {Timed out} \] Input:
integrate(cot(d*x+c)**8*csc(d*x+c)/(a+a*sin(d*x+c))**2,x)
Output:
Timed out
Leaf count of result is larger than twice the leaf count of optimal. 355 vs. \(2 (160) = 320\).
Time = 0.04 (sec) , antiderivative size = 355, normalized size of antiderivative = 2.02 \[ \int \frac {\cot ^8(c+d x) \csc (c+d x)}{(a+a \sin (c+d x))^2} \, dx=-\frac {\frac {\frac {10080 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {1680 \, \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} - \frac {3360 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {2520 \, \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} - \frac {672 \, \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}} - \frac {560 \, \sin \left (d x + c\right )^{6}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{6}} + \frac {480 \, \sin \left (d x + c\right )^{7}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{7}} - \frac {105 \, \sin \left (d x + c\right )^{8}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{8}}}{a^{2}} - \frac {18480 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a^{2}} - \frac {{\left (\frac {480 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {560 \, \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} - \frac {672 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {2520 \, \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} - \frac {3360 \, \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}} + \frac {1680 \, \sin \left (d x + c\right )^{6}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{6}} + \frac {10080 \, \sin \left (d x + c\right )^{7}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{7}} - 105\right )} {\left (\cos \left (d x + c\right ) + 1\right )}^{8}}{a^{2} \sin \left (d x + c\right )^{8}}}{215040 \, d} \] Input:
integrate(cot(d*x+c)^8*csc(d*x+c)/(a+a*sin(d*x+c))^2,x, algorithm="maxima" )
Output:
-1/215040*((10080*sin(d*x + c)/(cos(d*x + c) + 1) + 1680*sin(d*x + c)^2/(c os(d*x + c) + 1)^2 - 3360*sin(d*x + c)^3/(cos(d*x + c) + 1)^3 + 2520*sin(d *x + c)^4/(cos(d*x + c) + 1)^4 - 672*sin(d*x + c)^5/(cos(d*x + c) + 1)^5 - 560*sin(d*x + c)^6/(cos(d*x + c) + 1)^6 + 480*sin(d*x + c)^7/(cos(d*x + c ) + 1)^7 - 105*sin(d*x + c)^8/(cos(d*x + c) + 1)^8)/a^2 - 18480*log(sin(d* x + c)/(cos(d*x + c) + 1))/a^2 - (480*sin(d*x + c)/(cos(d*x + c) + 1) - 56 0*sin(d*x + c)^2/(cos(d*x + c) + 1)^2 - 672*sin(d*x + c)^3/(cos(d*x + c) + 1)^3 + 2520*sin(d*x + c)^4/(cos(d*x + c) + 1)^4 - 3360*sin(d*x + c)^5/(co s(d*x + c) + 1)^5 + 1680*sin(d*x + c)^6/(cos(d*x + c) + 1)^6 + 10080*sin(d *x + c)^7/(cos(d*x + c) + 1)^7 - 105)*(cos(d*x + c) + 1)^8/(a^2*sin(d*x + c)^8))/d
Time = 0.18 (sec) , antiderivative size = 273, normalized size of antiderivative = 1.55 \[ \int \frac {\cot ^8(c+d x) \csc (c+d x)}{(a+a \sin (c+d x))^2} \, dx=\frac {\frac {18480 \, \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right )}{a^{2}} - \frac {50226 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{8} - 10080 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 1680 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} + 3360 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 2520 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 672 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 560 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 480 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 105}{a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{8}} + \frac {105 \, a^{14} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{8} - 480 \, a^{14} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 560 \, a^{14} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} + 672 \, a^{14} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 2520 \, a^{14} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 3360 \, a^{14} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 1680 \, a^{14} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 10080 \, a^{14} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a^{16}}}{215040 \, d} \] Input:
integrate(cot(d*x+c)^8*csc(d*x+c)/(a+a*sin(d*x+c))^2,x, algorithm="giac")
Output:
1/215040*(18480*log(abs(tan(1/2*d*x + 1/2*c)))/a^2 - (50226*tan(1/2*d*x + 1/2*c)^8 - 10080*tan(1/2*d*x + 1/2*c)^7 - 1680*tan(1/2*d*x + 1/2*c)^6 + 33 60*tan(1/2*d*x + 1/2*c)^5 - 2520*tan(1/2*d*x + 1/2*c)^4 + 672*tan(1/2*d*x + 1/2*c)^3 + 560*tan(1/2*d*x + 1/2*c)^2 - 480*tan(1/2*d*x + 1/2*c) + 105)/ (a^2*tan(1/2*d*x + 1/2*c)^8) + (105*a^14*tan(1/2*d*x + 1/2*c)^8 - 480*a^14 *tan(1/2*d*x + 1/2*c)^7 + 560*a^14*tan(1/2*d*x + 1/2*c)^6 + 672*a^14*tan(1 /2*d*x + 1/2*c)^5 - 2520*a^14*tan(1/2*d*x + 1/2*c)^4 + 3360*a^14*tan(1/2*d *x + 1/2*c)^3 - 1680*a^14*tan(1/2*d*x + 1/2*c)^2 - 10080*a^14*tan(1/2*d*x + 1/2*c))/a^16)/d
Time = 33.82 (sec) , antiderivative size = 435, normalized size of antiderivative = 2.47 \[ \int \frac {\cot ^8(c+d x) \csc (c+d x)}{(a+a \sin (c+d x))^2} \, dx=\frac {105\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{16}-105\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{16}-480\,\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{15}+480\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{15}\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )+560\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{14}+672\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{13}-2520\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{12}+3360\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{11}-1680\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}-10080\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9+10080\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7+1680\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6-3360\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{11}\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+2520\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{12}\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-672\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{13}\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3-560\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{14}\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+18480\,\ln \left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8}{215040\,a^2\,d\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8} \] Input:
int(cot(c + d*x)^8/(sin(c + d*x)*(a + a*sin(c + d*x))^2),x)
Output:
(105*sin(c/2 + (d*x)/2)^16 - 105*cos(c/2 + (d*x)/2)^16 - 480*cos(c/2 + (d* x)/2)*sin(c/2 + (d*x)/2)^15 + 480*cos(c/2 + (d*x)/2)^15*sin(c/2 + (d*x)/2) + 560*cos(c/2 + (d*x)/2)^2*sin(c/2 + (d*x)/2)^14 + 672*cos(c/2 + (d*x)/2) ^3*sin(c/2 + (d*x)/2)^13 - 2520*cos(c/2 + (d*x)/2)^4*sin(c/2 + (d*x)/2)^12 + 3360*cos(c/2 + (d*x)/2)^5*sin(c/2 + (d*x)/2)^11 - 1680*cos(c/2 + (d*x)/ 2)^6*sin(c/2 + (d*x)/2)^10 - 10080*cos(c/2 + (d*x)/2)^7*sin(c/2 + (d*x)/2) ^9 + 10080*cos(c/2 + (d*x)/2)^9*sin(c/2 + (d*x)/2)^7 + 1680*cos(c/2 + (d*x )/2)^10*sin(c/2 + (d*x)/2)^6 - 3360*cos(c/2 + (d*x)/2)^11*sin(c/2 + (d*x)/ 2)^5 + 2520*cos(c/2 + (d*x)/2)^12*sin(c/2 + (d*x)/2)^4 - 672*cos(c/2 + (d* x)/2)^13*sin(c/2 + (d*x)/2)^3 - 560*cos(c/2 + (d*x)/2)^14*sin(c/2 + (d*x)/ 2)^2 + 18480*log(sin(c/2 + (d*x)/2)/cos(c/2 + (d*x)/2))*cos(c/2 + (d*x)/2) ^8*sin(c/2 + (d*x)/2)^8)/(215040*a^2*d*cos(c/2 + (d*x)/2)^8*sin(c/2 + (d*x )/2)^8)
Time = 0.17 (sec) , antiderivative size = 155, normalized size of antiderivative = 0.88 \[ \int \frac {\cot ^8(c+d x) \csc (c+d x)}{(a+a \sin (c+d x))^2} \, dx=\frac {1536 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{7}-1155 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{6}+768 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{5}+3710 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{4}-6144 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{3}+280 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{2}+3840 \cos \left (d x +c \right ) \sin \left (d x +c \right )-1680 \cos \left (d x +c \right )+1155 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \sin \left (d x +c \right )^{8}}{13440 \sin \left (d x +c \right )^{8} a^{2} d} \] Input:
int(cot(d*x+c)^8*csc(d*x+c)/(a+a*sin(d*x+c))^2,x)
Output:
(1536*cos(c + d*x)*sin(c + d*x)**7 - 1155*cos(c + d*x)*sin(c + d*x)**6 + 7 68*cos(c + d*x)*sin(c + d*x)**5 + 3710*cos(c + d*x)*sin(c + d*x)**4 - 6144 *cos(c + d*x)*sin(c + d*x)**3 + 280*cos(c + d*x)*sin(c + d*x)**2 + 3840*co s(c + d*x)*sin(c + d*x) - 1680*cos(c + d*x) + 1155*log(tan((c + d*x)/2))*s in(c + d*x)**8)/(13440*sin(c + d*x)**8*a**2*d)