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

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

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

Mathematica [A] (verified)

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

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

Output:

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

Rubi [A] (verified)

Time = 0.23 (sec) , antiderivative size = 54, normalized size of antiderivative = 0.98, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {3042, 4627, 243, 75}

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4627

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

\(\Big \downarrow \) 243

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

\(\Big \downarrow \) 75

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

Input:

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

Output:

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

Defintions of rubi rules used

rule 75
Int[((b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[((c + d*x 
)^(n + 1)/(d*(n + 1)*(-d/(b*c))^m))*Hypergeometric2F1[-m, n + 1, n + 2, 1 + 
 d*(x/c)], x] /; FreeQ[{b, c, d, m, n}, x] &&  !IntegerQ[n] && (IntegerQ[m] 
 || GtQ[-d/(b*c), 0])
 

rule 243
Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Simp[1/2   Subst[In 
t[x^((m - 1)/2)*(a + b*x)^p, x], x, x^2], x] /; FreeQ[{a, b, m, p}, x] && I 
ntegerQ[(m - 1)/2]
 

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

rule 4627
Int[((a_) + (b_.)*((c_.)*sec[(e_.) + (f_.)*(x_)])^(n_))^(p_.)*tan[(e_.) + ( 
f_.)*(x_)]^(m_.), x_Symbol] :> With[{ff = FreeFactors[Sec[e + f*x], x]}, Si 
mp[1/f   Subst[Int[(-1 + ff^2*x^2)^((m - 1)/2)*((a + b*(c*ff*x)^n)^p/x), x] 
, x, Sec[e + f*x]/ff], x]] /; FreeQ[{a, b, c, e, f, n, p}, x] && IntegerQ[( 
m - 1)/2] && (GtQ[m, 0] || EqQ[n, 2] || EqQ[n, 4] || IGtQ[p, 0] || Integers 
Q[2*n, p])
 
Maple [F]

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

Input:

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

Output:

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

Fricas [F]

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

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

Output:

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

Sympy [F]

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

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

Output:

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

Maxima [F]

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

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

Output:

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

Giac [F]

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

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

Output:

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

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

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

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

Output:

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