3.34 \(\int \cot ^6(c+d x) (a+a \sec (c+d x))^2 \, dx\)

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.13, antiderivative size = 107, normalized size of antiderivative = 1.00, number of steps used = 11, number of rules used = 7, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {3886, 3473, 8, 2606, 194, 2607, 30} \[ -\frac {2 a^2 \cot ^5(c+d x)}{5 d}+\frac {a^2 \cot ^3(c+d x)}{3 d}-\frac {a^2 \cot (c+d x)}{d}-\frac {2 a^2 \csc ^5(c+d x)}{5 d}+\frac {4 a^2 \csc ^3(c+d x)}{3 d}-\frac {2 a^2 \csc (c+d x)}{d}-a^2 x \]

Antiderivative was successfully verified.

[In]

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

[Out]

-(a^2*x) - (a^2*Cot[c + d*x])/d + (a^2*Cot[c + d*x]^3)/(3*d) - (2*a^2*Cot[c + d*x]^5)/(5*d) - (2*a^2*Csc[c + d
*x])/d + (4*a^2*Csc[c + d*x]^3)/(3*d) - (2*a^2*Csc[c + d*x]^5)/(5*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 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]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.81, size = 194, normalized size = 1.81 \[ \frac {a^2 \csc \left (\frac {c}{2}\right ) \sec \left (\frac {c}{2}\right ) \csc ^5\left (\frac {1}{2} (c+d x)\right ) \sec \left (\frac {1}{2} (c+d x)\right ) (445 \sin (c+d x)-356 \sin (2 (c+d x))+89 \sin (3 (c+d x))+240 \sin (2 c+d x)-296 \sin (c+2 d x)-120 \sin (3 c+2 d x)+104 \sin (2 c+3 d x)+150 d x \cos (2 c+d x)+120 d x \cos (c+2 d x)-120 d x \cos (3 c+2 d x)-30 d x \cos (2 c+3 d x)+30 d x \cos (4 c+3 d x)-80 \sin (c)+280 \sin (d x)-150 d x \cos (d x))}{3840 d} \]

Antiderivative was successfully verified.

[In]

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

[Out]

(a^2*Csc[c/2]*Csc[(c + d*x)/2]^5*Sec[c/2]*Sec[(c + d*x)/2]*(-150*d*x*Cos[d*x] + 150*d*x*Cos[2*c + d*x] + 120*d
*x*Cos[c + 2*d*x] - 120*d*x*Cos[3*c + 2*d*x] - 30*d*x*Cos[2*c + 3*d*x] + 30*d*x*Cos[4*c + 3*d*x] - 80*Sin[c] +
 280*Sin[d*x] + 445*Sin[c + d*x] - 356*Sin[2*(c + d*x)] + 89*Sin[3*(c + d*x)] + 240*Sin[2*c + d*x] - 296*Sin[c
 + 2*d*x] - 120*Sin[3*c + 2*d*x] + 104*Sin[2*c + 3*d*x]))/(3840*d)

________________________________________________________________________________________

