\(\int \frac {\cot ^6(c+d x)}{a+b \sin ^2(c+d x)} \, dx\) [386]

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

Optimal result

Integrand size = 23, antiderivative size = 96 \[ \int \frac {\cot ^6(c+d x)}{a+b \sin ^2(c+d x)} \, dx=-\frac {(a+b)^{5/2} \arctan \left (\frac {\sqrt {a+b} \tan (c+d x)}{\sqrt {a}}\right )}{a^{7/2} d}-\frac {(a+b)^2 \cot (c+d x)}{a^3 d}+\frac {(a+b) \cot ^3(c+d x)}{3 a^2 d}-\frac {\cot ^5(c+d x)}{5 a d} \] Output:

-(a+b)^(5/2)*arctan((a+b)^(1/2)*tan(d*x+c)/a^(1/2))/a^(7/2)/d-(a+b)^2*cot( 
d*x+c)/a^3/d+1/3*(a+b)*cot(d*x+c)^3/a^2/d-1/5*cot(d*x+c)^5/a/d
 

Mathematica [A] (verified)

Time = 1.39 (sec) , antiderivative size = 101, normalized size of antiderivative = 1.05 \[ \int \frac {\cot ^6(c+d x)}{a+b \sin ^2(c+d x)} \, dx=\frac {-15 (a+b)^{5/2} \arctan \left (\frac {\sqrt {a+b} \tan (c+d x)}{\sqrt {a}}\right )-\sqrt {a} \cot (c+d x) \left (23 a^2+35 a b+15 b^2-a (11 a+5 b) \csc ^2(c+d x)+3 a^2 \csc ^4(c+d x)\right )}{15 a^{7/2} d} \] Input:

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

Output:

(-15*(a + b)^(5/2)*ArcTan[(Sqrt[a + b]*Tan[c + d*x])/Sqrt[a]] - Sqrt[a]*Co 
t[c + d*x]*(23*a^2 + 35*a*b + 15*b^2 - a*(11*a + 5*b)*Csc[c + d*x]^2 + 3*a 
^2*Csc[c + d*x]^4))/(15*a^(7/2)*d)
 

Rubi [A] (verified)

Time = 0.28 (sec) , antiderivative size = 98, normalized size of antiderivative = 1.02, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.261, Rules used = {3042, 3674, 264, 264, 264, 218}

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 ^6(c+d x)}{a+b \sin ^2(c+d x)} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {1}{\tan (c+d x)^6 \left (a+b \sin (c+d x)^2\right )}dx\)

\(\Big \downarrow \) 3674

\(\displaystyle \frac {\int \frac {\cot ^6(c+d x)}{(a+b) \tan ^2(c+d x)+a}d\tan (c+d x)}{d}\)

\(\Big \downarrow \) 264

\(\displaystyle \frac {-\frac {(a+b) \int \frac {\cot ^4(c+d x)}{(a+b) \tan ^2(c+d x)+a}d\tan (c+d x)}{a}-\frac {\cot ^5(c+d x)}{5 a}}{d}\)

\(\Big \downarrow \) 264

\(\displaystyle \frac {-\frac {(a+b) \left (-\frac {(a+b) \int \frac {\cot ^2(c+d x)}{(a+b) \tan ^2(c+d x)+a}d\tan (c+d x)}{a}-\frac {\cot ^3(c+d x)}{3 a}\right )}{a}-\frac {\cot ^5(c+d x)}{5 a}}{d}\)

\(\Big \downarrow \) 264

\(\displaystyle \frac {-\frac {(a+b) \left (-\frac {(a+b) \left (-\frac {(a+b) \int \frac {1}{(a+b) \tan ^2(c+d x)+a}d\tan (c+d x)}{a}-\frac {\cot (c+d x)}{a}\right )}{a}-\frac {\cot ^3(c+d x)}{3 a}\right )}{a}-\frac {\cot ^5(c+d x)}{5 a}}{d}\)

\(\Big \downarrow \) 218

