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

Optimal result
Mathematica [A] (verified)
Rubi [A] (verified)
Maple [A] (verified)
Fricas [A] (verification not implemented)
Sympy [F]
Maxima [A] (verification not implemented)
Giac [A] (verification not implemented)
Mupad [B] (verification not implemented)
Reduce [B] (verification not implemented)

Optimal result

Integrand size = 21, antiderivative size = 143 \[ \int \frac {\cot ^2(c+d x)}{(a+a \sec (c+d x))^3} \, dx=-\frac {x}{a^3}-\frac {\cot (c+d x)}{a^3 d}+\frac {\cot ^3(c+d x)}{3 a^3 d}-\frac {\cot ^5(c+d x)}{5 a^3 d}+\frac {4 \cot ^7(c+d x)}{7 a^3 d}+\frac {3 \csc (c+d x)}{a^3 d}-\frac {10 \csc ^3(c+d x)}{3 a^3 d}+\frac {11 \csc ^5(c+d x)}{5 a^3 d}-\frac {4 \csc ^7(c+d x)}{7 a^3 d} \] Output:

-x/a^3-cot(d*x+c)/a^3/d+1/3*cot(d*x+c)^3/a^3/d-1/5*cot(d*x+c)^5/a^3/d+4/7* 
cot(d*x+c)^7/a^3/d+3*csc(d*x+c)/a^3/d-10/3*csc(d*x+c)^3/a^3/d+11/5*csc(d*x 
+c)^5/a^3/d-4/7*csc(d*x+c)^7/a^3/d
 

Mathematica [A] (verified)

Time = 1.42 (sec) , antiderivative size = 252, normalized size of antiderivative = 1.76 \[ \int \frac {\cot ^2(c+d x)}{(a+a \sec (c+d x))^3} \, dx=\frac {\csc \left (\frac {c}{2}\right ) \csc \left (\frac {1}{2} (c+d x)\right ) \sec \left (\frac {c}{2}\right ) \sec ^7\left (\frac {1}{2} (c+d x)\right ) (-5880 d x \cos (d x)+5880 d x \cos (2 c+d x)-5880 d x \cos (c+2 d x)+5880 d x \cos (3 c+2 d x)-2520 d x \cos (2 c+3 d x)+2520 d x \cos (4 c+3 d x)-420 d x \cos (3 c+4 d x)+420 d x \cos (5 c+4 d x)+4200 \sin (c)+11032 \sin (d x)-23282 \sin (c+d x)-23282 \sin (2 (c+d x))-9978 \sin (3 (c+d x))-1663 \sin (4 (c+d x))+13720 \sin (2 c+d x)+15512 \sin (c+2 d x)+9240 \sin (3 c+2 d x)+8088 \sin (2 c+3 d x)+2520 \sin (4 c+3 d x)+1768 \sin (3 c+4 d x))}{215040 a^3 d} \] Input:

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

Output:

(Csc[c/2]*Csc[(c + d*x)/2]*Sec[c/2]*Sec[(c + d*x)/2]^7*(-5880*d*x*Cos[d*x] 
 + 5880*d*x*Cos[2*c + d*x] - 5880*d*x*Cos[c + 2*d*x] + 5880*d*x*Cos[3*c + 
2*d*x] - 2520*d*x*Cos[2*c + 3*d*x] + 2520*d*x*Cos[4*c + 3*d*x] - 420*d*x*C 
os[3*c + 4*d*x] + 420*d*x*Cos[5*c + 4*d*x] + 4200*Sin[c] + 11032*Sin[d*x] 
- 23282*Sin[c + d*x] - 23282*Sin[2*(c + d*x)] - 9978*Sin[3*(c + d*x)] - 16 
63*Sin[4*(c + d*x)] + 13720*Sin[2*c + d*x] + 15512*Sin[c + 2*d*x] + 9240*S 
in[3*c + 2*d*x] + 8088*Sin[2*c + 3*d*x] + 2520*Sin[4*c + 3*d*x] + 1768*Sin 
[3*c + 4*d*x]))/(215040*a^3*d)
 

Rubi [A] (verified)

Time = 0.52 (sec) , antiderivative size = 146, normalized size of antiderivative = 1.02, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {3042, 4376, 25, 3042, 4374, 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 ^2(c+d x)}{(a \sec (c+d x)+a)^3} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {1}{\cot \left (c+d x+\frac {\pi }{2}\right )^2 \left (a \csc \left (c+d x+\frac {\pi }{2}\right )+a\right )^3}dx\)