fricas [A]  time = 0.72, size = 118, normalized size = 1.10 \[ -\frac {26 \, a^{2} \cos \left (d x + c\right )^{3} - 22 \, a^{2} \cos \left (d x + c\right )^{2} - 17 \, a^{2} \cos \left (d x + c\right ) + 16 \, a^{2} + 15 \, {\left (a^{2} d x \cos \left (d x + c\right )^{2} - 2 \, a^{2} d x \cos \left (d x + c\right ) + a^{2} d x\right )} \sin \left (d x + c\right )}{15 \, {\left (d \cos \left (d x + c\right )^{2} - 2 \, d \cos \left (d x + c\right ) + d\right )} \sin \left (d x + c\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/15*(26*a^2*cos(d*x + c)^3 - 22*a^2*cos(d*x + c)^2 - 17*a^2*cos(d*x + c) + 16*a^2 + 15*(a^2*d*x*cos(d*x + c)
^2 - 2*a^2*d*x*cos(d*x + c) + a^2*d*x)*sin(d*x + c))/((d*cos(d*x + c)^2 - 2*d*cos(d*x + c) + d)*sin(d*x + c))

________________________________________________________________________________________

giac [A]  time = 0.35, size = 80, normalized size = 0.75 \[ -\frac {120 \, {\left (d x + c\right )} a^{2} - 15 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + \frac {165 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 25 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 3 \, a^{2}}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5}}}{120 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/120*(120*(d*x + c)*a^2 - 15*a^2*tan(1/2*d*x + 1/2*c) + (165*a^2*tan(1/2*d*x + 1/2*c)^4 - 25*a^2*tan(1/2*d*x
 + 1/2*c)^2 + 3*a^2)/tan(1/2*d*x + 1/2*c)^5)/d

________________________________________________________________________________________

maple [A]  time = 1.04, size = 155, normalized size = 1.45 \[ \frac {a^{2} \left (-\frac {\left (\cot ^{5}\left (d x +c \right )\right )}{5}+\frac {\left (\cot ^{3}\left (d x +c \right )\right )}{3}-\cot \left (d x +c \right )-d x -c \right )+2 a^{2} \left (-\frac {\cos ^{6}\left (d x +c \right )}{5 \sin \left (d x +c \right )^{5}}+\frac {\cos ^{6}\left (d x +c \right )}{15 \sin \left (d x +c \right )^{3}}-\frac {\cos ^{6}\left (d x +c \right )}{5 \sin \left (d x +c \right )}-\frac {\left (\frac {8}{3}+\cos ^{4}\left (d x +c \right )+\frac {4 \left (\cos ^{2}\left (d x +c \right )\right )}{3}\right ) \sin \left (d x +c \right )}{5}\right )-\frac {a^{2} \left (\cos ^{5}\left (d x +c \right )\right )}{5 \sin \left (d x +c \right )^{5}}}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/d*(a^2*(-1/5*cot(d*x+c)^5+1/3*cot(d*x+c)^3-cot(d*x+c)-d*x-c)+2*a^2*(-1/5/sin(d*x+c)^5*cos(d*x+c)^6+1/15/sin(
d*x+c)^3*cos(d*x+c)^6-1/5/sin(d*x+c)*cos(d*x+c)^6-1/5*(8/3+cos(d*x+c)^4+4/3*cos(d*x+c)^2)*sin(d*x+c))-1/5*a^2/
sin(d*x+c)^5*cos(d*x+c)^5)

________________________________________________________________________________________

maxima [A]  time = 0.54, size = 97, normalized size = 0.91 \[ -\frac {{\left (15 \, d x + 15 \, c + \frac {15 \, \tan \left (d x + c\right )^{4} - 5 \, \tan \left (d x + c\right )^{2} + 3}{\tan \left (d x + c\right )^{5}}\right )} a^{2} + \frac {2 \, {\left (15 \, \sin \left (d x + c\right )^{4} - 10 \, \sin \left (d x + c\right )^{2} + 3\right )} a^{2}}{\sin \left (d x + c\right )^{5}} + \frac {3 \, a^{2}}{\tan \left (d x + c\right )^{5}}}{15 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/15*((15*d*x + 15*c + (15*tan(d*x + c)^4 - 5*tan(d*x + c)^2 + 3)/tan(d*x + c)^5)*a^2 + 2*(15*sin(d*x + c)^4
- 10*sin(d*x + c)^2 + 3)*a^2/sin(d*x + c)^5 + 3*a^2/tan(d*x + c)^5)/d

________________________________________________________________________________________

mupad [B]  time = 1.26, size = 78, normalized size = 0.73 \[ \frac {a^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{8\,d}-\frac {\frac {11\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{8}-\frac {5\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{24}+\frac {a^2}{40}}{d\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}-a^2\,x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(a^2*tan(c/2 + (d*x)/2))/(8*d) - ((11*a^2*tan(c/2 + (d*x)/2)^4)/8 - (5*a^2*tan(c/2 + (d*x)/2)^2)/24 + a^2/40)/
(d*tan(c/2 + (d*x)/2)^5) - a^2*x

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ a^{2} \left (\int 2 \cot ^{6}{\left (c + d x \right )} \sec {\left (c + d x \right )}\, dx + \int \cot ^{6}{\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}\, dx + \int \cot ^{6}{\left (c + d x \right )}\, dx\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

a**2*(Integral(2*cot(c + d*x)**6*sec(c + d*x), x) + Integral(cot(c + d*x)**6*sec(c + d*x)**2, x) + Integral(co
t(c + d*x)**6, x))

________________________________________________________________________________________