\(\displaystyle \frac {-\frac {(a+b) \left (-\frac {(a+b) \left (-\frac {\sqrt {a+b} \arctan \left (\frac {\sqrt {a+b} \tan (c+d x)}{\sqrt {a}}\right )}{a^{3/2}}-\frac {\cot (c+d x)}{a}\right )}{a}-\frac {\cot ^3(c+d x)}{3 a}\right )}{a}-\frac {\cot ^5(c+d x)}{5 a}}{d}\)

Input:

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

Output:

(-1/5*Cot[c + d*x]^5/a - ((a + b)*(-1/3*Cot[c + d*x]^3/a - ((a + b)*(-((Sq 
rt[a + b]*ArcTan[(Sqrt[a + b]*Tan[c + d*x])/Sqrt[a]])/a^(3/2)) - Cot[c + d 
*x]/a))/a))/a)/d
 

Defintions of rubi rules used

rule 218
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/R 
t[a/b, 2]], x] /; FreeQ[{a, b}, x] && PosQ[a/b]
 

rule 264
Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Simp[(c*x)^( 
m + 1)*((a + b*x^2)^(p + 1)/(a*c*(m + 1))), x] - Simp[b*((m + 2*p + 3)/(a*c 
^2*(m + 1)))   Int[(c*x)^(m + 2)*(a + b*x^2)^p, x], x] /; FreeQ[{a, b, c, p 
}, x] && LtQ[m, -1] && IntBinomialQ[a, b, c, 2, m, p, x]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3674
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(p_.)*((d_.)*tan[(e_.) + (f_.) 
*(x_)])^(m_), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Simp[f 
f/f   Subst[Int[(d*ff*x)^m*((a + (a + b)*ff^2*x^2)^p/(1 + ff^2*x^2)^(p + 1) 
), x], x, Tan[e + f*x]/ff], x]] /; FreeQ[{a, b, d, e, f, m}, x] && IntegerQ 
[p]
 
Maple [A] (verified)

Time = 5.38 (sec) , antiderivative size = 115, normalized size of antiderivative = 1.20

method result size
derivativedivides \(\frac {-\frac {a^{2}+2 a b +b^{2}}{a^{3} \tan \left (d x +c \right )}-\frac {-a -b}{3 a^{2} \tan \left (d x +c \right )^{3}}-\frac {1}{5 a \tan \left (d x +c \right )^{5}}+\frac {\left (-a^{3}-3 a^{2} b -3 b^{2} a -b^{3}\right ) \arctan \left (\frac {\left (a +b \right ) \tan \left (d x +c \right )}{\sqrt {a \left (a +b \right )}}\right )}{a^{3} \sqrt {a \left (a +b \right )}}}{d}\) \(115\)
default \(\frac {-\frac {a^{2}+2 a b +b^{2}}{a^{3} \tan \left (d x +c \right )}-\frac {-a -b}{3 a^{2} \tan \left (d x +c \right )^{3}}-\frac {1}{5 a \tan \left (d x +c \right )^{5}}+\frac {\left (-a^{3}-3 a^{2} b -3 b^{2} a -b^{3}\right ) \arctan \left (\frac {\left (a +b \right ) \tan \left (d x +c \right )}{\sqrt {a \left (a +b \right )}}\right )}{a^{3} \sqrt {a \left (a +b \right )}}}{d}\) \(115\)
risch \(-\frac {2 i \left (45 a^{2} {\mathrm e}^{8 i \left (d x +c \right )}+45 \,{\mathrm e}^{8 i \left (d x +c \right )} a b +15 b^{2} {\mathrm e}^{8 i \left (d x +c \right )}-90 a^{2} {\mathrm e}^{6 i \left (d x +c \right )}-150 \,{\mathrm e}^{6 i \left (d x +c \right )} a b -60 b^{2} {\mathrm e}^{6 i \left (d x +c \right )}+140 a^{2} {\mathrm e}^{4 i \left (d x +c \right )}+200 \,{\mathrm e}^{4 i \left (d x +c \right )} a b +90 b^{2} {\mathrm e}^{4 i \left (d x +c \right )}-70 \,{\mathrm e}^{2 i \left (d x +c \right )} a^{2}-130 \,{\mathrm e}^{2 i \left (d x +c \right )} a b -60 b^{2} {\mathrm e}^{2 i \left (d x +c \right )}+23 a^{2}+35 a b +15 b^{2}\right )}{15 d \,a^{3} \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{5}}-\frac {\sqrt {-a \left (a +b \right )}\, \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+\frac {2 i \sqrt {-a \left (a +b \right )}-2 a -b}{b}\right )}{2 a^{2} d}-\frac {\sqrt {-a \left (a +b \right )}\, \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+\frac {2 i \sqrt {-a \left (a +b \right )}-2 a -b}{b}\right ) b}{a^{3} d}-\frac {\sqrt {-a \left (a +b \right )}\, \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+\frac {2 i \sqrt {-a \left (a +b \right )}-2 a -b}{b}\right ) b^{2}}{2 a^{4} d}+\frac {\sqrt {-a \left (a +b \right )}\, \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-\frac {2 i \sqrt {-a \left (a +b \right )}+2 a +b}{b}\right )}{2 a^{2} d}+\frac {\sqrt {-a \left (a +b \right )}\, \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-\frac {2 i \sqrt {-a \left (a +b \right )}+2 a +b}{b}\right ) b}{a^{3} d}+\frac {\sqrt {-a \left (a +b \right )}\, \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-\frac {2 i \sqrt {-a \left (a +b \right )}+2 a +b}{b}\right ) b^{2}}{2 a^{4} d}\) \(501\)

