\(\int \frac {1}{(a+b \csc ^2(c+d x))^3} \, dx\) [7]

Optimal result
Mathematica [A] (verified)
Rubi [A] (verified)
Maple [A] (verified)
Fricas [B] (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 = 14, antiderivative size = 144 \[ \int \frac {1}{\left (a+b \csc ^2(c+d x)\right )^3} \, dx=\frac {x}{a^3}+\frac {\sqrt {b} \left (15 a^2+20 a b+8 b^2\right ) \arctan \left (\frac {\sqrt {b} \cot (c+d x)}{\sqrt {a+b}}\right )}{8 a^3 (a+b)^{5/2} d}+\frac {b \cot (c+d x)}{4 a (a+b) d \left (a+b+b \cot ^2(c+d x)\right )^2}+\frac {b (7 a+4 b) \cot (c+d x)}{8 a^2 (a+b)^2 d \left (a+b+b \cot ^2(c+d x)\right )} \] Output:

x/a^3+1/8*b^(1/2)*(15*a^2+20*a*b+8*b^2)*arctan(b^(1/2)*cot(d*x+c)/(a+b)^(1 
/2))/a^3/(a+b)^(5/2)/d+1/4*b*cot(d*x+c)/a/(a+b)/d/(a+b+b*cot(d*x+c)^2)^2+1 
/8*b*(7*a+4*b)*cot(d*x+c)/a^2/(a+b)^2/d/(a+b+b*cot(d*x+c)^2)
 

Mathematica [A] (verified)

Time = 7.17 (sec) , antiderivative size = 201, normalized size of antiderivative = 1.40 \[ \int \frac {1}{\left (a+b \csc ^2(c+d x)\right )^3} \, dx=\frac {(-a-2 b+a \cos (2 (c+d x))) \csc ^6(c+d x) \left (-8 (c+d x) (a+2 b-a \cos (2 (c+d x)))^2+\frac {\sqrt {b} \left (15 a^2+20 a b+8 b^2\right ) \arctan \left (\frac {\sqrt {a+b} \tan (c+d x)}{\sqrt {b}}\right ) (a+2 b-a \cos (2 (c+d x)))^2}{(a+b)^{5/2}}+\frac {4 a b^2 \sin (2 (c+d x))}{a+b}+\frac {3 a b (3 a+2 b) (-a-2 b+a \cos (2 (c+d x))) \sin (2 (c+d x))}{(a+b)^2}\right )}{64 a^3 d \left (a+b \csc ^2(c+d x)\right )^3} \] Input:

Integrate[(a + b*Csc[c + d*x]^2)^(-3),x]
 

Output:

((-a - 2*b + a*Cos[2*(c + d*x)])*Csc[c + d*x]^6*(-8*(c + d*x)*(a + 2*b - a 
*Cos[2*(c + d*x)])^2 + (Sqrt[b]*(15*a^2 + 20*a*b + 8*b^2)*ArcTan[(Sqrt[a + 
 b]*Tan[c + d*x])/Sqrt[b]]*(a + 2*b - a*Cos[2*(c + d*x)])^2)/(a + b)^(5/2) 
 + (4*a*b^2*Sin[2*(c + d*x)])/(a + b) + (3*a*b*(3*a + 2*b)*(-a - 2*b + a*C 
os[2*(c + d*x)])*Sin[2*(c + d*x)])/(a + b)^2))/(64*a^3*d*(a + b*Csc[c + d* 
x]^2)^3)
 

Rubi [A] (verified)

Time = 0.34 (sec) , antiderivative size = 176, normalized size of antiderivative = 1.22, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {3042, 4616, 316, 402, 397, 216, 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 {1}{\left (a+b \csc ^2(c+d x)\right )^3} \, dx\)

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4616

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

\(\Big \downarrow \) 316

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

\(\Big \downarrow \) 402

\(\displaystyle -\frac {\frac {\frac {\int \frac {8 a^2+9 b a+4 b^2-b (7 a+4 b) \cot ^2(c+d x)}{\left (\cot ^2(c+d x)+1\right ) \left (b \cot ^2(c+d x)+a+b\right )}d\cot (c+d x)}{2 a (a+b)}-\frac {b (7 a+4 b) \cot (c+d x)}{2 a (a+b) \left (a+b \cot ^2(c+d x)+b\right )}}{4 a (a+b)}-\frac {b \cot (c+d x)}{4 a (a+b) \left (a+b \cot ^2(c+d x)+b\right )^2}}{d}\)

\(\Big \downarrow \) 397

\(\displaystyle -\frac {\frac {\frac {\frac {8 (a+b)^2 \int \frac {1}{\cot ^2(c+d x)+1}d\cot (c+d x)}{a}-\frac {b \left (15 a^2+20 a b+8 b^2\right ) \int \frac {1}{b \cot ^2(c+d x)+a+b}d\cot (c+d x)}{a}}{2 a (a+b)}-\frac {b (7 a+4 b) \cot (c+d x)}{2 a (a+b) \left (a+b \cot ^2(c+d x)+b\right )}}{4 a (a+b)}-\frac {b \cot (c+d x)}{4 a (a+b) \left (a+b \cot ^2(c+d x)+b\right )^2}}{d}\)

\(\Big \downarrow \) 216

\(\displaystyle -\frac {\frac {\frac {\frac {8 (a+b)^2 \arctan (\cot (c+d x))}{a}-\frac {b \left (15 a^2+20 a b+8 b^2\right ) \int \frac {1}{b \cot ^2(c+d x)+a+b}d\cot (c+d x)}{a}}{2 a (a+b)}-\frac {b (7 a+4 b) \cot (c+d x)}{2 a (a+b) \left (a+b \cot ^2(c+d x)+b\right )}}{4 a (a+b)}-\frac {b \cot (c+d x)}{4 a (a+b) \left (a+b \cot ^2(c+d x)+b\right )^2}}{d}\)

\(\Big \downarrow \) 218

\(\displaystyle -\frac {\frac {\frac {\frac {8 (a+b)^2 \arctan (\cot (c+d x))}{a}-\frac {\sqrt {b} \left (15 a^2+20 a b+8 b^2\right ) \arctan \left (\frac {\sqrt {b} \cot (c+d x)}{\sqrt {a+b}}\right )}{a \sqrt {a+b}}}{2 a (a+b)}-\frac {b (7 a+4 b) \cot (c+d x)}{2 a (a+b) \left (a+b \cot ^2(c+d x)+b\right )}}{4 a (a+b)}-\frac {b \cot (c+d x)}{4 a (a+b) \left (a+b \cot ^2(c+d x)+b\right )^2}}{d}\)

Input:

Int[(a + b*Csc[c + d*x]^2)^(-3),x]
 

Output:

-((-1/4*(b*Cot[c + d*x])/(a*(a + b)*(a + b + b*Cot[c + d*x]^2)^2) + (((8*( 
a + b)^2*ArcTan[Cot[c + d*x]])/a - (Sqrt[b]*(15*a^2 + 20*a*b + 8*b^2)*ArcT 
an[(Sqrt[b]*Cot[c + d*x])/Sqrt[a + b]])/(a*Sqrt[a + b]))/(2*a*(a + b)) - ( 
b*(7*a + 4*b)*Cot[c + d*x])/(2*a*(a + b)*(a + b + b*Cot[c + d*x]^2)))/(4*a 
*(a + b)))/d)
 

Defintions of rubi rules used

rule 216
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*A 
rcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a 
, 0] || GtQ[b, 0])
 

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 316
Int[((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2)^(q_), x_Symbol] :> Sim 
p[(-b)*x*(a + b*x^2)^(p + 1)*((c + d*x^2)^(q + 1)/(2*a*(p + 1)*(b*c - a*d)) 
), x] + Simp[1/(2*a*(p + 1)*(b*c - a*d))   Int[(a + b*x^2)^(p + 1)*(c + d*x 
^2)^q*Simp[b*c + 2*(p + 1)*(b*c - a*d) + d*b*(2*(p + q + 2) + 1)*x^2, x], x 
], x] /; FreeQ[{a, b, c, d, q}, x] && NeQ[b*c - a*d, 0] && LtQ[p, -1] &&  ! 
( !IntegerQ[p] && IntegerQ[q] && LtQ[q, -1]) && IntBinomialQ[a, b, c, d, 2, 
 p, q, x]
 

rule 397
Int[((e_) + (f_.)*(x_)^2)/(((a_) + (b_.)*(x_)^2)*((c_) + (d_.)*(x_)^2)), x_ 
Symbol] :> Simp[(b*e - a*f)/(b*c - a*d)   Int[1/(a + b*x^2), x], x] - Simp[ 
(d*e - c*f)/(b*c - a*d)   Int[1/(c + d*x^2), x], x] /; FreeQ[{a, b, c, d, e 
, f}, x]
 

rule 402
Int[((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2)^(q_.)*((e_) + (f_.)*(x 
_)^2), x_Symbol] :> Simp[(-(b*e - a*f))*x*(a + b*x^2)^(p + 1)*((c + d*x^2)^ 
(q + 1)/(a*2*(b*c - a*d)*(p + 1))), x] + Simp[1/(a*2*(b*c - a*d)*(p + 1)) 
 Int[(a + b*x^2)^(p + 1)*(c + d*x^2)^q*Simp[c*(b*e - a*f) + e*2*(b*c - a*d) 
*(p + 1) + d*(b*e - a*f)*(2*(p + q + 2) + 1)*x^2, x], x], x] /; FreeQ[{a, b 
, c, d, e, f, q}, x] && LtQ[p, -1]
 

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

rule 4616
Int[((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^2)^(p_), x_Symbol] :> With[{ff = 
FreeFactors[Tan[e + f*x], x]}, Simp[ff/f   Subst[Int[(a + b + b*ff^2*x^2)^p 
/(1 + ff^2*x^2), x], x, Tan[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, p}, x] 
&& NeQ[a + b, 0] && NeQ[p, -1]
 
Maple [A] (verified)

Time = 0.58 (sec) , antiderivative size = 158, normalized size of antiderivative = 1.10

method result size
derivativedivides \(\frac {-\frac {b \left (\frac {-\frac {\left (9 a +4 b \right ) a \tan \left (d x +c \right )^{3}}{8 \left (a +b \right )}-\frac {b a \left (7 a +4 b \right ) \tan \left (d x +c \right )}{8 \left (a^{2}+2 b a +b^{2}\right )}}{\left (\tan \left (d x +c \right )^{2} a +\tan \left (d x +c \right )^{2} b +b \right )^{2}}+\frac {\left (15 a^{2}+20 b a +8 b^{2}\right ) \arctan \left (\frac {\left (a +b \right ) \tan \left (d x +c \right )}{\sqrt {b \left (a +b \right )}}\right )}{8 \left (a^{2}+2 b a +b^{2}\right ) \sqrt {b \left (a +b \right )}}\right )}{a^{3}}+\frac {\arctan \left (\tan \left (d x +c \right )\right )}{a^{3}}}{d}\) \(158\)
default \(\frac {-\frac {b \left (\frac {-\frac {\left (9 a +4 b \right ) a \tan \left (d x +c \right )^{3}}{8 \left (a +b \right )}-\frac {b a \left (7 a +4 b \right ) \tan \left (d x +c \right )}{8 \left (a^{2}+2 b a +b^{2}\right )}}{\left (\tan \left (d x +c \right )^{2} a +\tan \left (d x +c \right )^{2} b +b \right )^{2}}+\frac {\left (15 a^{2}+20 b a +8 b^{2}\right ) \arctan \left (\frac {\left (a +b \right ) \tan \left (d x +c \right )}{\sqrt {b \left (a +b \right )}}\right )}{8 \left (a^{2}+2 b a +b^{2}\right ) \sqrt {b \left (a +b \right )}}\right )}{a^{3}}+\frac {\arctan \left (\tan \left (d x +c \right )\right )}{a^{3}}}{d}\) \(158\)
risch \(\frac {x}{a^{3}}-\frac {i b \left (-9 a^{3} {\mathrm e}^{6 i \left (d x +c \right )}-28 a^{2} b \,{\mathrm e}^{6 i \left (d x +c \right )}-16 a \,b^{2} {\mathrm e}^{6 i \left (d x +c \right )}+27 a^{3} {\mathrm e}^{4 i \left (d x +c \right )}+90 a^{2} b \,{\mathrm e}^{4 i \left (d x +c \right )}+120 a \,b^{2} {\mathrm e}^{4 i \left (d x +c \right )}+48 b^{3} {\mathrm e}^{4 i \left (d x +c \right )}-27 a^{3} {\mathrm e}^{2 i \left (d x +c \right )}-68 a^{2} b \,{\mathrm e}^{2 i \left (d x +c \right )}-32 a \,b^{2} {\mathrm e}^{2 i \left (d x +c \right )}+9 a^{3}+6 a^{2} b \right )}{4 a^{3} \left (a +b \right )^{2} d \left (-a \,{\mathrm e}^{4 i \left (d x +c \right )}+2 a \,{\mathrm e}^{2 i \left (d x +c \right )}+4 b \,{\mathrm e}^{2 i \left (d x +c \right )}-a \right )^{2}}+\frac {15 \sqrt {-b \left (a +b \right )}\, \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-\frac {2 i \sqrt {-b \left (a +b \right )}+a +2 b}{a}\right )}{16 \left (a +b \right )^{3} d a}+\frac {5 \sqrt {-b \left (a +b \right )}\, \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-\frac {2 i \sqrt {-b \left (a +b \right )}+a +2 b}{a}\right ) b}{4 \left (a +b \right )^{3} d \,a^{2}}+\frac {\sqrt {-b \left (a +b \right )}\, \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-\frac {2 i \sqrt {-b \left (a +b \right )}+a +2 b}{a}\right ) b^{2}}{2 \left (a +b \right )^{3} d \,a^{3}}-\frac {15 \sqrt {-b \left (a +b \right )}\, \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+\frac {2 i \sqrt {-b \left (a +b \right )}-a -2 b}{a}\right )}{16 \left (a +b \right )^{3} d a}-\frac {5 \sqrt {-b \left (a +b \right )}\, \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+\frac {2 i \sqrt {-b \left (a +b \right )}-a -2 b}{a}\right ) b}{4 \left (a +b \right )^{3} d \,a^{2}}-\frac {\sqrt {-b \left (a +b \right )}\, \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+\frac {2 i \sqrt {-b \left (a +b \right )}-a -2 b}{a}\right ) b^{2}}{2 \left (a +b \right )^{3} d \,a^{3}}\) \(551\)

