\(\int (d \cot (e+f x))^m (b (c \tan (e+f x))^n)^p \, dx\) [425]

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 = 25, antiderivative size = 80 \[ \int (d \cot (e+f x))^m \left (b (c \tan (e+f x))^n\right )^p \, dx=\frac {(d \cot (e+f x))^m \operatorname {Hypergeometric2F1}\left (1,\frac {1}{2} (1-m+n p),\frac {1}{2} (3-m+n p),-\tan ^2(e+f x)\right ) \tan (e+f x) \left (b (c \tan (e+f x))^n\right )^p}{f (1-m+n p)} \] Output:

(d*cot(f*x+e))^m*hypergeom([1, 1/2*n*p-1/2*m+1/2],[1/2*n*p-1/2*m+3/2],-tan 
(f*x+e)^2)*tan(f*x+e)*(b*(c*tan(f*x+e))^n)^p/f/(n*p-m+1)
 

Mathematica [A] (verified)

Time = 0.11 (sec) , antiderivative size = 77, normalized size of antiderivative = 0.96 \[ \int (d \cot (e+f x))^m \left (b (c \tan (e+f x))^n\right )^p \, dx=\frac {d (d \cot (e+f x))^{-1+m} \operatorname {Hypergeometric2F1}\left (1,\frac {1}{2} (1-m+n p),\frac {1}{2} (3-m+n p),-\tan ^2(e+f x)\right ) \left (b (c \tan (e+f x))^n\right )^p}{f (1-m+n p)} \] Input:

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

Output:

(d*(d*Cot[e + f*x])^(-1 + m)*Hypergeometric2F1[1, (1 - m + n*p)/2, (3 - m 
+ n*p)/2, -Tan[e + f*x]^2]*(b*(c*Tan[e + f*x])^n)^p)/(f*(1 - m + n*p))
 

Rubi [A] (verified)

Time = 0.45 (sec) , antiderivative size = 80, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.280, Rules used = {3042, 4142, 3042, 3084, 3042, 3957, 278}

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 (d \cot (e+f x))^m \left (b (c \tan (e+f x))^n\right )^p \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int (d \cot (e+f x))^m \left (b (c \tan (e+f x))^n\right )^pdx\)

\(\Big \downarrow \) 4142

\(\displaystyle (c \tan (e+f x))^{-n p} \left (b (c \tan (e+f x))^n\right )^p \int (d \cot (e+f x))^m (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 (d \cot (e+f x))^m (c \tan (e+f x))^{n p}dx\)

\(\Big \downarrow \) 3084

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3957

\(\displaystyle \frac {c (d \cot (e+f x))^m \left (b (c \tan (e+f x))^n\right )^p (c \tan (e+f x))^{m-n p} \int \frac {(c \tan (e+f x))^{n p-m}}{\tan ^2(e+f x) c^2+c^2}d(c \tan (e+f x))}{f}\)

\(\Big \downarrow \) 278

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

Input:

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

Output:

((d*Cot[e + f*x])^m*Hypergeometric2F1[1, (1 - m + n*p)/2, (3 - m + n*p)/2, 
 -Tan[e + f*x]^2]*Tan[e + f*x]*(b*(c*Tan[e + f*x])^n)^p)/(f*(1 - m + n*p))
 

Defintions of rubi rules used

rule 278
Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Simp[a^p*(( 
c*x)^(m + 1)/(c*(m + 1)))*Hypergeometric2F1[-p, (m + 1)/2, (m + 1)/2 + 1, ( 
-b)*(x^2/a)], x] /; FreeQ[{a, b, c, m, p}, x] &&  !IGtQ[p, 0] && (ILtQ[p, 0 
] || GtQ[a, 0])
 

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

rule 3084
Int[(cot[(e_.) + (f_.)*(x_)]*(a_.))^(m_)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n 
_), x_Symbol] :> Simp[(a*Cot[e + f*x])^m*(b*Tan[e + f*x])^m   Int[(b*Tan[e 
+ f*x])^(n - m), x], x] /; FreeQ[{a, b, e, f, m, n}, x] &&  !IntegerQ[m] && 
  !IntegerQ[n]
 

rule 3957
Int[((b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[b/d   Subst[Int 
[x^n/(b^2 + x^2), x], x, b*Tan[c + d*x]], x] /; FreeQ[{b, c, d, n}, x] && 
!IntegerQ[n]
 

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 \left (d \cot \left (f x +e \right )\right )^{m} \left (b \left (c \tan \left (f x +e \right )\right )^{n}\right )^{p}d x\]

Input:

int((d*cot(f*x+e))^m*(b*(c*tan(f*x+e))^n)^p,x)
 

Output:

int((d*cot(f*x+e))^m*(b*(c*tan(f*x+e))^n)^p,x)
 

Fricas [F]

\[ \int (d \cot (e+f x))^m \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} \left (d \cot \left (f x + e\right )\right )^{m} \,d x } \] Input:

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

Output:

integral(((c*tan(f*x + e))^n*b)^p*(d*cot(f*x + e))^m, x)
 

Sympy [F]

\[ \int (d \cot (e+f x))^m \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} \left (d \cot {\left (e + f x \right )}\right )^{m}\, dx \] Input:

integrate((d*cot(f*x+e))**m*(b*(c*tan(f*x+e))**n)**p,x)
 

Output:

Integral((b*(c*tan(e + f*x))**n)**p*(d*cot(e + f*x))**m, x)
 

Maxima [F]

\[ \int (d \cot (e+f x))^m \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} \left (d \cot \left (f x + e\right )\right )^{m} \,d x } \] Input:

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

Output:

integrate(((c*tan(f*x + e))^n*b)^p*(d*cot(f*x + e))^m, x)
 

Giac [F]

\[ \int (d \cot (e+f x))^m \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} \left (d \cot \left (f x + e\right )\right )^{m} \,d x } \] Input:

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

Output:

integrate(((c*tan(f*x + e))^n*b)^p*(d*cot(f*x + e))^m, x)
 

Mupad [F(-1)]

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

int((d*cot(e + f*x))^m*(b*(c*tan(e + f*x))^n)^p,x)
 

Output:

int((d*cot(e + f*x))^m*(b*(c*tan(e + f*x))^n)^p, x)
 

Reduce [F]

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

int((d*cot(f*x+e))^m*(b*(c*tan(f*x+e))^n)^p,x)
 

Output:

d**m*c**(n*p)*b**p*int(tan(e + f*x)**(n*p)*cot(e + f*x)**m,x)