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

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

Optimal result

Integrand size = 23, antiderivative size = 74 \[ \int \sec ^2(e+f x) \left (a+b \sec ^2(e+f x)\right )^p \, dx=\frac {\operatorname {Hypergeometric2F1}\left (\frac {1}{2},-p,\frac {3}{2},-\frac {b \tan ^2(e+f x)}{a+b}\right ) \tan (e+f x) \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}}{f} \] Output:

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

Mathematica [A] (verified)

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

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

Output:

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

Rubi [A] (verified)

Time = 0.25 (sec) , antiderivative size = 72, normalized size of antiderivative = 0.97, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.174, Rules used = {3042, 4634, 238, 237}

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

\(\Big \downarrow \) 3042

\(\displaystyle \int \sec (e+f x)^2 \left (a+b \sec (e+f x)^2\right )^pdx\)

\(\Big \downarrow \) 4634

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

\(\Big \downarrow \) 238

\(\displaystyle \frac {\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 \left (\frac {b \tan ^2(e+f x)}{a+b}+1\right )^pd\tan (e+f x)}{f}\)

\(\Big \downarrow \) 237

\(\displaystyle \frac {\tan (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 {3}{2},-\frac {b \tan ^2(e+f x)}{a+b}\right )}{f}\)

Input:

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

Output:

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

Defintions of rubi rules used

rule 237
Int[((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Simp[a^p*x*Hypergeometric2F1[- 
p, 1/2, 1/2 + 1, (-b)*(x^2/a)], x] /; FreeQ[{a, b, p}, x] &&  !IntegerQ[2*p 
] && GtQ[a, 0]
 

rule 238
Int[((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Simp[a^IntPart[p]*((a + b*x^2) 
^FracPart[p]/(1 + b*(x^2/a))^FracPart[p])   Int[(1 + b*(x^2/a))^p, x], x] / 
; FreeQ[{a, b, p}, x] &&  !IntegerQ[2*p] &&  !GtQ[a, 0]
 

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

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

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

Input:

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

Output:

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

Fricas [F]

\[ \int \sec ^2(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} \sec \left (f x + e\right )^{2} \,d x } \] Input:

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

Output:

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

Sympy [F]

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

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

Output:

Integral((a + b*sec(e + f*x)**2)**p*sec(e + f*x)**2, x)
 

Maxima [F]

\[ \int \sec ^2(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} \sec \left (f x + e\right )^{2} \,d x } \] Input:

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

Output:

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

Giac [F]

\[ \int \sec ^2(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} \sec \left (f x + e\right )^{2} \,d x } \] Input:

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

Output:

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

Mupad [F(-1)]

Timed out. \[ \int \sec ^2(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}{{\cos \left (e+f\,x\right )}^2} \,d x \] Input:

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

Output:

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

Reduce [F]

\[ \int \sec ^2(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} \sec \left (f x +e \right )^{2}d x \] Input:

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

Output:

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