\(\Big \downarrow \) 4376

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

\(\Big \downarrow \) 25

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4374

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

\(\Big \downarrow \) 2009

\(\displaystyle -\frac {-\frac {4 a^3 \cot ^7(c+d x)}{7 d}+\frac {a^3 \cot ^5(c+d x)}{5 d}-\frac {a^3 \cot ^3(c+d x)}{3 d}+\frac {a^3 \cot (c+d x)}{d}+\frac {4 a^3 \csc ^7(c+d x)}{7 d}-\frac {11 a^3 \csc ^5(c+d x)}{5 d}+\frac {10 a^3 \csc ^3(c+d x)}{3 d}-\frac {3 a^3 \csc (c+d x)}{d}+a^3 x}{a^6}\)

Input:

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

Output:

-((a^3*x + (a^3*Cot[c + d*x])/d - (a^3*Cot[c + d*x]^3)/(3*d) + (a^3*Cot[c 
+ d*x]^5)/(5*d) - (4*a^3*Cot[c + d*x]^7)/(7*d) - (3*a^3*Csc[c + d*x])/d + 
(10*a^3*Csc[c + d*x]^3)/(3*d) - (11*a^3*Csc[c + d*x]^5)/(5*d) + (4*a^3*Csc 
[c + d*x]^7)/(7*d))/a^6)
 

Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

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 4374
Int[(cot[(c_.) + (d_.)*(x_)]*(e_.))^(m_)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + ( 
a_))^(n_), x_Symbol] :> Int[ExpandIntegrand[(e*Cot[c + d*x])^m, (a + b*Csc[ 
c + d*x])^n, x], x] /; FreeQ[{a, b, c, d, e, m}, x] && IGtQ[n, 0]
 

rule 4376
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]
 
Maple [A] (verified)

Time = 0.21 (sec) , antiderivative size = 85, normalized size of antiderivative = 0.59

method result size
derivativedivides \(\frac {-\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{7}+\frac {6 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{5}-\frac {16 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{3}+26 \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}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}}{16 d \,a^{3}}\) \(85\)
default \(\frac {-\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{7}+\frac {6 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{5}-\frac {16 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{3}+26 \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}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}}{16 d \,a^{3}}\) \(85\)
risch \(-\frac {x}{a^{3}}+\frac {2 i \left (315 \,{\mathrm e}^{7 i \left (d x +c \right )}+1155 \,{\mathrm e}^{6 i \left (d x +c \right )}+1715 \,{\mathrm e}^{5 i \left (d x +c \right )}+525 \,{\mathrm e}^{4 i \left (d x +c \right )}-1379 \,{\mathrm e}^{3 i \left (d x +c \right )}-1939 \,{\mathrm e}^{2 i \left (d x +c \right )}-1011 \,{\mathrm e}^{i \left (d x +c \right )}-221\right )}{105 d \,a^{3} \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )^{7} \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}\) \(122\)

Input:

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

Output:

1/16/d/a^3*(-1/7*tan(1/2*d*x+1/2*c)^7+6/5*tan(1/2*d*x+1/2*c)^5-16/3*tan(1/ 
2*d*x+1/2*c)^3+26*tan(1/2*d*x+1/2*c)-32*arctan(tan(1/2*d*x+1/2*c))-1/tan(1 
/2*d*x+1/2*c))
 

Fricas [A] (verification not implemented)

Time = 0.09 (sec) , antiderivative size = 142, normalized size of antiderivative = 0.99 \[ \int \frac {\cot ^2(c+d x)}{(a+a \sec (c+d x))^3} \, dx=-\frac {221 \, \cos \left (d x + c\right )^{4} + 348 \, \cos \left (d x + c\right )^{3} - 25 \, \cos \left (d x + c\right )^{2} + 105 \, {\left (d x \cos \left (d x + c\right )^{3} + 3 \, d x \cos \left (d x + c\right )^{2} + 3 \, d x \cos \left (d x + c\right ) + d x\right )} \sin \left (d x + c\right ) - 303 \, \cos \left (d x + c\right ) - 136}{105 \, {\left (a^{3} d \cos \left (d x + c\right )^{3} + 3 \, a^{3} d \cos \left (d x + c\right )^{2} + 3 \, a^{3} d \cos \left (d x + c\right ) + a^{3} d\right )} \sin \left (d x + c\right )} \] Input:

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

Output:

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

Sympy [F]

