Integrand size = 21, antiderivative size = 88 \[ \int \frac {\cot ^4(c+d x)}{a+a \sec (c+d x)} \, dx=\frac {x}{a}+\frac {\cot (c+d x) (15-8 \sec (c+d x))}{15 a d}-\frac {\cot ^3(c+d x) (5-4 \sec (c+d x))}{15 a d}+\frac {\cot ^5(c+d x) (1-\sec (c+d x))}{5 a d} \] Output:
x/a+1/15*cot(d*x+c)*(15-8*sec(d*x+c))/a/d-1/15*cot(d*x+c)^3*(5-4*sec(d*x+c ))/a/d+1/5*cot(d*x+c)^5*(1-sec(d*x+c))/a/d
Leaf count is larger than twice the leaf count of optimal. \(254\) vs. \(2(88)=176\).
Time = 0.94 (sec) , antiderivative size = 254, normalized size of antiderivative = 2.89 \[ \int \frac {\cot ^4(c+d x)}{a+a \sec (c+d x)} \, dx=\frac {\csc \left (\frac {c}{2}\right ) \csc ^3(c+d x) \sec \left (\frac {c}{2}\right ) \sec (c+d x) (360 d x \cos (d x)-360 d x \cos (2 c+d x)+120 d x \cos (c+2 d x)-120 d x \cos (3 c+2 d x)-120 d x \cos (2 c+3 d x)+120 d x \cos (4 c+3 d x)-60 d x \cos (3 c+4 d x)+60 d x \cos (5 c+4 d x)-200 \sin (c)-584 \sin (d x)+534 \sin (c+d x)+178 \sin (2 (c+d x))-178 \sin (3 (c+d x))-89 \sin (4 (c+d x))-520 \sin (2 c+d x)-248 \sin (c+2 d x)-120 \sin (3 c+2 d x)+248 \sin (2 c+3 d x)+120 \sin (4 c+3 d x)+184 \sin (3 c+4 d x))}{1920 a d (1+\sec (c+d x))} \] Input:
Integrate[Cot[c + d*x]^4/(a + a*Sec[c + d*x]),x]
Output:
(Csc[c/2]*Csc[c + d*x]^3*Sec[c/2]*Sec[c + d*x]*(360*d*x*Cos[d*x] - 360*d*x *Cos[2*c + d*x] + 120*d*x*Cos[c + 2*d*x] - 120*d*x*Cos[3*c + 2*d*x] - 120* d*x*Cos[2*c + 3*d*x] + 120*d*x*Cos[4*c + 3*d*x] - 60*d*x*Cos[3*c + 4*d*x] + 60*d*x*Cos[5*c + 4*d*x] - 200*Sin[c] - 584*Sin[d*x] + 534*Sin[c + d*x] + 178*Sin[2*(c + d*x)] - 178*Sin[3*(c + d*x)] - 89*Sin[4*(c + d*x)] - 520*S in[2*c + d*x] - 248*Sin[c + 2*d*x] - 120*Sin[3*c + 2*d*x] + 248*Sin[2*c + 3*d*x] + 120*Sin[4*c + 3*d*x] + 184*Sin[3*c + 4*d*x]))/(1920*a*d*(1 + Sec[ c + d*x]))
Time = 0.54 (sec) , antiderivative size = 98, normalized size of antiderivative = 1.11, number of steps used = 12, number of rules used = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.571, Rules used = {3042, 4376, 25, 3042, 4370, 25, 3042, 4370, 25, 3042, 4370, 24}
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)}{a \sec (c+d x)+a} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {1}{\cot \left (c+d x+\frac {\pi }{2}\right )^4 \left (a \csc \left (c+d x+\frac {\pi }{2}\right )+a\right )}dx\) |
\(\Big \downarrow \) 4376 |
\(\displaystyle \frac {\int -\cot ^6(c+d x) (a-a \sec (c+d x))dx}{a^2}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -\frac {\int \cot ^6(c+d x) (a-a \sec (c+d x))dx}{a^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {\int \frac {a-a \csc \left (c+d x+\frac {\pi }{2}\right )}{\cot \left (c+d x+\frac {\pi }{2}\right )^6}dx}{a^2}\) |
\(\Big \downarrow \) 4370 |
\(\displaystyle -\frac {\frac {1}{5} \int -\cot ^4(c+d x) (5 a-4 a \sec (c+d x))dx-\frac {\cot ^5(c+d x) (a-a \sec (c+d x))}{5 d}}{a^2}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -\frac {-\frac {1}{5} \int \cot ^4(c+d x) (5 a-4 a \sec (c+d x))dx-\frac {\cot ^5(c+d x) (a-a \sec (c+d x))}{5 d}}{a^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {-\frac {1}{5} \int \frac {5 a-4 a \csc \left (c+d x+\frac {\pi }{2}\right )}{\cot \left (c+d x+\frac {\pi }{2}\right )^4}dx-\frac {\cot ^5(c+d x) (a-a \sec (c+d x))}{5 d}}{a^2}\) |
\(\Big \downarrow \) 4370 |
\(\displaystyle -\frac {\frac {1}{5} \left (\frac {\cot ^3(c+d x) (5 a-4 a \sec (c+d x))}{3 d}-\frac {1}{3} \int -\cot ^2(c+d x) (15 a-8 a \sec (c+d x))dx\right )-\frac {\cot ^5(c+d x) (a-a \sec (c+d x))}{5 d}}{a^2}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -\frac {\frac {1}{5} \left (\frac {1}{3} \int \cot ^2(c+d x) (15 a-8 a \sec (c+d x))dx+\frac {\cot ^3(c+d x) (5 a-4 a \sec (c+d x))}{3 d}\right )-\frac {\cot ^5(c+d x) (a-a \sec (c+d x))}{5 d}}{a^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {\frac {1}{5} \left (\frac {1}{3} \int \frac {15 a-8 a \csc \left (c+d x+\frac {\pi }{2}\right )}{\cot \left (c+d x+\frac {\pi }{2}\right )^2}dx+\frac {\cot ^3(c+d x) (5 a-4 a \sec (c+d x))}{3 d}\right )-\frac {\cot ^5(c+d x) (a-a \sec (c+d x))}{5 d}}{a^2}\) |
\(\Big \downarrow \) 4370 |
\(\displaystyle -\frac {\frac {1}{5} \left (\frac {1}{3} \left (\int -15 adx-\frac {\cot (c+d x) (15 a-8 a \sec (c+d x))}{d}\right )+\frac {\cot ^3(c+d x) (5 a-4 a \sec (c+d x))}{3 d}\right )-\frac {\cot ^5(c+d x) (a-a \sec (c+d x))}{5 d}}{a^2}\) |
\(\Big \downarrow \) 24 |
\(\displaystyle -\frac {\frac {1}{5} \left (\frac {\cot ^3(c+d x) (5 a-4 a \sec (c+d x))}{3 d}+\frac {1}{3} \left (-\frac {\cot (c+d x) (15 a-8 a \sec (c+d x))}{d}-15 a x\right )\right )-\frac {\cot ^5(c+d x) (a-a \sec (c+d x))}{5 d}}{a^2}\) |
Input:
Int[Cot[c + d*x]^4/(a + a*Sec[c + d*x]),x]
Output:
-((-1/5*(Cot[c + d*x]^5*(a - a*Sec[c + d*x]))/d + ((Cot[c + d*x]^3*(5*a - 4*a*Sec[c + d*x]))/(3*d) + (-15*a*x - (Cot[c + d*x]*(15*a - 8*a*Sec[c + d* x]))/d)/3)/5)/a^2)
Int[(cot[(c_.) + (d_.)*(x_)]*(e_.))^(m_)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + ( a_)), x_Symbol] :> Simp[(-(e*Cot[c + d*x])^(m + 1))*((a + b*Csc[c + d*x])/( d*e*(m + 1))), x] - Simp[1/(e^2*(m + 1)) Int[(e*Cot[c + d*x])^(m + 2)*(a* (m + 1) + b*(m + 2)*Csc[c + d*x]), x], x] /; FreeQ[{a, b, c, d, e}, x] && L tQ[m, -1]
Int[(cot[(c_.) + (d_.)*(x_)]*(e_.))^(m_)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + ( a_))^(n_), x_Symbol] :> Simp[a^(2*n)/e^(2*n) Int[(e*Cot[c + d*x])^(m + 2* n)/(-a + b*Csc[c + d*x])^n, x], x] /; FreeQ[{a, b, c, d, e, m}, x] && EqQ[a ^2 - b^2, 0] && ILtQ[n, 0]
Time = 0.19 (sec) , antiderivative size = 85, normalized size of antiderivative = 0.97
method | result | size |
derivativedivides | \(\frac {-\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{5}+2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}-16 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+32 \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )-\frac {1}{3 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}+\frac {6}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}}{16 d a}\) | \(85\) |
default | \(\frac {-\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{5}+2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}-16 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+32 \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )-\frac {1}{3 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}+\frac {6}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}}{16 d a}\) | \(85\) |
risch | \(\frac {x}{a}-\frac {2 i \left (15 \,{\mathrm e}^{7 i \left (d x +c \right )}-15 \,{\mathrm e}^{6 i \left (d x +c \right )}-65 \,{\mathrm e}^{5 i \left (d x +c \right )}-25 \,{\mathrm e}^{4 i \left (d x +c \right )}+73 \,{\mathrm e}^{3 i \left (d x +c \right )}+31 \,{\mathrm e}^{2 i \left (d x +c \right )}-31 \,{\mathrm e}^{i \left (d x +c \right )}-23\right )}{15 d a \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )^{5} \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )^{3}}\) | \(121\) |
Input:
int(cot(d*x+c)^4/(a+a*sec(d*x+c)),x,method=_RETURNVERBOSE)
Output:
1/16/d/a*(-1/5*tan(1/2*d*x+1/2*c)^5+2*tan(1/2*d*x+1/2*c)^3-16*tan(1/2*d*x+ 1/2*c)+32*arctan(tan(1/2*d*x+1/2*c))-1/3/tan(1/2*d*x+1/2*c)^3+6/tan(1/2*d* x+1/2*c))
Time = 0.08 (sec) , antiderivative size = 134, normalized size of antiderivative = 1.52 \[ \int \frac {\cot ^4(c+d x)}{a+a \sec (c+d x)} \, dx=\frac {23 \, \cos \left (d x + c\right )^{4} + 8 \, \cos \left (d x + c\right )^{3} - 27 \, \cos \left (d x + c\right )^{2} + 15 \, {\left (d x \cos \left (d x + c\right )^{3} + d x \cos \left (d x + c\right )^{2} - d x \cos \left (d x + c\right ) - d x\right )} \sin \left (d x + c\right ) - 7 \, \cos \left (d x + c\right ) + 8}{15 \, {\left (a d \cos \left (d x + c\right )^{3} + a d \cos \left (d x + c\right )^{2} - a d \cos \left (d x + c\right ) - a d\right )} \sin \left (d x + c\right )} \] Input:
integrate(cot(d*x+c)^4/(a+a*sec(d*x+c)),x, algorithm="fricas")
Output:
1/15*(23*cos(d*x + c)^4 + 8*cos(d*x + c)^3 - 27*cos(d*x + c)^2 + 15*(d*x*c os(d*x + c)^3 + d*x*cos(d*x + c)^2 - d*x*cos(d*x + c) - d*x)*sin(d*x + c) - 7*cos(d*x + c) + 8)/((a*d*cos(d*x + c)^3 + a*d*cos(d*x + c)^2 - a*d*cos( d*x + c) - a*d)*sin(d*x + c))
\[ \int \frac {\cot ^4(c+d x)}{a+a \sec (c+d x)} \, dx=\frac {\int \frac {\cot ^{4}{\left (c + d x \right )}}{\sec {\left (c + d x \right )} + 1}\, dx}{a} \] Input:
integrate(cot(d*x+c)**4/(a+a*sec(d*x+c)),x)
Output:
Integral(cot(c + d*x)**4/(sec(c + d*x) + 1), x)/a
Time = 0.11 (sec) , antiderivative size = 137, normalized size of antiderivative = 1.56 \[ \int \frac {\cot ^4(c+d x)}{a+a \sec (c+d x)} \, dx=-\frac {\frac {3 \, {\left (\frac {80 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {10 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {\sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}}\right )}}{a} - \frac {480 \, \arctan \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a} - \frac {5 \, {\left (\frac {18 \, \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} - 1\right )} {\left (\cos \left (d x + c\right ) + 1\right )}^{3}}{a \sin \left (d x + c\right )^{3}}}{240 \, d} \] Input:
integrate(cot(d*x+c)^4/(a+a*sec(d*x+c)),x, algorithm="maxima")
Output:
-1/240*(3*(80*sin(d*x + c)/(cos(d*x + c) + 1) - 10*sin(d*x + c)^3/(cos(d*x + c) + 1)^3 + sin(d*x + c)^5/(cos(d*x + c) + 1)^5)/a - 480*arctan(sin(d*x + c)/(cos(d*x + c) + 1))/a - 5*(18*sin(d*x + c)^2/(cos(d*x + c) + 1)^2 - 1)*(cos(d*x + c) + 1)^3/(a*sin(d*x + c)^3))/d
Time = 0.15 (sec) , antiderivative size = 98, normalized size of antiderivative = 1.11 \[ \int \frac {\cot ^4(c+d x)}{a+a \sec (c+d x)} \, dx=\frac {\frac {240 \, {\left (d x + c\right )}}{a} + \frac {5 \, {\left (18 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}}{a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3}} - \frac {3 \, {\left (a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 10 \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 80 \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{a^{5}}}{240 \, d} \] Input:
integrate(cot(d*x+c)^4/(a+a*sec(d*x+c)),x, algorithm="giac")
Output:
1/240*(240*(d*x + c)/a + 5*(18*tan(1/2*d*x + 1/2*c)^2 - 1)/(a*tan(1/2*d*x + 1/2*c)^3) - 3*(a^4*tan(1/2*d*x + 1/2*c)^5 - 10*a^4*tan(1/2*d*x + 1/2*c)^ 3 + 80*a^4*tan(1/2*d*x + 1/2*c))/a^5)/d
Time = 12.56 (sec) , antiderivative size = 158, normalized size of antiderivative = 1.80 \[ \int \frac {\cot ^4(c+d x)}{a+a \sec (c+d x)} \, dx=-\frac {5\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8+3\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8-30\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+240\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-90\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-240\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (c+d\,x\right )}{240\,a\,d\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3} \] Input:
int(cot(c + d*x)^4/(a + a/cos(c + d*x)),x)
Output:
-(5*cos(c/2 + (d*x)/2)^8 + 3*sin(c/2 + (d*x)/2)^8 - 30*cos(c/2 + (d*x)/2)^ 2*sin(c/2 + (d*x)/2)^6 + 240*cos(c/2 + (d*x)/2)^4*sin(c/2 + (d*x)/2)^4 - 9 0*cos(c/2 + (d*x)/2)^6*sin(c/2 + (d*x)/2)^2 - 240*cos(c/2 + (d*x)/2)^5*sin (c/2 + (d*x)/2)^3*(c + d*x))/(240*a*d*cos(c/2 + (d*x)/2)^5*sin(c/2 + (d*x) /2)^3)
Time = 0.20 (sec) , antiderivative size = 88, normalized size of antiderivative = 1.00 \[ \int \frac {\cot ^4(c+d x)}{a+a \sec (c+d x)} \, dx=\frac {-3 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}+30 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}-240 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}+240 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3} d x +90 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-5}{240 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3} a d} \] Input:
int(cot(d*x+c)^4/(a+a*sec(d*x+c)),x)
Output:
( - 3*tan((c + d*x)/2)**8 + 30*tan((c + d*x)/2)**6 - 240*tan((c + d*x)/2)* *4 + 240*tan((c + d*x)/2)**3*d*x + 90*tan((c + d*x)/2)**2 - 5)/(240*tan((c + d*x)/2)**3*a*d)