\(\int (a \cos (e+f x))^m (b \tan (e+f x))^n \, dx\) [189]

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 = 86 \[ \int (a \cos (e+f x))^m (b \tan (e+f x))^n \, dx=\frac {(a \cos (e+f x))^m \cos ^2(e+f x)^{\frac {1}{2} (1-m+n)} \operatorname {Hypergeometric2F1}\left (\frac {1+n}{2},\frac {1}{2} (1-m+n),\frac {3+n}{2},\sin ^2(e+f x)\right ) (b \tan (e+f x))^{1+n}}{b f (1+n)} \] Output:

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

Mathematica [A] (verified)

Time = 0.48 (sec) , antiderivative size = 81, normalized size of antiderivative = 0.94 \[ \int (a \cos (e+f x))^m (b \tan (e+f x))^n \, dx=\frac {(a \cos (e+f x))^m \operatorname {Hypergeometric2F1}\left (\frac {2+m}{2},\frac {1+n}{2},\frac {3+n}{2},-\tan ^2(e+f x)\right ) \sec ^2(e+f x)^{m/2} \tan (e+f x) (b \tan (e+f x))^n}{f (1+n)} \] Input:

Integrate[(a*Cos[e + f*x])^m*(b*Tan[e + f*x])^n,x]
 

Output:

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

Rubi [A] (verified)

Time = 0.33 (sec) , antiderivative size = 86, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {3042, 3083, 3042, 3097}

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 (a \cos (e+f x))^m (b \tan (e+f x))^n \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int (a \cos (e+f x))^m (b \tan (e+f x))^ndx\)

\(\Big \downarrow \) 3083

\(\displaystyle (a \cos (e+f x))^m \left (\frac {\sec (e+f x)}{a}\right )^m \int \left (\frac {\sec (e+f x)}{a}\right )^{-m} (b \tan (e+f x))^ndx\)

\(\Big \downarrow \) 3042

\(\displaystyle (a \cos (e+f x))^m \left (\frac {\sec (e+f x)}{a}\right )^m \int \left (\frac {\sec (e+f x)}{a}\right )^{-m} (b \tan (e+f x))^ndx\)

\(\Big \downarrow \) 3097

\(\displaystyle \frac {(a \cos (e+f x))^m (b \tan (e+f x))^{n+1} \cos ^2(e+f x)^{\frac {1}{2} (-m+n+1)} \operatorname {Hypergeometric2F1}\left (\frac {n+1}{2},\frac {1}{2} (-m+n+1),\frac {n+3}{2},\sin ^2(e+f x)\right )}{b f (n+1)}\)

Input:

Int[(a*Cos[e + f*x])^m*(b*Tan[e + f*x])^n,x]
 

Output:

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

Defintions of rubi rules used

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

rule 3083
Int[(cos[(e_.) + (f_.)*(x_)]*(a_.))^(m_)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n 
_), x_Symbol] :> Simp[(a*Cos[e + f*x])^FracPart[m]*(Sec[e + f*x]/a)^FracPar 
t[m]   Int[(b*Tan[e + f*x])^n/(Sec[e + f*x]/a)^m, x], x] /; FreeQ[{a, b, e, 
 f, m, n}, x] &&  !IntegerQ[m] &&  !IntegerQ[n]
 

rule 3097
Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^( 
n_), x_Symbol] :> Simp[(a*Sec[e + f*x])^m*(b*Tan[e + f*x])^(n + 1)*((Cos[e 
+ f*x]^2)^((m + n + 1)/2)/(b*f*(n + 1)))*Hypergeometric2F1[(n + 1)/2, (m + 
n + 1)/2, (n + 3)/2, Sin[e + f*x]^2], x] /; FreeQ[{a, b, e, f, m, n}, x] && 
  !IntegerQ[(n - 1)/2] &&  !IntegerQ[m/2]
 
Maple [F]

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

Input:

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

Output:

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

Fricas [F]

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

integrate((a*cos(f*x+e))^m*(b*tan(f*x+e))^n,x, algorithm="fricas")
 

Output:

integral((a*cos(f*x + e))^m*(b*tan(f*x + e))^n, x)
 

Sympy [F]

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

integrate((a*cos(f*x+e))**m*(b*tan(f*x+e))**n,x)
 

Output:

Integral((a*cos(e + f*x))**m*(b*tan(e + f*x))**n, x)
 

Maxima [F]

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

integrate((a*cos(f*x+e))^m*(b*tan(f*x+e))^n,x, algorithm="maxima")
 

Output:

integrate((a*cos(f*x + e))^m*(b*tan(f*x + e))^n, x)
 

Giac [F]

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

integrate((a*cos(f*x+e))^m*(b*tan(f*x+e))^n,x, algorithm="giac")
 

Output:

integrate((a*cos(f*x + e))^m*(b*tan(f*x + e))^n, x)
 

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

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

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

Output:

b**n*a**m*int(tan(e + f*x)**n*cos(e + f*x)**m,x)