Input:

int(cot(d*x+c)^6/(a+b*sin(d*x+c)^2),x,method=_RETURNVERBOSE)
 

Output:

1/d*(-1/a^3*(a^2+2*a*b+b^2)/tan(d*x+c)-1/3*(-a-b)/a^2/tan(d*x+c)^3-1/5/a/t 
an(d*x+c)^5+1/a^3*(-a^3-3*a^2*b-3*a*b^2-b^3)/(a*(a+b))^(1/2)*arctan((a+b)* 
tan(d*x+c)/(a*(a+b))^(1/2)))
 

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 238 vs. \(2 (84) = 168\).

Time = 0.11 (sec) , antiderivative size = 576, normalized size of antiderivative = 6.00 \[ \int \frac {\cot ^6(c+d x)}{a+b \sin ^2(c+d x)} \, dx =\text {Too large to display} \] Input:

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

Output:

[-1/60*(4*(23*a^2 + 35*a*b + 15*b^2)*cos(d*x + c)^5 - 20*(7*a^2 + 13*a*b + 
 6*b^2)*cos(d*x + c)^3 - 15*((a^2 + 2*a*b + b^2)*cos(d*x + c)^4 - 2*(a^2 + 
 2*a*b + b^2)*cos(d*x + c)^2 + a^2 + 2*a*b + b^2)*sqrt(-(a + b)/a)*log(((8 
*a^2 + 8*a*b + b^2)*cos(d*x + c)^4 - 2*(4*a^2 + 5*a*b + b^2)*cos(d*x + c)^ 
2 + 4*((2*a^2 + a*b)*cos(d*x + c)^3 - (a^2 + a*b)*cos(d*x + c))*sqrt(-(a + 
 b)/a)*sin(d*x + c) + a^2 + 2*a*b + b^2)/(b^2*cos(d*x + c)^4 - 2*(a*b + b^ 
2)*cos(d*x + c)^2 + a^2 + 2*a*b + b^2))*sin(d*x + c) + 60*(a^2 + 2*a*b + b 
^2)*cos(d*x + c))/((a^3*d*cos(d*x + c)^4 - 2*a^3*d*cos(d*x + c)^2 + a^3*d) 
*sin(d*x + c)), -1/30*(2*(23*a^2 + 35*a*b + 15*b^2)*cos(d*x + c)^5 - 10*(7 
*a^2 + 13*a*b + 6*b^2)*cos(d*x + c)^3 - 15*((a^2 + 2*a*b + b^2)*cos(d*x + 
c)^4 - 2*(a^2 + 2*a*b + b^2)*cos(d*x + c)^2 + a^2 + 2*a*b + b^2)*sqrt((a + 
 b)/a)*arctan(1/2*((2*a + b)*cos(d*x + c)^2 - a - b)*sqrt((a + b)/a)/((a + 
 b)*cos(d*x + c)*sin(d*x + c)))*sin(d*x + c) + 30*(a^2 + 2*a*b + b^2)*cos( 
d*x + c))/((a^3*d*cos(d*x + c)^4 - 2*a^3*d*cos(d*x + c)^2 + a^3*d)*sin(d*x 
 + c))]
 

