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

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 = 87 \[ \int \left (a+b \sec ^2(e+f x)\right )^p \tan ^3(e+f x) \, dx=\frac {\left (a+b \sec ^2(e+f x)\right )^{1+p}}{2 b f (1+p)}+\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*(a+b*sec(f*x+e)^2)^(p+1)/b/f/(p+1)+1/2*hypergeom([1, p+1],[2+p],(a+b*s 
ec(f*x+e)^2)/a)*(a+b*sec(f*x+e)^2)^(p+1)/a/f/(p+1)
 

Mathematica [A] (verified)

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

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

Output:

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

Rubi [A] (verified)

Time = 0.27 (sec) , antiderivative size = 83, normalized size of antiderivative = 0.95, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.261, Rules used = {3042, 4627, 25, 354, 90, 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 ^3(e+f x) \left (a+b \sec ^2(e+f x)\right )^p \, dx\)

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4627

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

\(\Big \downarrow \) 25

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

\(\Big \downarrow \) 354

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

\(\Big \downarrow \) 90

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

\(\Big \downarrow \) 75

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

Input:

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

Output:

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

Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

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 90
Int[((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p 
_.), x_] :> Simp[b*(c + d*x)^(n + 1)*((e + f*x)^(p + 1)/(d*f*(n + p + 2))), 
 x] + Simp[(a*d*f*(n + p + 2) - b*(d*e*(n + 1) + c*f*(p + 1)))/(d*f*(n + p 
+ 2))   Int[(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n, 
p}, x] && NeQ[n + p + 2, 0]
 

rule 354
Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^2)^(p_.)*((c_) + (d_.)*(x_)^2)^(q_.), x_S 
ymbol] :> Simp[1/2   Subst[Int[x^((m - 1)/2)*(a + b*x)^p*(c + d*x)^q, x], x 
, x^2], x] /; FreeQ[{a, b, c, d, p, q}, x] && NeQ[b*c - a*d, 0] && IntegerQ 
[(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 )^{3}d x\]

Input:

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

Output:

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

Fricas [F]

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

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

Output:

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

Sympy [F]

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

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

Output:

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

Maxima [F]

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

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

Output:

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

Giac [F]

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

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

Output:

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

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

\[ \int \left (a+b \sec ^2(e+f x)\right )^p \tan ^3(e+f x) \, dx=\frac {\left (\sec \left (f x +e \right )^{2} b +a \right )^{p} \tan \left (f x +e \right )^{2} p -\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 )^{3}}{\sec \left (f x +e \right )^{2} b p +\sec \left (f x +e \right )^{2} b +a p +a}d x \right ) a f \,p^{3}+2 \left (\int \frac {\left (\sec \left (f x +e \right )^{2} b +a \right )^{p} \tan \left (f x +e \right )^{3}}{\sec \left (f x +e \right )^{2} b p +\sec \left (f x +e \right )^{2} b +a p +a}d x \right ) a f \,p^{2}-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 p +\sec \left (f x +e \right )^{2} b +a p +a}d x \right ) a f \,p^{2}-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 p +\sec \left (f x +e \right )^{2} b +a p +a}d x \right ) a f p}{2 f p \left (p +1\right )} \] Input:

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

Output:

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