\(\int \cot ^3(c+d x) (a+b \sec (c+d x))^n \, dx\) [354]

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 = 280 \[ \int \cot ^3(c+d x) (a+b \sec (c+d x))^n \, dx=-\frac {\operatorname {Hypergeometric2F1}\left (1,1+n,2+n,\frac {a+b \sec (c+d x)}{a}\right ) (a+b \sec (c+d x))^{1+n}}{a d (1+n)}+\frac {\operatorname {Hypergeometric2F1}\left (1,1+n,2+n,\frac {a+b \sec (c+d x)}{a-b}\right ) (a+b \sec (c+d x))^{1+n}}{2 (a-b) d (1+n)}+\frac {\operatorname {Hypergeometric2F1}\left (1,1+n,2+n,\frac {a+b \sec (c+d x)}{a+b}\right ) (a+b \sec (c+d x))^{1+n}}{2 (a+b) d (1+n)}-\frac {b \operatorname {Hypergeometric2F1}\left (2,1+n,2+n,\frac {a+b \sec (c+d x)}{a-b}\right ) (a+b \sec (c+d x))^{1+n}}{4 (a-b)^2 d (1+n)}+\frac {b \operatorname {Hypergeometric2F1}\left (2,1+n,2+n,\frac {a+b \sec (c+d x)}{a+b}\right ) (a+b \sec (c+d x))^{1+n}}{4 (a+b)^2 d (1+n)} \] Output:

-hypergeom([1, 1+n],[2+n],(a+b*sec(d*x+c))/a)*(a+b*sec(d*x+c))^(1+n)/a/d/( 
1+n)+1/2*hypergeom([1, 1+n],[2+n],(a+b*sec(d*x+c))/(a-b))*(a+b*sec(d*x+c)) 
^(1+n)/(a-b)/d/(1+n)+1/2*hypergeom([1, 1+n],[2+n],(a+b*sec(d*x+c))/(a+b))* 
(a+b*sec(d*x+c))^(1+n)/(a+b)/d/(1+n)-1/4*b*hypergeom([2, 1+n],[2+n],(a+b*s 
ec(d*x+c))/(a-b))*(a+b*sec(d*x+c))^(1+n)/(a-b)^2/d/(1+n)+1/4*b*hypergeom([ 
2, 1+n],[2+n],(a+b*sec(d*x+c))/(a+b))*(a+b*sec(d*x+c))^(1+n)/(a+b)^2/d/(1+ 
n)
 

Mathematica [A] (verified)

Time = 0.55 (sec) , antiderivative size = 186, normalized size of antiderivative = 0.66 \[ \int \cot ^3(c+d x) (a+b \sec (c+d x))^n \, dx=\frac {\left (\frac {2 \operatorname {Hypergeometric2F1}\left (1,1+n,2+n,\frac {a+b \sec (c+d x)}{a-b}\right )}{a-b}+\frac {2 \operatorname {Hypergeometric2F1}\left (1,1+n,2+n,\frac {a+b \sec (c+d x)}{a+b}\right )}{a+b}-\frac {4 \operatorname {Hypergeometric2F1}\left (1,1+n,2+n,1+\frac {b \sec (c+d x)}{a}\right )}{a}-\frac {b \operatorname {Hypergeometric2F1}\left (2,1+n,2+n,\frac {a+b \sec (c+d x)}{a-b}\right )}{(a-b)^2}+\frac {b \operatorname {Hypergeometric2F1}\left (2,1+n,2+n,\frac {a+b \sec (c+d x)}{a+b}\right )}{(a+b)^2}\right ) (a+b \sec (c+d x))^{1+n}}{4 d (1+n)} \] Input:

Integrate[Cot[c + d*x]^3*(a + b*Sec[c + d*x])^n,x]
 

Output:

(((2*Hypergeometric2F1[1, 1 + n, 2 + n, (a + b*Sec[c + d*x])/(a - b)])/(a 
- b) + (2*Hypergeometric2F1[1, 1 + n, 2 + n, (a + b*Sec[c + d*x])/(a + b)] 
)/(a + b) - (4*Hypergeometric2F1[1, 1 + n, 2 + n, 1 + (b*Sec[c + d*x])/a]) 
/a - (b*Hypergeometric2F1[2, 1 + n, 2 + n, (a + b*Sec[c + d*x])/(a - b)])/ 
(a - b)^2 + (b*Hypergeometric2F1[2, 1 + n, 2 + n, (a + b*Sec[c + d*x])/(a 
+ b)])/(a + b)^2)*(a + b*Sec[c + d*x])^(1 + n))/(4*d*(1 + n))
 

