\(\int \frac {\csc ^5(e+f x)}{a+b \sec ^2(e+f x)} \, dx\) [33]

Optimal result
Mathematica [C] (warning: unable to verify)
Rubi [A] (verified)
Maple [A] (verified)
Fricas [B] (verification not implemented)
Sympy [F]
Maxima [B] (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 = 129 \[ \int \frac {\csc ^5(e+f x)}{a+b \sec ^2(e+f x)} \, dx=\frac {a^{3/2} \sqrt {b} \arctan \left (\frac {\sqrt {a} \cos (e+f x)}{\sqrt {b}}\right )}{(a+b)^3 f}-\frac {\left (3 a^2-6 a b-b^2\right ) \text {arctanh}(\cos (e+f x))}{8 (a+b)^3 f}-\frac {(3 a-b) \cot (e+f x) \csc (e+f x)}{8 (a+b)^2 f}-\frac {\cot (e+f x) \csc ^3(e+f x)}{4 (a+b) f} \] Output:

a^(3/2)*b^(1/2)*arctan(a^(1/2)*cos(f*x+e)/b^(1/2))/(a+b)^3/f-1/8*(3*a^2-6* 
a*b-b^2)*arctanh(cos(f*x+e))/(a+b)^3/f-1/8*(3*a-b)*cot(f*x+e)*csc(f*x+e)/( 
a+b)^2/f-1/4*cot(f*x+e)*csc(f*x+e)^3/(a+b)/f
 

Mathematica [C] (warning: unable to verify)

Result contains complex when optimal does not.

Time = 4.68 (sec) , antiderivative size = 549, normalized size of antiderivative = 4.26 \[ \int \frac {\csc ^5(e+f x)}{a+b \sec ^2(e+f x)} \, dx=-\frac {(a+2 b+a \cos (2 (e+f x))) \left (-64 a^{3/2} \sqrt {b} \arctan \left (\frac {\left (-\sqrt {a}-i \sqrt {a+b} \sqrt {(\cos (e)-i \sin (e))^2}\right ) \sin (e) \tan \left (\frac {f x}{2}\right )+\cos (e) \left (\sqrt {a}-\sqrt {a+b} \sqrt {(\cos (e)-i \sin (e))^2} \tan \left (\frac {f x}{2}\right )\right )}{\sqrt {b}}\right )-64 a^{3/2} \sqrt {b} \arctan \left (\frac {\left (-\sqrt {a}+i \sqrt {a+b} \sqrt {(\cos (e)-i \sin (e))^2}\right ) \sin (e) \tan \left (\frac {f x}{2}\right )+\cos (e) \left (\sqrt {a}+\sqrt {a+b} \sqrt {(\cos (e)-i \sin (e))^2} \tan \left (\frac {f x}{2}\right )\right )}{\sqrt {b}}\right )+6 a^2 \csc ^2\left (\frac {1}{2} (e+f x)\right )+4 a b \csc ^2\left (\frac {1}{2} (e+f x)\right )-2 b^2 \csc ^2\left (\frac {1}{2} (e+f x)\right )+a^2 \csc ^4\left (\frac {1}{2} (e+f x)\right )+2 a b \csc ^4\left (\frac {1}{2} (e+f x)\right )+b^2 \csc ^4\left (\frac {1}{2} (e+f x)\right )+24 a^2 \log \left (\cos \left (\frac {1}{2} (e+f x)\right )\right )-48 a b \log \left (\cos \left (\frac {1}{2} (e+f x)\right )\right )-8 b^2 \log \left (\cos \left (\frac {1}{2} (e+f x)\right )\right )-24 a^2 \log \left (\sin \left (\frac {1}{2} (e+f x)\right )\right )+48 a b \log \left (\sin \left (\frac {1}{2} (e+f x)\right )\right )+8 b^2 \log \left (\sin \left (\frac {1}{2} (e+f x)\right )\right )-6 a^2 \sec ^2\left (\frac {1}{2} (e+f x)\right )-4 a b \sec ^2\left (\frac {1}{2} (e+f x)\right )+2 b^2 \sec ^2\left (\frac {1}{2} (e+f x)\right )-a^2 \sec ^4\left (\frac {1}{2} (e+f x)\right )-2 a b \sec ^4\left (\frac {1}{2} (e+f x)\right )-b^2 \sec ^4\left (\frac {1}{2} (e+f x)\right )\right ) \sec ^2(e+f x)}{128 (a+b)^3 f \left (a+b \sec ^2(e+f x)\right )} \] Input:

Integrate[Csc[e + f*x]^5/(a + b*Sec[e + f*x]^2),x]
 

Output:

-1/128*((a + 2*b + a*Cos[2*(e + f*x)])*(-64*a^(3/2)*Sqrt[b]*ArcTan[((-Sqrt 
[a] - I*Sqrt[a + b]*Sqrt[(Cos[e] - I*Sin[e])^2])*Sin[e]*Tan[(f*x)/2] + Cos 
[e]*(Sqrt[a] - Sqrt[a + b]*Sqrt[(Cos[e] - I*Sin[e])^2]*Tan[(f*x)/2]))/Sqrt 
[b]] - 64*a^(3/2)*Sqrt[b]*ArcTan[((-Sqrt[a] + I*Sqrt[a + b]*Sqrt[(Cos[e] - 
 I*Sin[e])^2])*Sin[e]*Tan[(f*x)/2] + Cos[e]*(Sqrt[a] + Sqrt[a + b]*Sqrt[(C 
os[e] - I*Sin[e])^2]*Tan[(f*x)/2]))/Sqrt[b]] + 6*a^2*Csc[(e + f*x)/2]^2 + 
4*a*b*Csc[(e + f*x)/2]^2 - 2*b^2*Csc[(e + f*x)/2]^2 + a^2*Csc[(e + f*x)/2] 
^4 + 2*a*b*Csc[(e + f*x)/2]^4 + b^2*Csc[(e + f*x)/2]^4 + 24*a^2*Log[Cos[(e 
 + f*x)/2]] - 48*a*b*Log[Cos[(e + f*x)/2]] - 8*b^2*Log[Cos[(e + f*x)/2]] - 
 24*a^2*Log[Sin[(e + f*x)/2]] + 48*a*b*Log[Sin[(e + f*x)/2]] + 8*b^2*Log[S 
in[(e + f*x)/2]] - 6*a^2*Sec[(e + f*x)/2]^2 - 4*a*b*Sec[(e + f*x)/2]^2 + 2 
*b^2*Sec[(e + f*x)/2]^2 - a^2*Sec[(e + f*x)/2]^4 - 2*a*b*Sec[(e + f*x)/2]^ 
4 - b^2*Sec[(e + f*x)/2]^4)*Sec[e + f*x]^2)/((a + b)^3*f*(a + b*Sec[e + f* 
x]^2))
 

Rubi [A] (verified)

Time = 0.34 (sec) , antiderivative size = 155, normalized size of antiderivative = 1.20, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.304, Rules used = {3042, 4621, 373, 402, 397, 218, 219}

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 {\csc ^5(e+f x)}{a+b \sec ^2(e+f x)} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {1}{\sin (e+f x)^5 \left (a+b \sec (e+f x)^2\right )}dx\)

