\(\int \sec ^2(e+f x) (a+b (c \tan (e+f x))^n)^p \, dx\) [495]

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

Optimal result

Integrand size = 25, antiderivative size = 76 \[ \int \sec ^2(e+f x) \left (a+b (c \tan (e+f x))^n\right )^p \, dx=\frac {\operatorname {Hypergeometric2F1}\left (\frac {1}{n},-p,1+\frac {1}{n},-\frac {b (c \tan (e+f x))^n}{a}\right ) \tan (e+f x) \left (a+b (c \tan (e+f x))^n\right )^p \left (\frac {a+b (c \tan (e+f x))^n}{a}\right )^{-p}}{f} \] Output:

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

Mathematica [A] (verified)

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

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

Output:

(Hypergeometric2F1[n^(-1), -p, 1 + n^(-1), -((b*(c*Tan[e + f*x])^n)/a)]*Ta 
n[e + f*x]*(a + b*(c*Tan[e + f*x])^n)^p)/(f*(1 + (b*(c*Tan[e + f*x])^n)/a) 
^p)
 

Rubi [A] (verified)

Time = 0.27 (sec) , antiderivative size = 75, normalized size of antiderivative = 0.99, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.160, Rules used = {3042, 4158, 779, 778}

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 (c \tan (e+f x))^n\right )^p \, dx\)

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4158

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

\(\Big \downarrow \) 779

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

\(\Big \downarrow \) 778

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

Input:

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

Output:

(Hypergeometric2F1[n^(-1), -p, 1 + n^(-1), -((b*(c*Tan[e + f*x])^n)/a)]*Ta 
n[e + f*x]*(a + b*(c*Tan[e + f*x])^n)^p)/(f*(1 + (b*(c*Tan[e + f*x])^n)/a) 
^p)
 

Defintions of rubi rules used

rule 778
Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[a^p*x*Hypergeometric2F 
1[-p, 1/n, 1/n + 1, (-b)*(x^n/a)], x] /; FreeQ[{a, b, n, p}, x] &&  !IGtQ[p 
, 0] &&  !IntegerQ[1/n] &&  !ILtQ[Simplify[1/n + p], 0] && (IntegerQ[p] || 
GtQ[a, 0])
 

rule 779
Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[a^IntPart[p]*((a + b*x 
^n)^FracPart[p]/(1 + b*(x^n/a))^FracPart[p])   Int[(1 + b*(x^n/a))^p, x], x 
] /; FreeQ[{a, b, n, p}, x] &&  !IGtQ[p, 0] &&  !IntegerQ[1/n] &&  !ILtQ[Si 
mplify[1/n + p], 0] &&  !(IntegerQ[p] || GtQ[a, 0])
 

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

rule 4158
Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*((c_.)*tan[(e_.) + (f_.)*(x_ 
)])^(n_))^(p_.), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Sim 
p[ff/(c^(m - 1)*f)   Subst[Int[(c^2 + ff^2*x^2)^(m/2 - 1)*(a + b*(ff*x)^n)^ 
p, x], x, c*(Tan[e + f*x]/ff)], x]] /; FreeQ[{a, b, c, e, f, n, p}, x] && I 
ntegerQ[m/2] && (IntegersQ[n, p] || IGtQ[m, 0] || IGtQ[p, 0] || EqQ[n^2, 4] 
 || EqQ[n^2, 16])
 
Maple [F]

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

Input:

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

Output:

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

Fricas [F]

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

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

Output:

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

Sympy [F]

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

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

Output:

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

Maxima [F]

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

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

Output:

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

Giac [F]

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

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

Output:

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

Mupad [B] (verification not implemented)

Time = 8.74 (sec) , antiderivative size = 76, normalized size of antiderivative = 1.00 \[ \int \sec ^2(e+f x) \left (a+b (c \tan (e+f x))^n\right )^p \, dx=\frac {\mathrm {tan}\left (e+f\,x\right )\,{\left (a+b\,{\left (c\,\mathrm {tan}\left (e+f\,x\right )\right )}^n\right )}^p\,{{}}_2{\mathrm {F}}_1\left (\frac {1}{n},-p;\ \frac {1}{n}+1;\ -\frac {b\,{\left (c\,\mathrm {tan}\left (e+f\,x\right )\right )}^n}{a}\right )}{f\,{\left (\frac {b\,{\left (c\,\mathrm {tan}\left (e+f\,x\right )\right )}^n}{a}+1\right )}^p} \] Input:

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

Output:

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

Reduce [F]

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

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

Output:

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