\(\int \cos (e+f x) (b (c \tan (e+f x))^n)^p \, dx\) [486]

Optimal result
Mathematica [C] (warning: unable to verify)
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 = 79 \[ \int \cos (e+f x) \left (b (c \tan (e+f x))^n\right )^p \, dx=\frac {\cos ^2(e+f x)^{\frac {n p}{2}} \operatorname {Hypergeometric2F1}\left (\frac {n p}{2},\frac {1}{2} (1+n p),\frac {1}{2} (3+n p),\sin ^2(e+f x)\right ) \sin (e+f x) \left (b (c \tan (e+f x))^n\right )^p}{f (1+n p)} \] Output:

(cos(f*x+e)^2)^(1/2*n*p)*hypergeom([1/2*n*p, 1/2*n*p+1/2],[1/2*n*p+3/2],si 
n(f*x+e)^2)*sin(f*x+e)*(b*(c*tan(f*x+e))^n)^p/f/(n*p+1)
 

Mathematica [C] (warning: unable to verify)

Result contains higher order function than in optimal. Order 6 vs. order 5 in optimal.

Time = 2.72 (sec) , antiderivative size = 482, normalized size of antiderivative = 6.10 \[ \int \cos (e+f x) \left (b (c \tan (e+f x))^n\right )^p \, dx=\frac {(3+n p) \left (\operatorname {AppellF1}\left (\frac {1}{2} (1+n p),n p,1,\frac {1}{2} (3+n p),\tan ^2\left (\frac {1}{2} (e+f x)\right ),-\tan ^2\left (\frac {1}{2} (e+f x)\right )\right )-2 \operatorname {AppellF1}\left (\frac {1}{2} (1+n p),n p,2,\frac {1}{2} (3+n p),\tan ^2\left (\frac {1}{2} (e+f x)\right ),-\tan ^2\left (\frac {1}{2} (e+f x)\right )\right )\right ) \sin (2 (e+f x)) \left (b (c \tan (e+f x))^n\right )^p}{2 f (1+n p) \left ((3+n p) \operatorname {AppellF1}\left (\frac {1}{2} (1+n p),n p,1,\frac {1}{2} (3+n p),\tan ^2\left (\frac {1}{2} (e+f x)\right ),-\tan ^2\left (\frac {1}{2} (e+f x)\right )\right )-2 \left ((3+n p) \operatorname {AppellF1}\left (\frac {1}{2} (1+n p),n p,2,\frac {1}{2} (3+n p),\tan ^2\left (\frac {1}{2} (e+f x)\right ),-\tan ^2\left (\frac {1}{2} (e+f x)\right )\right )+\left (\operatorname {AppellF1}\left (\frac {1}{2} (3+n p),n p,2,\frac {1}{2} (5+n p),\tan ^2\left (\frac {1}{2} (e+f x)\right ),-\tan ^2\left (\frac {1}{2} (e+f x)\right )\right )-4 \operatorname {AppellF1}\left (\frac {1}{2} (3+n p),n p,3,\frac {1}{2} (5+n p),\tan ^2\left (\frac {1}{2} (e+f x)\right ),-\tan ^2\left (\frac {1}{2} (e+f x)\right )\right )-n p \operatorname {AppellF1}\left (\frac {1}{2} (3+n p),1+n p,1,\frac {1}{2} (5+n p),\tan ^2\left (\frac {1}{2} (e+f x)\right ),-\tan ^2\left (\frac {1}{2} (e+f x)\right )\right )+2 n p \operatorname {AppellF1}\left (\frac {1}{2} (3+n p),1+n p,2,\frac {1}{2} (5+n p),\tan ^2\left (\frac {1}{2} (e+f x)\right ),-\tan ^2\left (\frac {1}{2} (e+f x)\right )\right )\right ) \tan ^2\left (\frac {1}{2} (e+f x)\right )\right )\right )} \] Input:

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

Output:

((3 + n*p)*(AppellF1[(1 + n*p)/2, n*p, 1, (3 + n*p)/2, Tan[(e + f*x)/2]^2, 
 -Tan[(e + f*x)/2]^2] - 2*AppellF1[(1 + n*p)/2, n*p, 2, (3 + n*p)/2, Tan[( 
e + f*x)/2]^2, -Tan[(e + f*x)/2]^2])*Sin[2*(e + f*x)]*(b*(c*Tan[e + f*x])^ 
n)^p)/(2*f*(1 + n*p)*((3 + n*p)*AppellF1[(1 + n*p)/2, n*p, 1, (3 + n*p)/2, 
 Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2] - 2*((3 + n*p)*AppellF1[(1 + n*p 
)/2, n*p, 2, (3 + n*p)/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2] + (Appe 
llF1[(3 + n*p)/2, n*p, 2, (5 + n*p)/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/ 
2]^2] - 4*AppellF1[(3 + n*p)/2, n*p, 3, (5 + n*p)/2, Tan[(e + f*x)/2]^2, - 
Tan[(e + f*x)/2]^2] - n*p*AppellF1[(3 + n*p)/2, 1 + n*p, 1, (5 + n*p)/2, T 
an[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2] + 2*n*p*AppellF1[(3 + n*p)/2, 1 + 
n*p, 2, (5 + n*p)/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2])*Tan[(e + f* 
x)/2]^2)))
 

Rubi [A] (verified)

Time = 0.32 (sec) , antiderivative size = 79, 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, 4142, 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 \cos (e+f x) \left (b (c \tan (e+f x))^n\right )^p \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {\left (b (c \tan (e+f x))^n\right )^p}{\sec (e+f x)}dx\)

\(\Big \downarrow \) 4142

\(\displaystyle (c \tan (e+f x))^{-n p} \left (b (c \tan (e+f x))^n\right )^p \int \cos (e+f x) (c \tan (e+f x))^{n p}dx\)

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3097

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

Input:

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

Output:

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

Defintions of rubi rules used

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

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]
 

rule 4142
Int[(u_.)*((b_.)*((c_.)*tan[(e_.) + (f_.)*(x_)])^(n_))^(p_), x_Symbol] :> S 
imp[b^IntPart[p]*((b*(c*Tan[e + f*x])^n)^FracPart[p]/(c*Tan[e + f*x])^(n*Fr 
acPart[p]))   Int[ActivateTrig[u]*(c*Tan[e + f*x])^(n*p), x], x] /; FreeQ[{ 
b, c, e, f, n, p}, x] &&  !IntegerQ[p] &&  !IntegerQ[n] && (EqQ[u, 1] || Ma 
tchQ[u, ((d_.)*(trig_)[e + f*x])^(m_.) /; FreeQ[{d, m}, x] && MemberQ[{sin, 
 cos, tan, cot, sec, csc}, trig]])
 
Maple [F]

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

Input:

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

Output:

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

Fricas [F]

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

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

Output:

integral(((c*tan(f*x + e))^n*b)^p*cos(f*x + e), x)
 

Sympy [F]

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

integrate(cos(f*x+e)*(b*(c*tan(f*x+e))**n)**p,x)
 

Output:

Integral((b*(c*tan(e + f*x))**n)**p*cos(e + f*x), x)
 

Maxima [F]

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

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

Output:

integrate(((c*tan(f*x + e))^n*b)^p*cos(f*x + e), x)
 

Giac [F]

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

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

Output:

integrate(((c*tan(f*x + e))^n*b)^p*cos(f*x + e), x)
 

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

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

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

Output:

c**(n*p)*b**p*int(tan(e + f*x)**(n*p)*cos(e + f*x),x)