\(\Big \downarrow \) 4621

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

\(\Big \downarrow \) 373

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

\(\Big \downarrow \) 402

\(\displaystyle -\frac {\frac {\cos (e+f x)}{4 (a+b) \left (1-\cos ^2(e+f x)\right )^2}-\frac {\frac {\int \frac {b (5 a+b)-a (3 a-b) \cos ^2(e+f x)}{\left (1-\cos ^2(e+f x)\right ) \left (a \cos ^2(e+f x)+b\right )}d\cos (e+f x)}{2 (a+b)}-\frac {(3 a-b) \cos (e+f x)}{2 (a+b) \left (1-\cos ^2(e+f x)\right )}}{4 (a+b)}}{f}\)

\(\Big \downarrow \) 397

\(\displaystyle -\frac {\frac {\cos (e+f x)}{4 (a+b) \left (1-\cos ^2(e+f x)\right )^2}-\frac {\frac {\frac {8 a^2 b \int \frac {1}{a \cos ^2(e+f x)+b}d\cos (e+f x)}{a+b}-\frac {\left (3 a^2-6 a b-b^2\right ) \int \frac {1}{1-\cos ^2(e+f x)}d\cos (e+f x)}{a+b}}{2 (a+b)}-\frac {(3 a-b) \cos (e+f x)}{2 (a+b) \left (1-\cos ^2(e+f x)\right )}}{4 (a+b)}}{f}\)