Sympy [F]

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

integrate(cot(d*x+c)**6/(a+b*sin(d*x+c)**2),x)
 

Output:

Integral(cot(c + d*x)**6/(a + b*sin(c + d*x)**2), x)
 

Maxima [A] (verification not implemented)

Time = 0.11 (sec) , antiderivative size = 111, normalized size of antiderivative = 1.16 \[ \int \frac {\cot ^6(c+d x)}{a+b \sin ^2(c+d x)} \, dx=-\frac {\frac {15 \, {\left (a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}\right )} \arctan \left (\frac {{\left (a + b\right )} \tan \left (d x + c\right )}{\sqrt {{\left (a + b\right )} a}}\right )}{\sqrt {{\left (a + b\right )} a} a^{3}} + \frac {15 \, {\left (a^{2} + 2 \, a b + b^{2}\right )} \tan \left (d x + c\right )^{4} - 5 \, {\left (a^{2} + a b\right )} \tan \left (d x + c\right )^{2} + 3 \, a^{2}}{a^{3} \tan \left (d x + c\right )^{5}}}{15 \, d} \] Input:

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

Output:

-1/15*(15*(a^3 + 3*a^2*b + 3*a*b^2 + b^3)*arctan((a + b)*tan(d*x + c)/sqrt 
((a + b)*a))/(sqrt((a + b)*a)*a^3) + (15*(a^2 + 2*a*b + b^2)*tan(d*x + c)^ 
4 - 5*(a^2 + a*b)*tan(d*x + c)^2 + 3*a^2)/(a^3*tan(d*x + c)^5))/d
 

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 171 vs. \(2 (84) = 168\).

Time = 0.71 (sec) , antiderivative size = 171, normalized size of antiderivative = 1.78 \[ \int \frac {\cot ^6(c+d x)}{a+b \sin ^2(c+d x)} \, dx=-\frac {\frac {15 \, {\left (a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}\right )} {\left (\pi \left \lfloor \frac {d x + c}{\pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (2 \, a + 2 \, b\right ) + \arctan \left (\frac {a \tan \left (d x + c\right ) + b \tan \left (d x + c\right )}{\sqrt {a^{2} + a b}}\right )\right )}}{\sqrt {a^{2} + a b} a^{3}} + \frac {15 \, a^{2} \tan \left (d x + c\right )^{4} + 30 \, a b \tan \left (d x + c\right )^{4} + 15 \, b^{2} \tan \left (d x + c\right )^{4} - 5 \, a^{2} \tan \left (d x + c\right )^{2} - 5 \, a b \tan \left (d x + c\right )^{2} + 3 \, a^{2}}{a^{3} \tan \left (d x + c\right )^{5}}}{15 \, d} \] Input:

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

Output:

-1/15*(15*(a^3 + 3*a^2*b + 3*a*b^2 + b^3)*(pi*floor((d*x + c)/pi + 1/2)*sg 
n(2*a + 2*b) + arctan((a*tan(d*x + c) + b*tan(d*x + c))/sqrt(a^2 + a*b)))/ 
(sqrt(a^2 + a*b)*a^3) + (15*a^2*tan(d*x + c)^4 + 30*a*b*tan(d*x + c)^4 + 1 
5*b^2*tan(d*x + c)^4 - 5*a^2*tan(d*x + c)^2 - 5*a*b*tan(d*x + c)^2 + 3*a^2 
)/(a^3*tan(d*x + c)^5))/d
 

Mupad [B] (verification not implemented)

Time = 35.29 (sec) , antiderivative size = 82, normalized size of antiderivative = 0.85 \[ \int \frac {\cot ^6(c+d x)}{a+b \sin ^2(c+d x)} \, dx=-\frac {\frac {1}{5\,a}-\frac {{\mathrm {tan}\left (c+d\,x\right )}^2\,\left (a+b\right )}{3\,a^2}+\frac {{\mathrm {tan}\left (c+d\,x\right )}^4\,{\left (a+b\right )}^2}{a^3}}{d\,{\mathrm {tan}\left (c+d\,x\right )}^5}-\frac {\mathrm {atan}\left (\frac {\mathrm {tan}\left (c+d\,x\right )\,\sqrt {a+b}}{\sqrt {a}}\right )\,{\left (a+b\right )}^{5/2}}{a^{7/2}\,d} \] Input:

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

