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

Optimal. Leaf size=143 \[ \frac {4 \cot ^7(c+d x)}{7 a^3 d}-\frac {\cot ^5(c+d x)}{5 a^3 d}+\frac {\cot ^3(c+d x)}{3 a^3 d}-\frac {\cot (c+d x)}{a^3 d}-\frac {4 \csc ^7(c+d x)}{7 a^3 d}+\frac {11 \csc ^5(c+d x)}{5 a^3 d}-\frac {10 \csc ^3(c+d x)}{3 a^3 d}+\frac {3 \csc (c+d x)}{a^3 d}-\frac {x}{a^3} \]

[Out]

-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

________________________________________________________________________________________

Rubi [A]  time = 0.24, antiderivative size = 143, normalized size of antiderivative = 1.00, number of steps used = 16, number of rules used = 9, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.429, Rules used = {3888, 3886, 3473, 8, 2606, 194, 2607, 30, 270} \[ \frac {4 \cot ^7(c+d x)}{7 a^3 d}-\frac {\cot ^5(c+d x)}{5 a^3 d}+\frac {\cot ^3(c+d x)}{3 a^3 d}-\frac {\cot (c+d x)}{a^3 d}-\frac {4 \csc ^7(c+d x)}{7 a^3 d}+\frac {11 \csc ^5(c+d x)}{5 a^3 d}-\frac {10 \csc ^3(c+d x)}{3 a^3 d}+\frac {3 \csc (c+d x)}{a^3 d}-\frac {x}{a^3} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 194

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Int[ExpandIntegrand[(a + b*x^n)^p, x], x] /; FreeQ[{a, b}, x]
&& IGtQ[n, 0] && IGtQ[p, 0]

Rule 270

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*(a + b*x^n)^p,
 x], x] /; FreeQ[{a, b, c, m, n}, x] && IGtQ[p, 0]

Rule 2606

Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[a/f, Subst[
Int[(a*x)^(m - 1)*(-1 + x^2)^((n - 1)/2), x], x, Sec[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n -
1)/2] &&  !(IntegerQ[m/2] && LtQ[0, m, n + 1])

Rule 2607

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[1/f, Subst[Int[(b*x)
^n*(1 + x^2)^(m/2 - 1), x], x, Tan[e + f*x]], x] /; FreeQ[{b, e, f, n}, x] && IntegerQ[m/2] &&  !(IntegerQ[(n
- 1)/2] && LtQ[0, n, m - 1])

Rule 3473

Int[((b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(b*(b*Tan[c + d*x])^(n - 1))/(d*(n - 1)), x] - Dis
t[b^2, Int[(b*Tan[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1]

Rule 3886

Int[(cot[(c_.) + (d_.)*(x_)]*(e_.))^(m_)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^(n_), x_Symbol] :> Int[ExpandI
ntegrand[(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 3888

Int[(cot[(c_.) + (d_.)*(x_)]*(e_.))^(m_)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^(n_), x_Symbol] :> Dist[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] && E
qQ[a^2 - b^2, 0] && ILtQ[n, 0]

Rubi steps

\begin {align*} \int \frac {\cot ^2(c+d x)}{(a+a \sec (c+d x))^3} \, dx &=\frac {\int \cot ^8(c+d x) (-a+a \sec (c+d x))^3 \, dx}{a^6}\\ &=\frac {\int \left (-a^3 \cot ^8(c+d x)+3 a^3 \cot ^7(c+d x) \csc (c+d x)-3 a^3 \cot ^6(c+d x) \csc ^2(c+d x)+a^3 \cot ^5(c+d x) \csc ^3(c+d x)\right ) \, dx}{a^6}\\ &=-\frac {\int \cot ^8(c+d x) \, dx}{a^3}+\frac {\int \cot ^5(c+d x) \csc ^3(c+d x) \, dx}{a^3}+\frac {3 \int \cot ^7(c+d x) \csc (c+d x) \, dx}{a^3}-\frac {3 \int \cot ^6(c+d x) \csc ^2(c+d x) \, dx}{a^3}\\ &=\frac {\cot ^7(c+d x)}{7 a^3 d}+\frac {\int \cot ^6(c+d x) \, dx}{a^3}-\frac {\operatorname {Subst}\left (\int x^2 \left (-1+x^2\right )^2 \, dx,x,\csc (c+d x)\right )}{a^3 d}-\frac {3 \operatorname {Subst}\left (\int x^6 \, dx,x,-\cot (c+d x)\right )}{a^3 d}-\frac {3 \operatorname {Subst}\left (\int \left (-1+x^2\right )^3 \, dx,x,\csc (c+d x)\right )}{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 {\int \cot ^4(c+d x) \, dx}{a^3}-\frac {\operatorname {Subst}\left (\int \left (x^2-2 x^4+x^6\right ) \, dx,x,\csc (c+d x)\right )}{a^3 d}-\frac {3 \operatorname {Subst}\left (\int \left (-1+3 x^2-3 x^4+x^6\right ) \, dx,x,\csc (c+d x)\right )}{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}+\frac {\int \cot ^2(c+d x) \, dx}{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}-\frac {\int 1 \, dx}{a^3}\\ &=-\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}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 1.23, size = 252, normalized size = 1.76 \[ \frac {\csc \left (\frac {c}{2}\right ) \sec \left (\frac {c}{2}\right ) \csc \left (\frac {1}{2} (c+d x)\right ) \sec ^7\left (\frac {1}{2} (c+d x)\right ) (-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)+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)-5880 d x \cos (d x))}{215040 a^3 d} \]

Antiderivative was successfully verified.

[In]

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

[Out]

(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
*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] + 92
40*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)

________________________________________________________________________________________

fricas [A]  time = 0.75, size = 142, normalized size = 0.99 \[ -\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 )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-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))

________________________________________________________________________________________

giac [A]  time = 0.49, size = 99, normalized size = 0.69 \[ -\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} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/1680*(1680*(d*x + c)/a^3 + 105/(a^3*tan(1/2*d*x + 1/2*c)) + (15*a^18*tan(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

________________________________________________________________________________________

maple [A]  time = 0.80, size = 113, normalized size = 0.79 \[ -\frac {\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )}{112 a^{3} d}+\frac {3 \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{40 d \,a^{3}}-\frac {\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )}{3 d \,a^{3}}+\frac {13 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{8 d \,a^{3}}-\frac {1}{16 a^{3} d \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}-\frac {2 \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d \,a^{3}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/112/a^3/d*tan(1/2*d*x+1/2*c)^7+3/40/d/a^3*tan(1/2*d*x+1/2*c)^5-1/3/d/a^3*tan(1/2*d*x+1/2*c)^3+13/8/d/a^3*ta
n(1/2*d*x+1/2*c)-1/16/a^3/d/tan(1/2*d*x+1/2*c)-2/d/a^3*arctan(tan(1/2*d*x+1/2*c))

________________________________________________________________________________________

maxima [A]  time = 0.43, size = 133, normalized size = 0.93 \[ \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} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 1.70, size = 91, normalized size = 0.64 \[ -\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 )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

- 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))

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \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}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________