\(\int \csc ^4(e+f x) (a+b \sec ^2(e+f x))^p \, dx\) [142]

Optimal result
Mathematica [A] (verified)
Rubi [A] (verified)
Maple [F]
Fricas [F]
Sympy [F(-1)]
Maxima [F]
Giac [F]
Mupad [F(-1)]
Reduce [F]

Optimal result

Integrand size = 23, antiderivative size = 130 \[ \int \csc ^4(e+f x) \left (a+b \sec ^2(e+f x)\right )^p \, dx=-\frac {\cot ^3(e+f x) \left (a+b+b \tan ^2(e+f x)\right )^{1+p}}{3 (a+b) f}-\frac {(3 a+2 b (1+p)) \cot (e+f x) \operatorname {Hypergeometric2F1}\left (-\frac {1}{2},-p,\frac {1}{2},-\frac {b \tan ^2(e+f x)}{a+b}\right ) \left (a+b+b \tan ^2(e+f x)\right )^p \left (\frac {a+b+b \tan ^2(e+f x)}{a+b}\right )^{-p}}{3 (a+b) f} \] Output:

-1/3*cot(f*x+e)^3*(a+b+b*tan(f*x+e)^2)^(p+1)/(a+b)/f-1/3*(3*a+2*b*(p+1))*c 
ot(f*x+e)*hypergeom([-1/2, -p],[1/2],-b*tan(f*x+e)^2/(a+b))*(a+b+b*tan(f*x 
+e)^2)^p/(a+b)/f/(((a+b+b*tan(f*x+e)^2)/(a+b))^p)
 

Mathematica [A] (verified)

Time = 1.58 (sec) , antiderivative size = 132, normalized size of antiderivative = 1.02 \[ \int \csc ^4(e+f x) \left (a+b \sec ^2(e+f x)\right )^p \, dx=-\frac {\cot (e+f x) \left (a+b \sec ^2(e+f x)\right )^p \left (1+\frac {b \tan ^2(e+f x)}{a+b}\right )^{-p} \left ((3 a+2 b (1+p)) \operatorname {Hypergeometric2F1}\left (-\frac {1}{2},-p,\frac {1}{2},-\frac {b \tan ^2(e+f x)}{a+b}\right )+\cot ^2(e+f x) \left (a+b+b \tan ^2(e+f x)\right ) \left (1+\frac {b \tan ^2(e+f x)}{a+b}\right )^p\right )}{3 (a+b) f} \] Input:

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

Output:

-1/3*(Cot[e + f*x]*(a + b*Sec[e + f*x]^2)^p*((3*a + 2*b*(1 + p))*Hypergeom 
etric2F1[-1/2, -p, 1/2, -((b*Tan[e + f*x]^2)/(a + b))] + Cot[e + f*x]^2*(a 
 + b + b*Tan[e + f*x]^2)*(1 + (b*Tan[e + f*x]^2)/(a + b))^p))/((a + b)*f*( 
1 + (b*Tan[e + f*x]^2)/(a + b))^p)
 

Rubi [A] (verified)

Time = 0.30 (sec) , antiderivative size = 126, normalized size of antiderivative = 0.97, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.217, Rules used = {3042, 4620, 359, 279, 278}

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 \csc ^4(e+f x) \left (a+b \sec ^2(e+f x)\right )^p \, dx\)

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4620

\(\displaystyle \frac {\int \cot ^4(e+f x) \left (\tan ^2(e+f x)+1\right ) \left (b \tan ^2(e+f x)+a+b\right )^pd\tan (e+f x)}{f}\)

\(\Big \downarrow \) 359

\(\displaystyle \frac {\frac {(3 a+2 b (p+1)) \int \cot ^2(e+f x) \left (b \tan ^2(e+f x)+a+b\right )^pd\tan (e+f x)}{3 (a+b)}-\frac {\cot ^3(e+f x) \left (a+b \tan ^2(e+f x)+b\right )^{p+1}}{3 (a+b)}}{f}\)

\(\Big \downarrow \) 279

\(\displaystyle \frac {\frac {(3 a+2 b (p+1)) \left (a+b \tan ^2(e+f x)+b\right )^p \left (\frac {b \tan ^2(e+f x)}{a+b}+1\right )^{-p} \int \cot ^2(e+f x) \left (\frac {b \tan ^2(e+f x)}{a+b}+1\right )^pd\tan (e+f x)}{3 (a+b)}-\frac {\cot ^3(e+f x) \left (a+b \tan ^2(e+f x)+b\right )^{p+1}}{3 (a+b)}}{f}\)

\(\Big \downarrow \) 278