\[ \int \frac {\cot ^2(c+d x)}{(a+a \sec (c+d x))^3} \, dx=\frac {\int \frac {\cot ^{2}{\left (c + d x \right )}}{\sec ^{3}{\left (c + d x \right )} + 3 \sec ^{2}{\left (c + d x \right )} + 3 \sec {\left (c + d x \right )} + 1}\, dx}{a^{3}} \] Input:

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

Output:

Integral(cot(c + d*x)**2/(sec(c + d*x)**3 + 3*sec(c + d*x)**2 + 3*sec(c + 
d*x) + 1), x)/a**3
 

Maxima [A] (verification not implemented)

Time = 0.11 (sec) , antiderivative size = 133, normalized size of antiderivative = 0.93 \[ \int \frac {\cot ^2(c+d x)}{(a+a \sec (c+d x))^3} \, dx=\frac {\frac {\frac {2730 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {560 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {126 \, \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}} - \frac {15 \, \sin \left (d x + c\right )^{7}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{7}}}{a^{3}} - \frac {3360 \, \arctan \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a^{3}} - \frac {105 \, {\left (\cos \left (d x + c\right ) + 1\right )}}{a^{3} \sin \left (d x + c\right )}}{1680 \, d} \] Input:

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

Output:

1/1680*((2730*sin(d*x + c)/(cos(d*x + c) + 1) - 560*sin(d*x + c)^3/(cos(d* 
x + c) + 1)^3 + 126*sin(d*x + c)^5/(cos(d*x + c) + 1)^5 - 15*sin(d*x + c)^ 
7/(cos(d*x + c) + 1)^7)/a^3 - 3360*arctan(sin(d*x + c)/(cos(d*x + c) + 1)) 
/a^3 - 105*(cos(d*x + c) + 1)/(a^3*sin(d*x + c)))/d
 

Giac [A] (verification not implemented)

Time = 0.17 (sec) , antiderivative size = 99, normalized size of antiderivative = 0.69 \[ \int \frac {\cot ^2(c+d x)}{(a+a \sec (c+d x))^3} \, dx=-\frac {\frac {1680 \, {\left (d x + c\right )}}{a^{3}} + \frac {105}{a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )} + \frac {15 \, a^{18} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 126 \, a^{18} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 560 \, a^{18} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 2730 \, a^{18} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a^{21}}}{1680 \, d} \] Input:

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

Output:

-1/1680*(1680*(d*x + c)/a^3 + 105/(a^3*tan(1/2*d*x + 1/2*c)) + (15*a^18*ta 
n(1/2*d*x + 1/2*c)^7 - 126*a^18*tan(1/2*d*x + 1/2*c)^5 + 560*a^18*tan(1/2* 
d*x + 1/2*c)^3 - 2730*a^18*tan(1/2*d*x + 1/2*c))/a^21)/d
 

Mupad [B] (verification not implemented)

Time = 12.52 (sec) , antiderivative size = 91, normalized size of antiderivative = 0.64 \[ \int \frac {\cot ^2(c+d x)}{(a+a \sec (c+d x))^3} \, dx=-\frac {x}{a^3}-\frac {\frac {221\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8}{105}-\frac {268\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6}{105}+\frac {257\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{420}-\frac {31\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{280}+\frac {1}{112}}{a^3\,d\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )} \] Input:

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

Output:

- x/a^3 - ((257*cos(c/2 + (d*x)/2)^4)/420 - (31*cos(c/2 + (d*x)/2)^2)/280 
- (268*cos(c/2 + (d*x)/2)^6)/105 + (221*cos(c/2 + (d*x)/2)^8)/105 + 1/112) 
/(a^3*d*cos(c/2 + (d*x)/2)^7*sin(c/2 + (d*x)/2))
 

Reduce [B] (verification not implemented)

Time = 0.15 (sec) , antiderivative size = 86, normalized size of antiderivative = 0.60 \[ \int \frac {\cot ^2(c+d x)}{(a+a \sec (c+d x))^3} \, dx=\frac {-15 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}+126 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}-560 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}+2730 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1680 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) d x -105}{1680 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) a^{3} d} \] Input:

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

Output:

( - 15*tan((c + d*x)/2)**8 + 126*tan((c + d*x)/2)**6 - 560*tan((c + d*x)/2 
)**4 + 2730*tan((c + d*x)/2)**2 - 1680*tan((c + d*x)/2)*d*x - 105)/(1680*t 
an((c + d*x)/2)*a**3*d)