Input:

int(1/(a+b*csc(d*x+c)^2)^3,x,method=_RETURNVERBOSE)
 

Output:

1/d*(-b/a^3*((-1/8*(9*a+4*b)*a/(a+b)*tan(d*x+c)^3-1/8*b*a*(7*a+4*b)/(a^2+2 
*a*b+b^2)*tan(d*x+c))/(tan(d*x+c)^2*a+tan(d*x+c)^2*b+b)^2+1/8*(15*a^2+20*a 
*b+8*b^2)/(a^2+2*a*b+b^2)/(b*(a+b))^(1/2)*arctan((a+b)*tan(d*x+c)/(b*(a+b) 
)^(1/2)))+1/a^3*arctan(tan(d*x+c)))
 

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 420 vs. \(2 (130) = 260\).

Time = 0.13 (sec) , antiderivative size = 950, normalized size of antiderivative = 6.60 \[ \int \frac {1}{\left (a+b \csc ^2(c+d x)\right )^3} \, dx=\text {Too large to display} \] Input:

integrate(1/(a+b*csc(d*x+c)^2)^3,x, algorithm="fricas")
 

Output:

[1/32*(32*(a^4 + 2*a^3*b + a^2*b^2)*d*x*cos(d*x + c)^4 - 64*(a^4 + 3*a^3*b 
 + 3*a^2*b^2 + a*b^3)*d*x*cos(d*x + c)^2 + 32*(a^4 + 4*a^3*b + 6*a^2*b^2 + 
 4*a*b^3 + b^4)*d*x + ((15*a^4 + 20*a^3*b + 8*a^2*b^2)*cos(d*x + c)^4 + 15 
*a^4 + 50*a^3*b + 63*a^2*b^2 + 36*a*b^3 + 8*b^4 - 2*(15*a^4 + 35*a^3*b + 2 
8*a^2*b^2 + 8*a*b^3)*cos(d*x + c)^2)*sqrt(-b/(a + b))*log(((a^2 + 8*a*b + 
8*b^2)*cos(d*x + c)^4 - 2*(a^2 + 5*a*b + 4*b^2)*cos(d*x + c)^2 + 4*((a^2 + 
 3*a*b + 2*b^2)*cos(d*x + c)^3 - (a^2 + 2*a*b + b^2)*cos(d*x + c))*sqrt(-b 
/(a + b))*sin(d*x + c) + a^2 + 2*a*b + b^2)/(a^2*cos(d*x + c)^4 - 2*(a^2 + 
 a*b)*cos(d*x + c)^2 + a^2 + 2*a*b + b^2)) - 4*(3*(3*a^3*b + 2*a^2*b^2)*co 
s(d*x + c)^3 - (9*a^3*b + 13*a^2*b^2 + 4*a*b^3)*cos(d*x + c))*sin(d*x + c) 
)/((a^7 + 2*a^6*b + a^5*b^2)*d*cos(d*x + c)^4 - 2*(a^7 + 3*a^6*b + 3*a^5*b 
^2 + a^4*b^3)*d*cos(d*x + c)^2 + (a^7 + 4*a^6*b + 6*a^5*b^2 + 4*a^4*b^3 + 
a^3*b^4)*d), 1/16*(16*(a^4 + 2*a^3*b + a^2*b^2)*d*x*cos(d*x + c)^4 - 32*(a 
^4 + 3*a^3*b + 3*a^2*b^2 + a*b^3)*d*x*cos(d*x + c)^2 + 16*(a^4 + 4*a^3*b + 
 6*a^2*b^2 + 4*a*b^3 + b^4)*d*x + ((15*a^4 + 20*a^3*b + 8*a^2*b^2)*cos(d*x 
 + c)^4 + 15*a^4 + 50*a^3*b + 63*a^2*b^2 + 36*a*b^3 + 8*b^4 - 2*(15*a^4 + 
35*a^3*b + 28*a^2*b^2 + 8*a*b^3)*cos(d*x + c)^2)*sqrt(b/(a + b))*arctan(1/ 
2*((a + 2*b)*cos(d*x + c)^2 - a - b)*sqrt(b/(a + b))/(b*cos(d*x + c)*sin(d 
*x + c))) - 2*(3*(3*a^3*b + 2*a^2*b^2)*cos(d*x + c)^3 - (9*a^3*b + 13*a^2* 
b^2 + 4*a*b^3)*cos(d*x + c))*sin(d*x + c))/((a^7 + 2*a^6*b + a^5*b^2)*d...
 

Sympy [F]

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

integrate(1/(a+b*csc(d*x+c)**2)**3,x)
 

Output:

Integral((a + b*csc(c + d*x)**2)**(-3), x)
 

Maxima [A] (verification not implemented)

Time = 0.12 (sec) , antiderivative size = 234, normalized size of antiderivative = 1.62 \[ \int \frac {1}{\left (a+b \csc ^2(c+d x)\right )^3} \, dx=-\frac {\frac {{\left (15 \, a^{2} b + 20 \, a b^{2} + 8 \, b^{3}\right )} \arctan \left (\frac {{\left (a + b\right )} \tan \left (d x + c\right )}{\sqrt {{\left (a + b\right )} b}}\right )}{{\left (a^{5} + 2 \, a^{4} b + a^{3} b^{2}\right )} \sqrt {{\left (a + b\right )} b}} - \frac {{\left (9 \, a^{2} b + 13 \, a b^{2} + 4 \, b^{3}\right )} \tan \left (d x + c\right )^{3} + {\left (7 \, a b^{2} + 4 \, b^{3}\right )} \tan \left (d x + c\right )}{a^{4} b^{2} + 2 \, a^{3} b^{3} + a^{2} b^{4} + {\left (a^{6} + 4 \, a^{5} b + 6 \, a^{4} b^{2} + 4 \, a^{3} b^{3} + a^{2} b^{4}\right )} \tan \left (d x + c\right )^{4} + 2 \, {\left (a^{5} b + 3 \, a^{4} b^{2} + 3 \, a^{3} b^{3} + a^{2} b^{4}\right )} \tan \left (d x + c\right )^{2}} - \frac {8 \, {\left (d x + c\right )}}{a^{3}}}{8 \, d} \] Input:

integrate(1/(a+b*csc(d*x+c)^2)^3,x, algorithm="maxima")
 

Output:

-1/8*((15*a^2*b + 20*a*b^2 + 8*b^3)*arctan((a + b)*tan(d*x + c)/sqrt((a + 
b)*b))/((a^5 + 2*a^4*b + a^3*b^2)*sqrt((a + b)*b)) - ((9*a^2*b + 13*a*b^2 
+ 4*b^3)*tan(d*x + c)^3 + (7*a*b^2 + 4*b^3)*tan(d*x + c))/(a^4*b^2 + 2*a^3 
*b^3 + a^2*b^4 + (a^6 + 4*a^5*b + 6*a^4*b^2 + 4*a^3*b^3 + a^2*b^4)*tan(d*x 
 + c)^4 + 2*(a^5*b + 3*a^4*b^2 + 3*a^3*b^3 + a^2*b^4)*tan(d*x + c)^2) - 8* 
(d*x + c)/a^3)/d
 

Giac [A] (verification not implemented)

Time = 0.15 (sec) , antiderivative size = 224, normalized size of antiderivative = 1.56 \[ \int \frac {1}{\left (a+b \csc ^2(c+d x)\right )^3} \, dx=-\frac {\frac {{\left (15 \, a^{2} b + 20 \, a b^{2} + 8 \, 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 b + b^{2}}}\right )\right )}}{{\left (a^{5} + 2 \, a^{4} b + a^{3} b^{2}\right )} \sqrt {a b + b^{2}}} - \frac {9 \, a^{2} b \tan \left (d x + c\right )^{3} + 13 \, a b^{2} \tan \left (d x + c\right )^{3} + 4 \, b^{3} \tan \left (d x + c\right )^{3} + 7 \, a b^{2} \tan \left (d x + c\right ) + 4 \, b^{3} \tan \left (d x + c\right )}{{\left (a^{4} + 2 \, a^{3} b + a^{2} b^{2}\right )} {\left (a \tan \left (d x + c\right )^{2} + b \tan \left (d x + c\right )^{2} + b\right )}^{2}} - \frac {8 \, {\left (d x + c\right )}}{a^{3}}}{8 \, d} \] Input:

integrate(1/(a+b*csc(d*x+c)^2)^3,x, algorithm="giac")
 

Output:

-1/8*((15*a^2*b + 20*a*b^2 + 8*b^3)*(pi*floor((d*x + c)/pi + 1/2)*sgn(2*a 
+ 2*b) + arctan((a*tan(d*x + c) + b*tan(d*x + c))/sqrt(a*b + b^2)))/((a^5 
+ 2*a^4*b + a^3*b^2)*sqrt(a*b + b^2)) - (9*a^2*b*tan(d*x + c)^3 + 13*a*b^2 
*tan(d*x + c)^3 + 4*b^3*tan(d*x + c)^3 + 7*a*b^2*tan(d*x + c) + 4*b^3*tan( 
d*x + c))/((a^4 + 2*a^3*b + a^2*b^2)*(a*tan(d*x + c)^2 + b*tan(d*x + c)^2 
+ b)^2) - 8*(d*x + c)/a^3)/d
 

Mupad [B] (verification not implemented)

Time = 18.35 (sec) , antiderivative size = 3189, normalized size of antiderivative = 22.15 \[ \int \frac {1}{\left (a+b \csc ^2(c+d x)\right )^3} \, dx=\text {Too large to display} \] Input:

int(1/(a + b/sin(c + d*x)^2)^3,x)
                                                                                    
                                                                                    
 

