Integrand size = 27, antiderivative size = 96 \[ \int \frac {\cot ^4(c+d x) \csc (c+d x)}{(a+a \sin (c+d x))^2} \, dx=-\frac {7 \text {arctanh}(\cos (c+d x))}{8 a^2 d}+\frac {2 \cot (c+d x)}{a^2 d}+\frac {2 \cot ^3(c+d x)}{3 a^2 d}-\frac {7 \cot (c+d x) \csc (c+d x)}{8 a^2 d}-\frac {\cot (c+d x) \csc ^3(c+d x)}{4 a^2 d} \] Output:
-7/8*arctanh(cos(d*x+c))/a^2/d+2*cot(d*x+c)/a^2/d+2/3*cot(d*x+c)^3/a^2/d-7 /8*cot(d*x+c)*csc(d*x+c)/a^2/d-1/4*cot(d*x+c)*csc(d*x+c)^3/a^2/d
Time = 1.93 (sec) , antiderivative size = 116, normalized size of antiderivative = 1.21 \[ \int \frac {\cot ^4(c+d x) \csc (c+d x)}{(a+a \sin (c+d x))^2} \, dx=-\frac {\left (\csc \left (\frac {1}{2} (c+d x)\right )+\sec \left (\frac {1}{2} (c+d x)\right )\right )^4 \left (45 \cos (c+d x)+84 \left (\log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )-\log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )\right ) \sin ^4(c+d x)+\cos (3 (c+d x)) (-21+32 \sin (c+d x))-48 \sin (2 (c+d x))\right )}{1536 a^2 d (1+\sin (c+d x))^2} \] Input:
Integrate[(Cot[c + d*x]^4*Csc[c + d*x])/(a + a*Sin[c + d*x])^2,x]
Output:
-1/1536*((Csc[(c + d*x)/2] + Sec[(c + d*x)/2])^4*(45*Cos[c + d*x] + 84*(Lo g[Cos[(c + d*x)/2]] - Log[Sin[(c + d*x)/2]])*Sin[c + d*x]^4 + Cos[3*(c + d *x)]*(-21 + 32*Sin[c + d*x]) - 48*Sin[2*(c + d*x)]))/(a^2*d*(1 + Sin[c + d *x])^2)
Time = 0.47 (sec) , antiderivative size = 100, normalized size of antiderivative = 1.04, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.185, Rules used = {3042, 3348, 3042, 3236, 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 ^4(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)^4}{\sin (c+d x)^5 (a \sin (c+d x)+a)^2}dx\) |
\(\Big \downarrow \) 3348 |
\(\displaystyle \frac {\int \csc ^5(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}{\sin (c+d x)^5}dx}{a^4}\) |
\(\Big \downarrow \) 3236 |
\(\displaystyle \frac {\int \left (a^2 \csc ^5(c+d x)-2 a^2 \csc ^4(c+d x)+a^2 \csc ^3(c+d x)\right )dx}{a^4}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {-\frac {7 a^2 \text {arctanh}(\cos (c+d x))}{8 d}+\frac {2 a^2 \cot ^3(c+d x)}{3 d}+\frac {2 a^2 \cot (c+d x)}{d}-\frac {a^2 \cot (c+d x) \csc ^3(c+d x)}{4 d}-\frac {7 a^2 \cot (c+d x) \csc (c+d x)}{8 d}}{a^4}\) |
Input:
Int[(Cot[c + d*x]^4*Csc[c + d*x])/(a + a*Sin[c + d*x])^2,x]
Output:
((-7*a^2*ArcTanh[Cos[c + d*x]])/(8*d) + (2*a^2*Cot[c + d*x])/d + (2*a^2*Co t[c + d*x]^3)/(3*d) - (7*a^2*Cot[c + d*x]*Csc[c + d*x])/(8*d) - (a^2*Cot[c + d*x]*Csc[c + d*x]^3)/(4*d))/a^4
Int[((d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*( x_)])^(m_.), x_Symbol] :> Int[ExpandTrig[(a + b*sin[e + f*x])^m*(d*sin[e + f*x])^n, x], x] /; FreeQ[{a, b, d, e, f, n}, x] && EqQ[a^2 - b^2, 0] && IGt Q[m, 0] && RationalQ[n]
Int[cos[(e_.) + (f_.)*(x_)]^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> Simp[a^(2*m) Int[(d* Sin[e + f*x])^n/(a - b*Sin[e + f*x])^m, x], x] /; FreeQ[{a, b, d, e, f, n}, x] && EqQ[a^2 - b^2, 0] && IntegersQ[m, p] && EqQ[2*m + p, 0]
Time = 1.95 (sec) , antiderivative size = 124, normalized size of antiderivative = 1.29
method | result | size |
derivativedivides | \(\frac {\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}}{4}-\frac {4 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{3}+4 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-12 \tan \left (\frac {d x}{2}+\frac {c}{2}\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 )^{2}}+14 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\frac {4}{3 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}-\frac {1}{4 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}}}{16 d \,a^{2}}\) | \(124\) |
default | \(\frac {\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}}{4}-\frac {4 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{3}+4 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-12 \tan \left (\frac {d x}{2}+\frac {c}{2}\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 )^{2}}+14 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\frac {4}{3 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}-\frac {1}{4 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}}}{16 d \,a^{2}}\) | \(124\) |
risch | \(\frac {21 \,{\mathrm e}^{7 i \left (d x +c \right )}-96 i {\mathrm e}^{4 i \left (d x +c \right )}-45 \,{\mathrm e}^{5 i \left (d x +c \right )}+128 i {\mathrm e}^{2 i \left (d x +c \right )}-45 \,{\mathrm e}^{3 i \left (d x +c \right )}-32 i+21 \,{\mathrm e}^{i \left (d x +c \right )}}{12 a^{2} d \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{4}}-\frac {7 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{8 d \,a^{2}}+\frac {7 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{8 d \,a^{2}}\) | \(134\) |
Input:
int(cot(d*x+c)^4*csc(d*x+c)/(a+a*sin(d*x+c))^2,x,method=_RETURNVERBOSE)
Output:
1/16/d/a^2*(1/4*tan(1/2*d*x+1/2*c)^4-4/3*tan(1/2*d*x+1/2*c)^3+4*tan(1/2*d* x+1/2*c)^2-12*tan(1/2*d*x+1/2*c)+12/tan(1/2*d*x+1/2*c)-4/tan(1/2*d*x+1/2*c )^2+14*ln(tan(1/2*d*x+1/2*c))+4/3/tan(1/2*d*x+1/2*c)^3-1/4/tan(1/2*d*x+1/2 *c)^4)
Time = 0.08 (sec) , antiderivative size = 149, normalized size of antiderivative = 1.55 \[ \int \frac {\cot ^4(c+d x) \csc (c+d x)}{(a+a \sin (c+d x))^2} \, dx=\frac {42 \, \cos \left (d x + c\right )^{3} - 21 \, {\left (\cos \left (d x + c\right )^{4} - 2 \, \cos \left (d x + c\right )^{2} + 1\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) + 21 \, {\left (\cos \left (d x + c\right )^{4} - 2 \, \cos \left (d x + c\right )^{2} + 1\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - 32 \, {\left (2 \, \cos \left (d x + c\right )^{3} - 3 \, \cos \left (d x + c\right )\right )} \sin \left (d x + c\right ) - 54 \, \cos \left (d x + c\right )}{48 \, {\left (a^{2} d \cos \left (d x + c\right )^{4} - 2 \, a^{2} d \cos \left (d x + c\right )^{2} + a^{2} d\right )}} \] Input:
integrate(cot(d*x+c)^4*csc(d*x+c)/(a+a*sin(d*x+c))^2,x, algorithm="fricas" )
Output:
1/48*(42*cos(d*x + c)^3 - 21*(cos(d*x + c)^4 - 2*cos(d*x + c)^2 + 1)*log(1 /2*cos(d*x + c) + 1/2) + 21*(cos(d*x + c)^4 - 2*cos(d*x + c)^2 + 1)*log(-1 /2*cos(d*x + c) + 1/2) - 32*(2*cos(d*x + c)^3 - 3*cos(d*x + c))*sin(d*x + c) - 54*cos(d*x + c))/(a^2*d*cos(d*x + c)^4 - 2*a^2*d*cos(d*x + c)^2 + a^2 *d)
\[ \int \frac {\cot ^4(c+d x) \csc (c+d x)}{(a+a \sin (c+d x))^2} \, dx=\frac {\int \frac {\cot ^{4}{\left (c + d x \right )} \csc {\left (c + d x \right )}}{\sin ^{2}{\left (c + d x \right )} + 2 \sin {\left (c + d x \right )} + 1}\, dx}{a^{2}} \] Input:
integrate(cot(d*x+c)**4*csc(d*x+c)/(a+a*sin(d*x+c))**2,x)
Output:
Integral(cot(c + d*x)**4*csc(c + d*x)/(sin(c + d*x)**2 + 2*sin(c + d*x) + 1), x)/a**2
Leaf count of result is larger than twice the leaf count of optimal. 195 vs. \(2 (88) = 176\).
Time = 0.04 (sec) , antiderivative size = 195, normalized size of antiderivative = 2.03 \[ \int \frac {\cot ^4(c+d x) \csc (c+d x)}{(a+a \sin (c+d x))^2} \, dx=-\frac {\frac {\frac {144 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {48 \, \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {16 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} - \frac {3 \, \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}}}{a^{2}} - \frac {168 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a^{2}} - \frac {{\left (\frac {16 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {48 \, \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {144 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} - 3\right )} {\left (\cos \left (d x + c\right ) + 1\right )}^{4}}{a^{2} \sin \left (d x + c\right )^{4}}}{192 \, d} \] Input:
integrate(cot(d*x+c)^4*csc(d*x+c)/(a+a*sin(d*x+c))^2,x, algorithm="maxima" )
Output:
-1/192*((144*sin(d*x + c)/(cos(d*x + c) + 1) - 48*sin(d*x + c)^2/(cos(d*x + c) + 1)^2 + 16*sin(d*x + c)^3/(cos(d*x + c) + 1)^3 - 3*sin(d*x + c)^4/(c os(d*x + c) + 1)^4)/a^2 - 168*log(sin(d*x + c)/(cos(d*x + c) + 1))/a^2 - ( 16*sin(d*x + c)/(cos(d*x + c) + 1) - 48*sin(d*x + c)^2/(cos(d*x + c) + 1)^ 2 + 144*sin(d*x + c)^3/(cos(d*x + c) + 1)^3 - 3)*(cos(d*x + c) + 1)^4/(a^2 *sin(d*x + c)^4))/d
Time = 0.15 (sec) , antiderivative size = 157, normalized size of antiderivative = 1.64 \[ \int \frac {\cot ^4(c+d x) \csc (c+d x)}{(a+a \sin (c+d x))^2} \, dx=\frac {\frac {168 \, \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right )}{a^{2}} - \frac {350 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 144 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 48 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 16 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 3}{a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4}} + \frac {3 \, a^{6} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 16 \, a^{6} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 48 \, a^{6} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 144 \, a^{6} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a^{8}}}{192 \, d} \] Input:
integrate(cot(d*x+c)^4*csc(d*x+c)/(a+a*sin(d*x+c))^2,x, algorithm="giac")
Output:
1/192*(168*log(abs(tan(1/2*d*x + 1/2*c)))/a^2 - (350*tan(1/2*d*x + 1/2*c)^ 4 - 144*tan(1/2*d*x + 1/2*c)^3 + 48*tan(1/2*d*x + 1/2*c)^2 - 16*tan(1/2*d* x + 1/2*c) + 3)/(a^2*tan(1/2*d*x + 1/2*c)^4) + (3*a^6*tan(1/2*d*x + 1/2*c) ^4 - 16*a^6*tan(1/2*d*x + 1/2*c)^3 + 48*a^6*tan(1/2*d*x + 1/2*c)^2 - 144*a ^6*tan(1/2*d*x + 1/2*c))/a^8)/d
Time = 17.66 (sec) , antiderivative size = 151, normalized size of antiderivative = 1.57 \[ \int \frac {\cot ^4(c+d x) \csc (c+d x)}{(a+a \sin (c+d x))^2} \, dx=\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{4\,a^2\,d}-\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{12\,a^2\,d}+\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{64\,a^2\,d}+\frac {7\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{8\,a^2\,d}-\frac {3\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{4\,a^2\,d}+\frac {{\mathrm {cot}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,\left (12\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3-4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+\frac {4\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{3}-\frac {1}{4}\right )}{16\,a^2\,d} \] Input:
int(cot(c + d*x)^4/(sin(c + d*x)*(a + a*sin(c + d*x))^2),x)
Output:
tan(c/2 + (d*x)/2)^2/(4*a^2*d) - tan(c/2 + (d*x)/2)^3/(12*a^2*d) + tan(c/2 + (d*x)/2)^4/(64*a^2*d) + (7*log(tan(c/2 + (d*x)/2)))/(8*a^2*d) - (3*tan( c/2 + (d*x)/2))/(4*a^2*d) + (cot(c/2 + (d*x)/2)^4*((4*tan(c/2 + (d*x)/2))/ 3 - 4*tan(c/2 + (d*x)/2)^2 + 12*tan(c/2 + (d*x)/2)^3 - 1/4))/(16*a^2*d)
Time = 0.16 (sec) , antiderivative size = 91, normalized size of antiderivative = 0.95 \[ \int \frac {\cot ^4(c+d x) \csc (c+d x)}{(a+a \sin (c+d x))^2} \, dx=\frac {32 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{3}-21 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{2}+16 \cos \left (d x +c \right ) \sin \left (d x +c \right )-6 \cos \left (d x +c \right )+21 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \sin \left (d x +c \right )^{4}}{24 \sin \left (d x +c \right )^{4} a^{2} d} \] Input:
int(cot(d*x+c)^4*csc(d*x+c)/(a+a*sin(d*x+c))^2,x)
Output:
(32*cos(c + d*x)*sin(c + d*x)**3 - 21*cos(c + d*x)*sin(c + d*x)**2 + 16*co s(c + d*x)*sin(c + d*x) - 6*cos(c + d*x) + 21*log(tan((c + d*x)/2))*sin(c + d*x)**4)/(24*sin(c + d*x)**4*a**2*d)