Rubi [A] (verified)

Time = 0.43 (sec) , antiderivative size = 284, normalized size of antiderivative = 1.01, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.238, Rules used = {3042, 25, 4373, 615, 2009}

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 \cot ^3(c+d x) (a+b \sec (c+d x))^n \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int -\frac {\left (a+b \csc \left (c+d x+\frac {\pi }{2}\right )\right )^n}{\cot \left (c+d x+\frac {\pi }{2}\right )^3}dx\)

\(\Big \downarrow \) 25

\(\displaystyle -\int \frac {\left (a+b \csc \left (\frac {1}{2} (2 c+\pi )+d x\right )\right )^n}{\cot \left (\frac {1}{2} (2 c+\pi )+d x\right )^3}dx\)

\(\Big \downarrow \) 4373

\(\displaystyle \frac {b^4 \int \frac {\cos (c+d x) (a+b \sec (c+d x))^n}{b \left (b^2-b^2 \sec ^2(c+d x)\right )^2}d(b \sec (c+d x))}{d}\)

\(\Big \downarrow \) 615

\(\displaystyle \frac {b^4 \int \left (\frac {\cos (c+d x) (a+b \sec (c+d x))^n}{b^5}-\frac {\sec (c+d x) (a+b \sec (c+d x))^n}{b^3 \left (b^2 \sec ^2(c+d x)-b^2\right )}+\frac {(a+b \sec (c+d x))^n}{4 b^3 (b-b \sec (c+d x))^2}-\frac {(a+b \sec (c+d x))^n}{4 b^3 (\sec (c+d x) b+b)^2}\right )d(b \sec (c+d x))}{d}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {b^4 \left (\frac {(a+b \sec (c+d x))^{n+1} \operatorname {Hypergeometric2F1}\left (1,n+1,n+2,\frac {a+b \sec (c+d x)}{a-b}\right )}{2 b^4 (n+1) (a-b)}+\frac {(a+b \sec (c+d x))^{n+1} \operatorname {Hypergeometric2F1}\left (1,n+1,n+2,\frac {a+b \sec (c+d x)}{a+b}\right )}{2 b^4 (n+1) (a+b)}-\frac {(a+b \sec (c+d x))^{n+1} \operatorname {Hypergeometric2F1}\left (1,n+1,n+2,\frac {b \sec (c+d x)}{a}+1\right )}{a b^4 (n+1)}-\frac {(a+b \sec (c+d x))^{n+1} \operatorname {Hypergeometric2F1}\left (2,n+1,n+2,\frac {a+b \sec (c+d x)}{a-b}\right )}{4 b^3 (n+1) (a-b)^2}+\frac {(a+b \sec (c+d x))^{n+1} \operatorname {Hypergeometric2F1}\left (2,n+1,n+2,\frac {a+b \sec (c+d x)}{a+b}\right )}{4 b^3 (n+1) (a+b)^2}\right )}{d}\)

Input:

Int[Cot[c + d*x]^3*(a + b*Sec[c + d*x])^n,x]
 

Output:

(b^4*((Hypergeometric2F1[1, 1 + n, 2 + n, (a + b*Sec[c + d*x])/(a - b)]*(a 
 + b*Sec[c + d*x])^(1 + n))/(2*(a - b)*b^4*(1 + n)) + (Hypergeometric2F1[1 
, 1 + n, 2 + n, (a + b*Sec[c + d*x])/(a + b)]*(a + b*Sec[c + d*x])^(1 + n) 
)/(2*b^4*(a + b)*(1 + n)) - (Hypergeometric2F1[1, 1 + n, 2 + n, 1 + (b*Sec 
[c + d*x])/a]*(a + b*Sec[c + d*x])^(1 + n))/(a*b^4*(1 + n)) - (Hypergeomet 
ric2F1[2, 1 + n, 2 + n, (a + b*Sec[c + d*x])/(a - b)]*(a + b*Sec[c + d*x]) 
^(1 + n))/(4*(a - b)^2*b^3*(1 + n)) + (Hypergeometric2F1[2, 1 + n, 2 + n, 
(a + b*Sec[c + d*x])/(a + b)]*(a + b*Sec[c + d*x])^(1 + n))/(4*b^3*(a + b) 
^2*(1 + n))))/d
 

