\(\int \cot ^3(c+d x) (a+b \sin ^n(c+d x))^p \, dx\) [516]

Optimal result
Mathematica [A] (verified)
Rubi [A] (verified)
Maple [F]
Fricas [F]
Sympy [F(-1)]
Maxima [F]
Giac [F]
Mupad [F(-1)]
Reduce [F]

Optimal result

Integrand size = 23, antiderivative size = 136 \[ \int \cot ^3(c+d x) \left (a+b \sin ^n(c+d x)\right )^p \, dx=\frac {\operatorname {Hypergeometric2F1}\left (1,1+p,2+p,1+\frac {b \sin ^n(c+d x)}{a}\right ) \left (a+b \sin ^n(c+d x)\right )^{1+p}}{a d n (1+p)}-\frac {\csc ^2(c+d x) \operatorname {Hypergeometric2F1}\left (-\frac {2}{n},-p,-\frac {2-n}{n},-\frac {b \sin ^n(c+d x)}{a}\right ) \left (a+b \sin ^n(c+d x)\right )^p \left (1+\frac {b \sin ^n(c+d x)}{a}\right )^{-p}}{2 d} \] Output:

hypergeom([1, p+1],[2+p],1+b*sin(d*x+c)^n/a)*(a+b*sin(d*x+c)^n)^(p+1)/a/d/ 
n/(p+1)-1/2*csc(d*x+c)^2*hypergeom([-p, -2/n],[-(2-n)/n],-b*sin(d*x+c)^n/a 
)*(a+b*sin(d*x+c)^n)^p/d/((1+b*sin(d*x+c)^n/a)^p)
 

Mathematica [A] (verified)

Time = 1.23 (sec) , antiderivative size = 129, normalized size of antiderivative = 0.95 \[ \int \cot ^3(c+d x) \left (a+b \sin ^n(c+d x)\right )^p \, dx=\frac {\left (a+b \sin ^n(c+d x)\right )^p \left (\frac {2 \operatorname {Hypergeometric2F1}\left (1,1+p,2+p,1+\frac {b \sin ^n(c+d x)}{a}\right ) \left (a+b \sin ^n(c+d x)\right )}{a n (1+p)}-\csc ^2(c+d x) \operatorname {Hypergeometric2F1}\left (-\frac {2}{n},-p,\frac {-2+n}{n},-\frac {b \sin ^n(c+d x)}{a}\right ) \left (1+\frac {b \sin ^n(c+d x)}{a}\right )^{-p}\right )}{2 d} \] Input:

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

Output:

((a + b*Sin[c + d*x]^n)^p*((2*Hypergeometric2F1[1, 1 + p, 2 + p, 1 + (b*Si 
n[c + d*x]^n)/a]*(a + b*Sin[c + d*x]^n))/(a*n*(1 + p)) - (Csc[c + d*x]^2*H 
ypergeometric2F1[-2/n, -p, (-2 + n)/n, -((b*Sin[c + d*x]^n)/a)])/(1 + (b*S 
in[c + d*x]^n)/a)^p))/(2*d)
 

Rubi [A] (verified)

Time = 0.40 (sec) , antiderivative size = 134, normalized size of antiderivative = 0.99, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.174, Rules used = {3042, 3709, 2383, 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) \left (a+b \sin ^n(c+d x)\right )^p \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {\left (a+b \sin (c+d x)^n\right )^p}{\tan (c+d x)^3}dx\)

\(\Big \downarrow \) 3709

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

\(\Big \downarrow \) 2383

\(\displaystyle \frac {\int \left (\csc ^3(c+d x) \left (b \sin ^n(c+d x)+a\right )^p-\csc (c+d x) \left (b \sin ^n(c+d x)+a\right )^p\right )d\sin (c+d x)}{d}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {\frac {\left (a+b \sin ^n(c+d x)\right )^{p+1} \operatorname {Hypergeometric2F1}\left (1,p+1,p+2,\frac {b \sin ^n(c+d x)}{a}+1\right )}{a n (p+1)}-\frac {1}{2} \csc ^2(c+d x) \left (a+b \sin ^n(c+d x)\right )^p \left (\frac {b \sin ^n(c+d x)}{a}+1\right )^{-p} \operatorname {Hypergeometric2F1}\left (-\frac {2}{n},-p,-\frac {2-n}{n},-\frac {b \sin ^n(c+d x)}{a}\right )}{d}\)

Input:

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

Output:

((Hypergeometric2F1[1, 1 + p, 2 + p, 1 + (b*Sin[c + d*x]^n)/a]*(a + b*Sin[ 
c + d*x]^n)^(1 + p))/(a*n*(1 + p)) - (Csc[c + d*x]^2*Hypergeometric2F1[-2/ 
n, -p, -((2 - n)/n), -((b*Sin[c + d*x]^n)/a)]*(a + b*Sin[c + d*x]^n)^p)/(2 
*(1 + (b*Sin[c + d*x]^n)/a)^p))/d
 

Defintions of rubi rules used

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

rule 2383
Int[(Pq_)*((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.), x_Symbol] :> I 
nt[ExpandIntegrand[(c*x)^m*Pq*(a + b*x^n)^p, x], x] /; FreeQ[{a, b, c, m, n 
, p}, x] && (PolyQ[Pq, x] || PolyQ[Pq, x^n]) &&  !IGtQ[m, 0]
 

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

rule 3709
Int[((a_) + (b_.)*((c_.)*sin[(e_.) + (f_.)*(x_)])^(n_))^(p_.)*tan[(e_.) + ( 
f_.)*(x_)]^(m_.), x_Symbol] :> With[{ff = FreeFactors[Sin[e + f*x], x]}, Si 
mp[ff^(m + 1)/f   Subst[Int[x^m*((a + b*(c*ff*x)^n)^p/(1 - ff^2*x^2)^((m + 
1)/2)), x], x, Sin[e + f*x]/ff], x]] /; FreeQ[{a, b, c, e, f, n, p}, x] && 
ILtQ[(m - 1)/2, 0]
 
Maple [F]

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

Input:

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

Output:

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

Fricas [F]

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

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

Output:

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

Sympy [F(-1)]

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

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

Output:

Timed out
 

Maxima [F]

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

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

Output:

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

Giac [F]

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

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

Output:

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

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

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

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

Output:

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