\(\Big \downarrow \) 218

\(\displaystyle -\frac {\frac {\cos (e+f x)}{4 (a+b) \left (1-\cos ^2(e+f x)\right )^2}-\frac {\frac {\frac {8 a^{3/2} \sqrt {b} \arctan \left (\frac {\sqrt {a} \cos (e+f x)}{\sqrt {b}}\right )}{a+b}-\frac {\left (3 a^2-6 a b-b^2\right ) \int \frac {1}{1-\cos ^2(e+f x)}d\cos (e+f x)}{a+b}}{2 (a+b)}-\frac {(3 a-b) \cos (e+f x)}{2 (a+b) \left (1-\cos ^2(e+f x)\right )}}{4 (a+b)}}{f}\)

\(\Big \downarrow \) 219

\(\displaystyle -\frac {\frac {\cos (e+f x)}{4 (a+b) \left (1-\cos ^2(e+f x)\right )^2}-\frac {\frac {\frac {8 a^{3/2} \sqrt {b} \arctan \left (\frac {\sqrt {a} \cos (e+f x)}{\sqrt {b}}\right )}{a+b}-\frac {\left (3 a^2-6 a b-b^2\right ) \text {arctanh}(\cos (e+f x))}{a+b}}{2 (a+b)}-\frac {(3 a-b) \cos (e+f x)}{2 (a+b) \left (1-\cos ^2(e+f x)\right )}}{4 (a+b)}}{f}\)

Input:

Int[Csc[e + f*x]^5/(a + b*Sec[e + f*x]^2),x]
 

Output:

-((Cos[e + f*x]/(4*(a + b)*(1 - Cos[e + f*x]^2)^2) - (((8*a^(3/2)*Sqrt[b]* 
ArcTan[(Sqrt[a]*Cos[e + f*x])/Sqrt[b]])/(a + b) - ((3*a^2 - 6*a*b - b^2)*A 
rcTanh[Cos[e + f*x]])/(a + b))/(2*(a + b)) - ((3*a - b)*Cos[e + f*x])/(2*( 
a + b)*(1 - Cos[e + f*x]^2)))/(4*(a + b)))/f)
 

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 219
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))* 
ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (Gt 
Q[a, 0] || LtQ[b, 0])
 