Output:

- (1/(5*a) - (tan(c + d*x)^2*(a + b))/(3*a^2) + (tan(c + d*x)^4*(a + b)^2) 
/a^3)/(d*tan(c + d*x)^5) - (atan((tan(c + d*x)*(a + b)^(1/2))/a^(1/2))*(a 
+ b)^(5/2))/(a^(7/2)*d)
 

Reduce [B] (verification not implemented)

Time = 0.22 (sec) , antiderivative size = 1480, normalized size of antiderivative = 15.42 \[ \int \frac {\cot ^6(c+d x)}{a+b \sin ^2(c+d x)} \, dx =\text {Too large to display} \] Input:

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

Output:

(30*sqrt(b)*sqrt(a)*sqrt(a + b)*sqrt(2*sqrt(b)*sqrt(a + b) + a + 2*b)*atan 
((tan((c + d*x)/2)*a)/(sqrt(a)*sqrt(2*sqrt(b)*sqrt(a + b) + a + 2*b)))*sin 
(c + d*x)**5*a**2 + 60*sqrt(b)*sqrt(a)*sqrt(a + b)*sqrt(2*sqrt(b)*sqrt(a + 
 b) + a + 2*b)*atan((tan((c + d*x)/2)*a)/(sqrt(a)*sqrt(2*sqrt(b)*sqrt(a + 
b) + a + 2*b)))*sin(c + d*x)**5*a*b + 30*sqrt(b)*sqrt(a)*sqrt(a + b)*sqrt( 
2*sqrt(b)*sqrt(a + b) + a + 2*b)*atan((tan((c + d*x)/2)*a)/(sqrt(a)*sqrt(2 
*sqrt(b)*sqrt(a + b) + a + 2*b)))*sin(c + d*x)**5*b**2 - 30*sqrt(a)*sqrt(2 
*sqrt(b)*sqrt(a + b) + a + 2*b)*atan((tan((c + d*x)/2)*a)/(sqrt(a)*sqrt(2* 
sqrt(b)*sqrt(a + b) + a + 2*b)))*sin(c + d*x)**5*a**3 - 90*sqrt(a)*sqrt(2* 
sqrt(b)*sqrt(a + b) + a + 2*b)*atan((tan((c + d*x)/2)*a)/(sqrt(a)*sqrt(2*s 
qrt(b)*sqrt(a + b) + a + 2*b)))*sin(c + d*x)**5*a**2*b - 90*sqrt(a)*sqrt(2 
*sqrt(b)*sqrt(a + b) + a + 2*b)*atan((tan((c + d*x)/2)*a)/(sqrt(a)*sqrt(2* 
sqrt(b)*sqrt(a + b) + a + 2*b)))*sin(c + d*x)**5*a*b**2 - 30*sqrt(a)*sqrt( 
2*sqrt(b)*sqrt(a + b) + a + 2*b)*atan((tan((c + d*x)/2)*a)/(sqrt(a)*sqrt(2 
*sqrt(b)*sqrt(a + b) + a + 2*b)))*sin(c + d*x)**5*b**3 - 46*cos(c + d*x)*s 
in(c + d*x)**4*a**4 - 70*cos(c + d*x)*sin(c + d*x)**4*a**3*b - 30*cos(c + 
d*x)*sin(c + d*x)**4*a**2*b**2 + 22*cos(c + d*x)*sin(c + d*x)**2*a**4 + 10 
*cos(c + d*x)*sin(c + d*x)**2*a**3*b - 6*cos(c + d*x)*a**4 + 15*sqrt(b)*sq 
rt(a)*sqrt(a + b)*sqrt(2*sqrt(b)*sqrt(a + b) - a - 2*b)*log( - sqrt(2*sqrt 
(b)*sqrt(a + b) - a - 2*b) + sqrt(a)*tan((c + d*x)/2))*sin(c + d*x)**5*...