Output:

((tan(c + d*x)^3*(9*a*b + 4*b^2))/(8*(a^2*b + a^3)) + (b*tan(c + d*x)*(7*a 
*b + 4*b^2))/(8*(2*a^3*b + a^4 + a^2*b^2)))/(d*(tan(c + d*x)^4*(2*a*b + a^ 
2 + b^2) + b^2 + tan(c + d*x)^2*(2*a*b + 2*b^2))) - atan(((((((7*a^10*b)/2 
 + 2*a^6*b^5 + (19*a^7*b^4)/2 + (33*a^8*b^3)/2 + (25*a^9*b^2)/2)*1i)/(2*(3 
*a^8*b + a^9 + a^6*b^3 + 3*a^7*b^2)) - (tan(c + d*x)*(1792*a^11*b + 256*a^ 
12 + 512*a^6*b^6 + 2816*a^7*b^5 + 6400*a^8*b^4 + 7680*a^9*b^3 + 5120*a^10* 
b^2))/(128*a^3*(3*a^6*b + a^7 + a^4*b^3 + 3*a^5*b^2)))/(2*a^3) + (tan(c + 
d*x)*(704*a*b^5 + 384*a^5*b + 64*a^6 + 128*b^6 + 1600*a^2*b^4 + 1880*a^3*b 
^3 + 1185*a^4*b^2))/(64*(3*a^6*b + a^7 + a^4*b^3 + 3*a^5*b^2)))/a^3 - (((( 
(7*a^10*b)/2 + 2*a^6*b^5 + (19*a^7*b^4)/2 + (33*a^8*b^3)/2 + (25*a^9*b^2)/ 
2)*1i)/(2*(3*a^8*b + a^9 + a^6*b^3 + 3*a^7*b^2)) + (tan(c + d*x)*(1792*a^1 
1*b + 256*a^12 + 512*a^6*b^6 + 2816*a^7*b^5 + 6400*a^8*b^4 + 7680*a^9*b^3 
+ 5120*a^10*b^2))/(128*a^3*(3*a^6*b + a^7 + a^4*b^3 + 3*a^5*b^2)))/(2*a^3) 
 - (tan(c + d*x)*(704*a*b^5 + 384*a^5*b + 64*a^6 + 128*b^6 + 1600*a^2*b^4 
+ 1880*a^3*b^3 + 1185*a^4*b^2))/(64*(3*a^6*b + a^7 + a^4*b^3 + 3*a^5*b^2)) 
)/a^3)/(((19*a*b^4)/4 + (15*a^4*b)/4 + b^5 + (19*a^2*b^3)/2 + (295*a^3*b^2 
)/32)/(3*a^8*b + a^9 + a^6*b^3 + 3*a^7*b^2) + ((((((7*a^10*b)/2 + 2*a^6*b^ 
5 + (19*a^7*b^4)/2 + (33*a^8*b^3)/2 + (25*a^9*b^2)/2)*1i)/(2*(3*a^8*b + a^ 
9 + a^6*b^3 + 3*a^7*b^2)) - (tan(c + d*x)*(1792*a^11*b + 256*a^12 + 512*a^ 
6*b^6 + 2816*a^7*b^5 + 6400*a^8*b^4 + 7680*a^9*b^3 + 5120*a^10*b^2))/(1...
 

Reduce [B] (verification not implemented)

Time = 0.58 (sec) , antiderivative size = 4439, normalized size of antiderivative = 30.83 \[ \int \frac {1}{\left (a+b \csc ^2(c+d x)\right )^3} \, dx =\text {Too large to display} \] Input:

int(1/(a+b*csc(d*x+c)^2)^3,x)
 

Output:

(30*sqrt(b)*sqrt(a)*sqrt(a + b)*sqrt(2*sqrt(a)*sqrt(a + b) + 2*a + b)*atan 
((tan((c + d*x)/2)*b)/(sqrt(b)*sqrt(2*sqrt(a)*sqrt(a + b) + 2*a + b)))*sin 
(c + d*x)**4*a**4 + 40*sqrt(b)*sqrt(a)*sqrt(a + b)*sqrt(2*sqrt(a)*sqrt(a + 
 b) + 2*a + b)*atan((tan((c + d*x)/2)*b)/(sqrt(b)*sqrt(2*sqrt(a)*sqrt(a + 
b) + 2*a + b)))*sin(c + d*x)**4*a**3*b + 16*sqrt(b)*sqrt(a)*sqrt(a + b)*sq 
rt(2*sqrt(a)*sqrt(a + b) + 2*a + b)*atan((tan((c + d*x)/2)*b)/(sqrt(b)*sqr 
t(2*sqrt(a)*sqrt(a + b) + 2*a + b)))*sin(c + d*x)**4*a**2*b**2 + 60*sqrt(b 
)*sqrt(a)*sqrt(a + b)*sqrt(2*sqrt(a)*sqrt(a + b) + 2*a + b)*atan((tan((c + 
 d*x)/2)*b)/(sqrt(b)*sqrt(2*sqrt(a)*sqrt(a + b) + 2*a + b)))*sin(c + d*x)* 
*2*a**3*b + 80*sqrt(b)*sqrt(a)*sqrt(a + b)*sqrt(2*sqrt(a)*sqrt(a + b) + 2* 
a + b)*atan((tan((c + d*x)/2)*b)/(sqrt(b)*sqrt(2*sqrt(a)*sqrt(a + b) + 2*a 
 + b)))*sin(c + d*x)**2*a**2*b**2 + 32*sqrt(b)*sqrt(a)*sqrt(a + b)*sqrt(2* 
sqrt(a)*sqrt(a + b) + 2*a + b)*atan((tan((c + d*x)/2)*b)/(sqrt(b)*sqrt(2*s 
qrt(a)*sqrt(a + b) + 2*a + b)))*sin(c + d*x)**2*a*b**3 + 30*sqrt(b)*sqrt(a 
)*sqrt(a + b)*sqrt(2*sqrt(a)*sqrt(a + b) + 2*a + b)*atan((tan((c + d*x)/2) 
*b)/(sqrt(b)*sqrt(2*sqrt(a)*sqrt(a + b) + 2*a + b)))*a**2*b**2 + 40*sqrt(b 
)*sqrt(a)*sqrt(a + b)*sqrt(2*sqrt(a)*sqrt(a + b) + 2*a + b)*atan((tan((c + 
 d*x)/2)*b)/(sqrt(b)*sqrt(2*sqrt(a)*sqrt(a + b) + 2*a + b)))*a*b**3 + 16*s 
qrt(b)*sqrt(a)*sqrt(a + b)*sqrt(2*sqrt(a)*sqrt(a + b) + 2*a + b)*atan((tan 
((c + d*x)/2)*b)/(sqrt(b)*sqrt(2*sqrt(a)*sqrt(a + b) + 2*a + b)))*b**4 ...