rule 373
Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2)^(q_ 
), x_Symbol] :> Simp[e*(e*x)^(m - 1)*(a + b*x^2)^(p + 1)*((c + d*x^2)^(q + 
1)/(2*(b*c - a*d)*(p + 1))), x] - Simp[e^2/(2*(b*c - a*d)*(p + 1))   Int[(e 
*x)^(m - 2)*(a + b*x^2)^(p + 1)*(c + d*x^2)^q*Simp[c*(m - 1) + d*(m + 2*p + 
 2*q + 3)*x^2, x], x], x] /; FreeQ[{a, b, c, d, e, q}, x] && NeQ[b*c - a*d, 
 0] && LtQ[p, -1] && GtQ[m, 1] && LeQ[m, 3] && IntBinomialQ[a, b, c, d, e, 
m, 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 4621
Int[((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^(n_))^(p_.)*sin[(e_.) + (f_.)*(x_ 
)]^(m_.), x_Symbol] :> With[{ff = FreeFactors[Cos[e + f*x], x]}, Simp[-ff/f 
   Subst[Int[(1 - ff^2*x^2)^((m - 1)/2)*((b + a*(ff*x)^n)^p/(ff*x)^(n*p)), 
x], x, Cos[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f}, x] && IntegerQ[(m - 1)/ 
2] && IntegerQ[n] && IntegerQ[p]
 
Maple [A] (verified)

Time = 0.73 (sec) , antiderivative size = 181, normalized size of antiderivative = 1.40

method result size
derivativedivides \(\frac {-\frac {1}{2 \left (8 a +8 b \right ) \left (-1+\cos \left (f x +e \right )\right )^{2}}-\frac {-3 a +b}{16 \left (a +b \right )^{2} \left (-1+\cos \left (f x +e \right )\right )}+\frac {\left (3 a^{2}-6 a b -b^{2}\right ) \ln \left (-1+\cos \left (f x +e \right )\right )}{16 \left (a +b \right )^{3}}+\frac {1}{2 \left (8 a +8 b \right ) \left (1+\cos \left (f x +e \right )\right )^{2}}-\frac {-3 a +b}{16 \left (a +b \right )^{2} \left (1+\cos \left (f x +e \right )\right )}+\frac {\left (-3 a^{2}+6 a b +b^{2}\right ) \ln \left (1+\cos \left (f x +e \right )\right )}{16 \left (a +b \right )^{3}}+\frac {a^{2} b \arctan \left (\frac {a \cos \left (f x +e \right )}{\sqrt {a b}}\right )}{\left (a +b \right )^{3} \sqrt {a b}}}{f}\) \(181\)
default \(\frac {-\frac {1}{2 \left (8 a +8 b \right ) \left (-1+\cos \left (f x +e \right )\right )^{2}}-\frac {-3 a +b}{16 \left (a +b \right )^{2} \left (-1+\cos \left (f x +e \right )\right )}+\frac {\left (3 a^{2}-6 a b -b^{2}\right ) \ln \left (-1+\cos \left (f x +e \right )\right )}{16 \left (a +b \right )^{3}}+\frac {1}{2 \left (8 a +8 b \right ) \left (1+\cos \left (f x +e \right )\right )^{2}}-\frac {-3 a +b}{16 \left (a +b \right )^{2} \left (1+\cos \left (f x +e \right )\right )}+\frac {\left (-3 a^{2}+6 a b +b^{2}\right ) \ln \left (1+\cos \left (f x +e \right )\right )}{16 \left (a +b \right )^{3}}+\frac {a^{2} b \arctan \left (\frac {a \cos \left (f x +e \right )}{\sqrt {a b}}\right )}{\left (a +b \right )^{3} \sqrt {a b}}}{f}\) \(181\)
risch \(\frac {3 a \,{\mathrm e}^{7 i \left (f x +e \right )}-b \,{\mathrm e}^{7 i \left (f x +e \right )}-11 a \,{\mathrm e}^{5 i \left (f x +e \right )}-7 b \,{\mathrm e}^{5 i \left (f x +e \right )}-11 a \,{\mathrm e}^{3 i \left (f x +e \right )}-7 b \,{\mathrm e}^{3 i \left (f x +e \right )}+3 a \,{\mathrm e}^{i \left (f x +e \right )}-b \,{\mathrm e}^{i \left (f x +e \right )}}{4 f \left (a +b \right )^{2} \left ({\mathrm e}^{2 i \left (f x +e \right )}-1\right )^{4}}-\frac {3 \ln \left ({\mathrm e}^{i \left (f x +e \right )}+1\right ) a^{2}}{8 f \left (a^{3}+3 a^{2} b +3 a \,b^{2}+b^{3}\right )}+\frac {3 \ln \left ({\mathrm e}^{i \left (f x +e \right )}+1\right ) a b}{4 f \left (a^{3}+3 a^{2} b +3 a \,b^{2}+b^{3}\right )}+\frac {\ln \left ({\mathrm e}^{i \left (f x +e \right )}+1\right ) b^{2}}{8 f \left (a^{3}+3 a^{2} b +3 a \,b^{2}+b^{3}\right )}+\frac {3 \ln \left ({\mathrm e}^{i \left (f x +e \right )}-1\right ) a^{2}}{8 f \left (a^{3}+3 a^{2} b +3 a \,b^{2}+b^{3}\right )}-\frac {3 \ln \left ({\mathrm e}^{i \left (f x +e \right )}-1\right ) a b}{4 f \left (a^{3}+3 a^{2} b +3 a \,b^{2}+b^{3}\right )}-\frac {\ln \left ({\mathrm e}^{i \left (f x +e \right )}-1\right ) b^{2}}{8 f \left (a^{3}+3 a^{2} b +3 a \,b^{2}+b^{3}\right )}+\frac {i \sqrt {a b}\, a \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+\frac {2 i \sqrt {a b}\, {\mathrm e}^{i \left (f x +e \right )}}{a}+1\right )}{2 \left (a +b \right )^{3} f}-\frac {i \sqrt {a b}\, a \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-\frac {2 i \sqrt {a b}\, {\mathrm e}^{i \left (f x +e \right )}}{a}+1\right )}{2 \left (a +b \right )^{3} f}\) \(464\)

Input:

int(csc(f*x+e)^5/(a+b*sec(f*x+e)^2),x,method=_RETURNVERBOSE)
 

Output:

1/f*(-1/2/(8*a+8*b)/(-1+cos(f*x+e))^2-1/16*(-3*a+b)/(a+b)^2/(-1+cos(f*x+e) 
)+1/16*(3*a^2-6*a*b-b^2)/(a+b)^3*ln(-1+cos(f*x+e))+1/2/(8*a+8*b)/(1+cos(f* 
x+e))^2-1/16*(-3*a+b)/(a+b)^2/(1+cos(f*x+e))+1/16/(a+b)^3*(-3*a^2+6*a*b+b^ 
2)*ln(1+cos(f*x+e))+a^2*b/(a+b)^3/(a*b)^(1/2)*arctan(a*cos(f*x+e)/(a*b)^(1 
/2)))
 

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 331 vs. \(2 (115) = 230\).

Time = 0.15 (sec) , antiderivative size = 693, normalized size of antiderivative = 5.37 \[ \int \frac {\csc ^5(e+f x)}{a+b \sec ^2(e+f x)} \, dx =\text {Too large to display} \] Input:

integrate(csc(f*x+e)^5/(a+b*sec(f*x+e)^2),x, algorithm="fricas")
 

Output:

[1/16*(2*(3*a^2 + 2*a*b - b^2)*cos(f*x + e)^3 + 8*(a*cos(f*x + e)^4 - 2*a* 
cos(f*x + e)^2 + a)*sqrt(-a*b)*log(-(a*cos(f*x + e)^2 + 2*sqrt(-a*b)*cos(f 
*x + e) - b)/(a*cos(f*x + e)^2 + b)) - 2*(5*a^2 + 6*a*b + b^2)*cos(f*x + e 
) - ((3*a^2 - 6*a*b - b^2)*cos(f*x + e)^4 - 2*(3*a^2 - 6*a*b - b^2)*cos(f* 
x + e)^2 + 3*a^2 - 6*a*b - b^2)*log(1/2*cos(f*x + e) + 1/2) + ((3*a^2 - 6* 
a*b - b^2)*cos(f*x + e)^4 - 2*(3*a^2 - 6*a*b - b^2)*cos(f*x + e)^2 + 3*a^2 
 - 6*a*b - b^2)*log(-1/2*cos(f*x + e) + 1/2))/((a^3 + 3*a^2*b + 3*a*b^2 + 
b^3)*f*cos(f*x + e)^4 - 2*(a^3 + 3*a^2*b + 3*a*b^2 + b^3)*f*cos(f*x + e)^2 
 + (a^3 + 3*a^2*b + 3*a*b^2 + b^3)*f), 1/16*(2*(3*a^2 + 2*a*b - b^2)*cos(f 
*x + e)^3 + 16*(a*cos(f*x + e)^4 - 2*a*cos(f*x + e)^2 + a)*sqrt(a*b)*arcta 
n(sqrt(a*b)*cos(f*x + e)/b) - 2*(5*a^2 + 6*a*b + b^2)*cos(f*x + e) - ((3*a 
^2 - 6*a*b - b^2)*cos(f*x + e)^4 - 2*(3*a^2 - 6*a*b - b^2)*cos(f*x + e)^2 
+ 3*a^2 - 6*a*b - b^2)*log(1/2*cos(f*x + e) + 1/2) + ((3*a^2 - 6*a*b - b^2 
)*cos(f*x + e)^4 - 2*(3*a^2 - 6*a*b - b^2)*cos(f*x + e)^2 + 3*a^2 - 6*a*b 
- b^2)*log(-1/2*cos(f*x + e) + 1/2))/((a^3 + 3*a^2*b + 3*a*b^2 + b^3)*f*co 
s(f*x + e)^4 - 2*(a^3 + 3*a^2*b + 3*a*b^2 + b^3)*f*cos(f*x + e)^2 + (a^3 + 
 3*a^2*b + 3*a*b^2 + b^3)*f)]
 

Sympy [F]

\[ \int \frac {\csc ^5(e+f x)}{a+b \sec ^2(e+f x)} \, dx=\int \frac {\csc ^{5}{\left (e + f x \right )}}{a + b \sec ^{2}{\left (e + f x \right )}}\, dx \] Input:

integrate(csc(f*x+e)**5/(a+b*sec(f*x+e)**2),x)
 

Output:

Integral(csc(e + f*x)**5/(a + b*sec(e + f*x)**2), x)
 

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 231 vs. \(2 (115) = 230\).

Time = 0.12 (sec) , antiderivative size = 231, normalized size of antiderivative = 1.79 \[ \int \frac {\csc ^5(e+f x)}{a+b \sec ^2(e+f x)} \, dx=\frac {\frac {16 \, a^{2} b \arctan \left (\frac {a \cos \left (f x + e\right )}{\sqrt {a b}}\right )}{{\left (a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}\right )} \sqrt {a b}} - \frac {{\left (3 \, a^{2} - 6 \, a b - b^{2}\right )} \log \left (\cos \left (f x + e\right ) + 1\right )}{a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}} + \frac {{\left (3 \, a^{2} - 6 \, a b - b^{2}\right )} \log \left (\cos \left (f x + e\right ) - 1\right )}{a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}} + \frac {2 \, {\left ({\left (3 \, a - b\right )} \cos \left (f x + e\right )^{3} - {\left (5 \, a + b\right )} \cos \left (f x + e\right )\right )}}{{\left (a^{2} + 2 \, a b + b^{2}\right )} \cos \left (f x + e\right )^{4} - 2 \, {\left (a^{2} + 2 \, a b + b^{2}\right )} \cos \left (f x + e\right )^{2} + a^{2} + 2 \, a b + b^{2}}}{16 \, f} \] Input:

integrate(csc(f*x+e)^5/(a+b*sec(f*x+e)^2),x, algorithm="maxima")
 

Output:

1/16*(16*a^2*b*arctan(a*cos(f*x + e)/sqrt(a*b))/((a^3 + 3*a^2*b + 3*a*b^2 
+ b^3)*sqrt(a*b)) - (3*a^2 - 6*a*b - b^2)*log(cos(f*x + e) + 1)/(a^3 + 3*a 
^2*b + 3*a*b^2 + b^3) + (3*a^2 - 6*a*b - b^2)*log(cos(f*x + e) - 1)/(a^3 + 
 3*a^2*b + 3*a*b^2 + b^3) + 2*((3*a - b)*cos(f*x + e)^3 - (5*a + b)*cos(f* 
x + e))/((a^2 + 2*a*b + b^2)*cos(f*x + e)^4 - 2*(a^2 + 2*a*b + b^2)*cos(f* 
x + e)^2 + a^2 + 2*a*b + b^2))/f
 

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 233 vs. \(2 (115) = 230\).

Time = 0.14 (sec) , antiderivative size = 233, normalized size of antiderivative = 1.81 \[ \int \frac {\csc ^5(e+f x)}{a+b \sec ^2(e+f x)} \, dx=\frac {a^{2} b \arctan \left (\frac {a \cos \left (f x + e\right )}{\sqrt {a b}}\right )}{{\left (a^{3} f + 3 \, a^{2} b f + 3 \, a b^{2} f + b^{3} f\right )} \sqrt {a b}} - \frac {{\left (3 \, a^{2} - 6 \, a b - b^{2}\right )} \log \left ({\left | \cos \left (f x + e\right ) + 1 \right |}\right )}{16 \, {\left (a^{3} f + 3 \, a^{2} b f + 3 \, a b^{2} f + b^{3} f\right )}} + \frac {{\left (3 \, a^{2} - 6 \, a b - b^{2}\right )} \log \left ({\left | \cos \left (f x + e\right ) - 1 \right |}\right )}{16 \, {\left (a^{3} f + 3 \, a^{2} b f + 3 \, a b^{2} f + b^{3} f\right )}} + \frac {3 \, a \cos \left (f x + e\right )^{3} - b \cos \left (f x + e\right )^{3} - 5 \, a \cos \left (f x + e\right ) - b \cos \left (f x + e\right )}{8 \, {\left (a^{2} f + 2 \, a b f + b^{2} f\right )} {\left (\cos \left (f x + e\right )^{2} - 1\right )}^{2}} \] Input:

integrate(csc(f*x+e)^5/(a+b*sec(f*x+e)^2),x, algorithm="giac")
 

Output:

a^2*b*arctan(a*cos(f*x + e)/sqrt(a*b))/((a^3*f + 3*a^2*b*f + 3*a*b^2*f + b 
^3*f)*sqrt(a*b)) - 1/16*(3*a^2 - 6*a*b - b^2)*log(abs(cos(f*x + e) + 1))/( 
a^3*f + 3*a^2*b*f + 3*a*b^2*f + b^3*f) + 1/16*(3*a^2 - 6*a*b - b^2)*log(ab 
s(cos(f*x + e) - 1))/(a^3*f + 3*a^2*b*f + 3*a*b^2*f + b^3*f) + 1/8*(3*a*co 
s(f*x + e)^3 - b*cos(f*x + e)^3 - 5*a*cos(f*x + e) - b*cos(f*x + e))/((a^2 
*f + 2*a*b*f + b^2*f)*(cos(f*x + e)^2 - 1)^2)
 

Mupad [B] (verification not implemented)

Time = 15.94 (sec) , antiderivative size = 870, normalized size of antiderivative = 6.74 \[ \int \frac {\csc ^5(e+f x)}{a+b \sec ^2(e+f x)} \, dx =\text {Too large to display} \] Input:

