\(\int \frac {(d \sec (e+f x))^m}{a+b \tan (e+f x)} \, dx\) [651]

Optimal result
Mathematica [C] (warning: unable to verify)
Rubi [A] (warning: unable to verify)
Maple [F]
Fricas [F]
Sympy [F]
Maxima [F]
Giac [F]
Mupad [F(-1)]
Reduce [F]

Optimal result

Integrand size = 23, antiderivative size = 141 \[ \int \frac {(d \sec (e+f x))^m}{a+b \tan (e+f x)} \, dx=-\frac {b \operatorname {Hypergeometric2F1}\left (1,\frac {m}{2},\frac {2+m}{2},\frac {b^2 \sec ^2(e+f x)}{a^2+b^2}\right ) (d \sec (e+f x))^m}{\left (a^2+b^2\right ) f m}+\frac {\operatorname {AppellF1}\left (\frac {1}{2},1,1-\frac {m}{2},\frac {3}{2},\frac {b^2 \tan ^2(e+f x)}{a^2},-\tan ^2(e+f x)\right ) (d \sec (e+f x))^m \sec ^2(e+f x)^{-m/2} \tan (e+f x)}{a f} \] Output:

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

Mathematica [C] (warning: unable to verify)

Result contains complex when optimal does not.

Time = 13.80 (sec) , antiderivative size = 1158, normalized size of antiderivative = 8.21 \[ \int \frac {(d \sec (e+f x))^m}{a+b \tan (e+f x)} \, dx =\text {Too large to display} \] Input:

Integrate[(d*Sec[e + f*x])^m/(a + b*Tan[e + f*x]),x]
 

Output:

((d*Sec[e + f*x])^m*(b - b*(Sec[e + f*x]^2)^(m/2) + a*m*Hypergeometric2F1[ 
1/2, 1 - m/2, 3/2, -Tan[e + f*x]^2]*Tan[e + f*x] + (b*AppellF1[-m, -1/2*m, 
 -1/2*m, 1 - m, (a - I*b)/(a + b*Tan[e + f*x]), (a + I*b)/(a + b*Tan[e + f 
*x])]*(Sec[e + f*x]^2)^(m/2))/(((b*(-I + Tan[e + f*x]))/(a + b*Tan[e + f*x 
]))^(m/2)*((b*(I + Tan[e + f*x]))/(a + b*Tan[e + f*x]))^(m/2))))/(f*(a + b 
*Tan[e + f*x])*(a*m*Hypergeometric2F1[1/2, 1 - m/2, 3/2, -Tan[e + f*x]^2]* 
Sec[e + f*x]^2 - b*m*(Sec[e + f*x]^2)^(m/2)*Tan[e + f*x] + (b*m*AppellF1[- 
m, -1/2*m, -1/2*m, 1 - m, (a - I*b)/(a + b*Tan[e + f*x]), (a + I*b)/(a + b 
*Tan[e + f*x])]*(Sec[e + f*x]^2)^(m/2)*Tan[e + f*x])/(((b*(-I + Tan[e + f* 
x]))/(a + b*Tan[e + f*x]))^(m/2)*((b*(I + Tan[e + f*x]))/(a + b*Tan[e + f* 
x]))^(m/2)) + (b*(Sec[e + f*x]^2)^(m/2)*(-1/2*((a - I*b)*b*m^2*AppellF1[1 
- m, 1 - m/2, -1/2*m, 2 - m, (a - I*b)/(a + b*Tan[e + f*x]), (a + I*b)/(a 
+ b*Tan[e + f*x])]*Sec[e + f*x]^2)/((1 - m)*(a + b*Tan[e + f*x])^2) - ((a 
+ I*b)*b*m^2*AppellF1[1 - m, -1/2*m, 1 - m/2, 2 - m, (a - I*b)/(a + b*Tan[ 
e + f*x]), (a + I*b)/(a + b*Tan[e + f*x])]*Sec[e + f*x]^2)/(2*(1 - m)*(a + 
 b*Tan[e + f*x])^2)))/(((b*(-I + Tan[e + f*x]))/(a + b*Tan[e + f*x]))^(m/2 
)*((b*(I + Tan[e + f*x]))/(a + b*Tan[e + f*x]))^(m/2)) - (b*m*AppellF1[-m, 
 -1/2*m, -1/2*m, 1 - m, (a - I*b)/(a + b*Tan[e + f*x]), (a + I*b)/(a + b*T 
an[e + f*x])]*(Sec[e + f*x]^2)^(m/2)*((b*(-I + Tan[e + f*x]))/(a + b*Tan[e 
 + f*x]))^(-1 - m/2)*(-((b^2*Sec[e + f*x]^2*(-I + Tan[e + f*x]))/(a + b...
 

Rubi [A] (warning: unable to verify)

Time = 0.38 (sec) , antiderivative size = 160, normalized size of antiderivative = 1.13, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.261, Rules used = {3042, 3994, 504, 333, 353, 78}

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 \frac {(d \sec (e+f x))^m}{a+b \tan (e+f x)} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {(d \sec (e+f x))^m}{a+b \tan (e+f x)}dx\)

\(\Big \downarrow \) 3994

\(\displaystyle \frac {\sec ^2(e+f x)^{-m/2} (d \sec (e+f x))^m \int \frac {\left (\tan ^2(e+f x)+1\right )^{\frac {m-2}{2}}}{a+b \tan (e+f x)}d(b \tan (e+f x))}{b f}\)

\(\Big \downarrow \) 504

\(\displaystyle \frac {\sec ^2(e+f x)^{-m/2} (d \sec (e+f x))^m \left (a \int \frac {\left (\tan ^2(e+f x)+1\right )^{\frac {m-2}{2}}}{a^2-b^2 \tan ^2(e+f x)}d(b \tan (e+f x))-\int \frac {b \tan (e+f x) \left (\tan ^2(e+f x)+1\right )^{\frac {m-2}{2}}}{a^2-b^2 \tan ^2(e+f x)}d(b \tan (e+f x))\right )}{b f}\)

\(\Big \downarrow \) 333

\(\displaystyle \frac {\sec ^2(e+f x)^{-m/2} (d \sec (e+f x))^m \left (\frac {b \tan (e+f x) \operatorname {AppellF1}\left (\frac {1}{2},1,\frac {2-m}{2},\frac {3}{2},\frac {b^2 \tan ^2(e+f x)}{a^2},-\tan ^2(e+f x)\right )}{a}-\int \frac {b \tan (e+f x) \left (\tan ^2(e+f x)+1\right )^{\frac {m-2}{2}}}{a^2-b^2 \tan ^2(e+f x)}d(b \tan (e+f x))\right )}{b f}\)

\(\Big \downarrow \) 353

\(\displaystyle \frac {\sec ^2(e+f x)^{-m/2} (d \sec (e+f x))^m \left (\frac {b \tan (e+f x) \operatorname {AppellF1}\left (\frac {1}{2},1,\frac {2-m}{2},\frac {3}{2},\frac {b^2 \tan ^2(e+f x)}{a^2},-\tan ^2(e+f x)\right )}{a}-\frac {1}{2} \int \frac {\left (\frac {\tan (e+f x)}{b}+1\right )^{\frac {m-2}{2}}}{a^2-b^2 \tan ^2(e+f x)}d\left (b^2 \tan ^2(e+f x)\right )\right )}{b f}\)

\(\Big \downarrow \) 78

\(\displaystyle \frac {\sec ^2(e+f x)^{-m/2} (d \sec (e+f x))^m \left (\frac {b \tan (e+f x) \operatorname {AppellF1}\left (\frac {1}{2},1,\frac {2-m}{2},\frac {3}{2},\frac {b^2 \tan ^2(e+f x)}{a^2},-\tan ^2(e+f x)\right )}{a}-\frac {b^2 \left (\frac {\tan (e+f x)}{b}+1\right )^{m/2} \operatorname {Hypergeometric2F1}\left (1,\frac {m}{2},\frac {m+2}{2},\frac {\tan ^2(e+f x) b^2+b^2}{a^2+b^2}\right )}{m \left (a^2+b^2\right )}\right )}{b f}\)

Input:

Int[(d*Sec[e + f*x])^m/(a + b*Tan[e + f*x]),x]
 

Output:

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

Defintions of rubi rules used

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

rule 333
Int[((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2)^(q_), x_Symbol] :> Sim 
p[a^p*c^q*x*AppellF1[1/2, -p, -q, 3/2, (-b)*(x^2/a), (-d)*(x^2/c)], x] /; F 
reeQ[{a, b, c, d, p, q}, x] && NeQ[b*c - a*d, 0] && (IntegerQ[p] || GtQ[a, 
0]) && (IntegerQ[q] || GtQ[c, 0])
 

rule 353
Int[(x_)*((a_) + (b_.)*(x_)^2)^(p_.)*((c_) + (d_.)*(x_)^2)^(q_.), x_Symbol] 
 :> Simp[1/2   Subst[Int[(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]
 

rule 504
Int[((a_) + (b_.)*(x_)^2)^(p_)/((c_) + (d_.)*(x_)), x_Symbol] :> Simp[c   I 
nt[(a + b*x^2)^p/(c^2 - d^2*x^2), x], x] - Simp[d   Int[x*((a + b*x^2)^p/(c 
^2 - d^2*x^2)), x], x] /; FreeQ[{a, b, c, d, p}, x]
 

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

rule 3994
Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*( 
x_)])^(n_), x_Symbol] :> Simp[d^(2*IntPart[m/2])*((d*Sec[e + f*x])^(2*FracP 
art[m/2])/(b*f*(Sec[e + f*x]^2)^FracPart[m/2]))   Subst[Int[(a + x)^n*(1 + 
x^2/b^2)^(m/2 - 1), x], x, b*Tan[e + f*x]], x] /; FreeQ[{a, b, d, e, f, m, 
n}, x] && NeQ[a^2 + b^2, 0] &&  !IntegerQ[m] && IntegerQ[n]
 
Maple [F]

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

Input:

int((d*sec(f*x+e))^m/(a+b*tan(f*x+e)),x)
 

Output:

int((d*sec(f*x+e))^m/(a+b*tan(f*x+e)),x)
 

Fricas [F]

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

integrate((d*sec(f*x+e))^m/(a+b*tan(f*x+e)),x, algorithm="fricas")
 

Output:

integral((d*sec(f*x + e))^m/(b*tan(f*x + e) + a), x)
 

Sympy [F]

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

integrate((d*sec(f*x+e))**m/(a+b*tan(f*x+e)),x)
 

Output:

Integral((d*sec(e + f*x))**m/(a + b*tan(e + f*x)), x)
 

Maxima [F]

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

integrate((d*sec(f*x+e))^m/(a+b*tan(f*x+e)),x, algorithm="maxima")
 

Output:

integrate((d*sec(f*x + e))^m/(b*tan(f*x + e) + a), x)
 

Giac [F]

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

integrate((d*sec(f*x+e))^m/(a+b*tan(f*x+e)),x, algorithm="giac")
 

Output:

integrate((d*sec(f*x + e))^m/(b*tan(f*x + e) + a), x)
 

Mupad [F(-1)]

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

int((d/cos(e + f*x))^m/(a + b*tan(e + f*x)),x)
 

Output:

int((d/cos(e + f*x))^m/(a + b*tan(e + f*x)), x)
 

Reduce [F]

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

int((d*sec(f*x+e))^m/(a+b*tan(f*x+e)),x)
                                                                                    
                                                                                    
 

Output:

d**m*int(sec(e + f*x)**m/(tan(e + f*x)*b + a),x)