Defintions of rubi rules used

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

rule 615
Int[((e_.)*(x_))^(m_.)*((c_) + (d_.)*(x_))^(n_)*((a_) + (b_.)*(x_)^2)^(p_), 
 x_Symbol] :> Int[ExpandIntegrand[(e*x)^m*(c + d*x)^n*(a + b*x^2)^p, x], x] 
 /; FreeQ[{a, b, c, d, e, m, n}, x] && ILtQ[p, 0]
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

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

rule 4373
Int[cot[(c_.) + (d_.)*(x_)]^(m_.)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^(n 
_), x_Symbol] :> Simp[-(-1)^((m - 1)/2)/(d*b^(m - 1))   Subst[Int[(b^2 - x^ 
2)^((m - 1)/2)*((a + x)^n/x), x], x, b*Csc[c + d*x]], x] /; FreeQ[{a, b, c, 
 d, n}, x] && IntegerQ[(m - 1)/2] && NeQ[a^2 - b^2, 0]
 
Maple [F]

\[\int \cot \left (d x +c \right )^{3} \left (a +b \sec \left (d x +c \right )\right )^{n}d x\]

Input:

int(cot(d*x+c)^3*(a+b*sec(d*x+c))^n,x)
 

Output:

int(cot(d*x+c)^3*(a+b*sec(d*x+c))^n,x)
 

Fricas [F]

\[ \int \cot ^3(c+d x) (a+b \sec (c+d x))^n \, dx=\int { {\left (b \sec \left (d x + c\right ) + a\right )}^{n} \cot \left (d x + c\right )^{3} \,d x } \] Input:

integrate(cot(d*x+c)^3*(a+b*sec(d*x+c))^n,x, algorithm="fricas")
 

Output:

integral((b*sec(d*x + c) + a)^n*cot(d*x + c)^3, x)
 

Sympy [F]

\[ \int \cot ^3(c+d x) (a+b \sec (c+d x))^n \, dx=\int \left (a + b \sec {\left (c + d x \right )}\right )^{n} \cot ^{3}{\left (c + d x \right )}\, dx \] Input:

integrate(cot(d*x+c)**3*(a+b*sec(d*x+c))**n,x)
 

Output:

Integral((a + b*sec(c + d*x))**n*cot(c + d*x)**3, x)
 

Maxima [F]

\[ \int \cot ^3(c+d x) (a+b \sec (c+d x))^n \, dx=\int { {\left (b \sec \left (d x + c\right ) + a\right )}^{n} \cot \left (d x + c\right )^{3} \,d x } \] Input:

integrate(cot(d*x+c)^3*(a+b*sec(d*x+c))^n,x, algorithm="maxima")
 

Output:

integrate((b*sec(d*x + c) + a)^n*cot(d*x + c)^3, x)
 

Giac [F]

\[ \int \cot ^3(c+d x) (a+b \sec (c+d x))^n \, dx=\int { {\left (b \sec \left (d x + c\right ) + a\right )}^{n} \cot \left (d x + c\right )^{3} \,d x } \] Input:

integrate(cot(d*x+c)^3*(a+b*sec(d*x+c))^n,x, algorithm="giac")
 

Output:

integrate((b*sec(d*x + c) + a)^n*cot(d*x + c)^3, x)
 

Mupad [F(-1)]

Timed out. \[ \int \cot ^3(c+d x) (a+b \sec (c+d x))^n \, dx=\int {\mathrm {cot}\left (c+d\,x\right )}^3\,{\left (a+\frac {b}{\cos \left (c+d\,x\right )}\right )}^n \,d x \] Input:

int(cot(c + d*x)^3*(a + b/cos(c + d*x))^n,x)
 

Output:

int(cot(c + d*x)^3*(a + b/cos(c + d*x))^n, x)
 

Reduce [F]

\[ \int \cot ^3(c+d x) (a+b \sec (c+d x))^n \, dx=\int \left (\sec \left (d x +c \right ) b +a \right )^{n} \cot \left (d x +c \right )^{3}d x \] Input:

int(cot(d*x+c)^3*(a+b*sec(d*x+c))^n,x)
 

Output:

int((sec(c + d*x)*b + a)**n*cot(c + d*x)**3,x)