int(1/(sin(e + f*x)^5*(a + b/cos(e + f*x)^2)),x)
 

Output:

(atan((a^5*cos(e + f*x)*(-a^3*b)^(1/2)*9i + a^2*b^3*cos(e + f*x)*(-a^3*b)^ 
(1/2)*12i + a^3*b^2*cos(e + f*x)*(-a^3*b)^(1/2)*30i + a*b^4*cos(e + f*x)*( 
-a^3*b)^(1/2)*1i + a^4*b*cos(e + f*x)*(-a^3*b)^(1/2)*28i)/(9*a^6*b + a^2*b 
^5 + 12*a^3*b^4 + 30*a^4*b^3 + 28*a^5*b^2))*(-a^3*b)^(1/2)*8i - 5*a^2*cos( 
e + f*x) - b^2*cos(e + f*x) + 3*a^2*cos(e + f*x)^3 - b^2*cos(e + f*x)^3 - 
3*a^2*atanh(cos(e + f*x)) + b^2*atanh(cos(e + f*x)) - atan((a^5*cos(e + f* 
x)*(-a^3*b)^(1/2)*9i + a^2*b^3*cos(e + f*x)*(-a^3*b)^(1/2)*12i + a^3*b^2*c 
os(e + f*x)*(-a^3*b)^(1/2)*30i + a*b^4*cos(e + f*x)*(-a^3*b)^(1/2)*1i + a^ 
4*b*cos(e + f*x)*(-a^3*b)^(1/2)*28i)/(9*a^6*b + a^2*b^5 + 12*a^3*b^4 + 30* 
a^4*b^3 + 28*a^5*b^2))*cos(e + f*x)^2*(-a^3*b)^(1/2)*16i + atan((a^5*cos(e 
 + f*x)*(-a^3*b)^(1/2)*9i + a^2*b^3*cos(e + f*x)*(-a^3*b)^(1/2)*12i + a^3* 
b^2*cos(e + f*x)*(-a^3*b)^(1/2)*30i + a*b^4*cos(e + f*x)*(-a^3*b)^(1/2)*1i 
 + a^4*b*cos(e + f*x)*(-a^3*b)^(1/2)*28i)/(9*a^6*b + a^2*b^5 + 12*a^3*b^4 
+ 30*a^4*b^3 + 28*a^5*b^2))*cos(e + f*x)^4*(-a^3*b)^(1/2)*8i - 6*a*b*cos(e 
 + f*x) + 6*a^2*cos(e + f*x)^2*atanh(cos(e + f*x)) - 3*a^2*cos(e + f*x)^4* 
atanh(cos(e + f*x)) - 2*b^2*cos(e + f*x)^2*atanh(cos(e + f*x)) + b^2*cos(e 
 + f*x)^4*atanh(cos(e + f*x)) + 2*a*b*cos(e + f*x)^3 + 6*a*b*atanh(cos(e + 
 f*x)) - 12*a*b*cos(e + f*x)^2*atanh(cos(e + f*x)) + 6*a*b*cos(e + f*x)^4* 
atanh(cos(e + f*x)))/(8*a^3*f + 8*b^3*f - 16*a^3*f*cos(e + f*x)^2 + 8*a^3* 
f*cos(e + f*x)^4 - 16*b^3*f*cos(e + f*x)^2 + 8*b^3*f*cos(e + f*x)^4 + 2...
 

Reduce [B] (verification not implemented)

Time = 0.17 (sec) , antiderivative size = 268, normalized size of antiderivative = 2.08 \[ \int \frac {\csc ^5(e+f x)}{a+b \sec ^2(e+f x)} \, dx=\frac {-8 \sqrt {b}\, \sqrt {a}\, \mathit {atan} \left (\frac {\sqrt {a +b}\, \tan \left (\frac {f x}{2}+\frac {e}{2}\right )-\sqrt {a}}{\sqrt {b}}\right ) \sin \left (f x +e \right )^{4} a +8 \sqrt {b}\, \sqrt {a}\, \mathit {atan} \left (\frac {\sqrt {a +b}\, \tan \left (\frac {f x}{2}+\frac {e}{2}\right )+\sqrt {a}}{\sqrt {b}}\right ) \sin \left (f x +e \right )^{4} a -3 \cos \left (f x +e \right ) \sin \left (f x +e \right )^{2} a^{2}-2 \cos \left (f x +e \right ) \sin \left (f x +e \right )^{2} a b +\cos \left (f x +e \right ) \sin \left (f x +e \right )^{2} b^{2}-2 \cos \left (f x +e \right ) a^{2}-4 \cos \left (f x +e \right ) a b -2 \cos \left (f x +e \right ) b^{2}+3 \,\mathrm {log}\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right ) \sin \left (f x +e \right )^{4} a^{2}-6 \,\mathrm {log}\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right ) \sin \left (f x +e \right )^{4} a b -\mathrm {log}\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right ) \sin \left (f x +e \right )^{4} b^{2}}{8 \sin \left (f x +e \right )^{4} f \left (a^{3}+3 a^{2} b +3 a \,b^{2}+b^{3}\right )} \] Input:

int(csc(f*x+e)^5/(a+b*sec(f*x+e)^2),x)
 

Output:

( - 8*sqrt(b)*sqrt(a)*atan((sqrt(a + b)*tan((e + f*x)/2) - sqrt(a))/sqrt(b 
))*sin(e + f*x)**4*a + 8*sqrt(b)*sqrt(a)*atan((sqrt(a + b)*tan((e + f*x)/2 
) + sqrt(a))/sqrt(b))*sin(e + f*x)**4*a - 3*cos(e + f*x)*sin(e + f*x)**2*a 
**2 - 2*cos(e + f*x)*sin(e + f*x)**2*a*b + cos(e + f*x)*sin(e + f*x)**2*b* 
*2 - 2*cos(e + f*x)*a**2 - 4*cos(e + f*x)*a*b - 2*cos(e + f*x)*b**2 + 3*lo 
g(tan((e + f*x)/2))*sin(e + f*x)**4*a**2 - 6*log(tan((e + f*x)/2))*sin(e + 
 f*x)**4*a*b - log(tan((e + f*x)/2))*sin(e + f*x)**4*b**2)/(8*sin(e + f*x) 
**4*f*(a**3 + 3*a**2*b + 3*a*b**2 + b**3))