\(\displaystyle \frac {-\frac {(3 a+2 b (p+1)) \cot (e+f x) \left (a+b \tan ^2(e+f x)+b\right )^p \left (\frac {b \tan ^2(e+f x)}{a+b}+1\right )^{-p} \operatorname {Hypergeometric2F1}\left (-\frac {1}{2},-p,\frac {1}{2},-\frac {b \tan ^2(e+f x)}{a+b}\right )}{3 (a+b)}-\frac {\cot ^3(e+f x) \left (a+b \tan ^2(e+f x)+b\right )^{p+1}}{3 (a+b)}}{f}\)

Input:

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

Output:

(-1/3*(Cot[e + f*x]^3*(a + b + b*Tan[e + f*x]^2)^(1 + p))/(a + b) - ((3*a 
+ 2*b*(1 + p))*Cot[e + f*x]*Hypergeometric2F1[-1/2, -p, 1/2, -((b*Tan[e + 
f*x]^2)/(a + b))]*(a + b + b*Tan[e + f*x]^2)^p)/(3*(a + b)*(1 + (b*Tan[e + 
 f*x]^2)/(a + b))^p))/f
 

Defintions of rubi rules used

rule 278
Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Simp[a^p*(( 
c*x)^(m + 1)/(c*(m + 1)))*Hypergeometric2F1[-p, (m + 1)/2, (m + 1)/2 + 1, ( 
-b)*(x^2/a)], x] /; FreeQ[{a, b, c, m, p}, x] &&  !IGtQ[p, 0] && (ILtQ[p, 0 
] || GtQ[a, 0])
 

rule 279
Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Simp[a^IntP 
art[p]*((a + b*x^2)^FracPart[p]/(1 + b*(x^2/a))^FracPart[p])   Int[(c*x)^m* 
(1 + b*(x^2/a))^p, x], x] /; FreeQ[{a, b, c, m, p}, x] &&  !IGtQ[p, 0] && 
!(ILtQ[p, 0] || GtQ[a, 0])
 

rule 359
Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_.)*((c_) + (d_.)*(x_)^2), x 
_Symbol] :> Simp[c*(e*x)^(m + 1)*((a + b*x^2)^(p + 1)/(a*e*(m + 1))), x] + 
Simp[(a*d*(m + 1) - b*c*(m + 2*p + 3))/(a*e^2*(m + 1))   Int[(e*x)^(m + 2)* 
(a + b*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, p}, x] && NeQ[b*c - a*d, 0] 
&& LtQ[m, -1] &&  !ILtQ[p, -1]
 

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

rule 4620
Int[((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^(n_))^(p_.)*sin[(e_.) + (f_.)*(x_ 
)]^(m_), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Simp[ff^(m 
+ 1)/f   Subst[Int[x^m*(ExpandToSum[a + b*(1 + ff^2*x^2)^(n/2), x]^p/(1 + f 
f^2*x^2)^(m/2 + 1)), x], x, Tan[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, p}, 
 x] && IntegerQ[m/2] && IntegerQ[n/2]
 
Maple [F]

\[\int \csc \left (f x +e \right )^{4} \left (a +b \sec \left (f x +e \right )^{2}\right )^{p}d x\]

Input:

int(csc(f*x+e)^4*(a+b*sec(f*x+e)^2)^p,x)
 

Output:

int(csc(f*x+e)^4*(a+b*sec(f*x+e)^2)^p,x)
 

Fricas [F]

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

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

Output:

integral((b*sec(f*x + e)^2 + a)^p*csc(f*x + e)^4, x)
 

Sympy [F(-1)]

Timed out. \[ \int \csc ^4(e+f x) \left (a+b \sec ^2(e+f x)\right )^p \, dx=\text {Timed out} \] Input:

integrate(csc(f*x+e)**4*(a+b*sec(f*x+e)**2)**p,x)
 

Output:

Timed out
 

Maxima [F]

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

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

Output:

integrate((b*sec(f*x + e)^2 + a)^p*csc(f*x + e)^4, x)
 

Giac [F]

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

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

Output:

integrate((b*sec(f*x + e)^2 + a)^p*csc(f*x + e)^4, x)
 

Mupad [F(-1)]

Timed out. \[ \int \csc ^4(e+f x) \left (a+b \sec ^2(e+f x)\right )^p \, dx=\int \frac {{\left (a+\frac {b}{{\cos \left (e+f\,x\right )}^2}\right )}^p}{{\sin \left (e+f\,x\right )}^4} \,d x \] Input:

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

Output:

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

Reduce [F]

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

int(csc(f*x+e)^4*(a+b*sec(f*x+e)^2)^p,x)
 

Output:

int((sec(e + f*x)**2*b + a)**p*csc(e + f*x)**4,x)