\(\int \frac {(d \csc (e+f x))^n}{a+a \sin (e+f x)} \, dx\) [824]

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

Optimal result

Integrand size = 23, antiderivative size = 171 \[ \int \frac {(d \csc (e+f x))^n}{a+a \sin (e+f x)} \, dx=-\frac {\cot (e+f x) (d \csc (e+f x))^n}{f (a+a \csc (e+f x))}+\frac {d n \cos (e+f x) (d \csc (e+f x))^{-1+n} \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1-n}{2},\frac {3-n}{2},\sin ^2(e+f x)\right )}{a f (1-n) \sqrt {\cos ^2(e+f x)}}+\frac {\cos (e+f x) (d \csc (e+f x))^n \operatorname {Hypergeometric2F1}\left (\frac {1}{2},-\frac {n}{2},\frac {2-n}{2},\sin ^2(e+f x)\right )}{a f \sqrt {\cos ^2(e+f x)}} \] Output:

-cot(f*x+e)*(d*csc(f*x+e))^n/f/(a+a*csc(f*x+e))+d*n*cos(f*x+e)*(d*csc(f*x+ 
e))^(-1+n)*hypergeom([1/2, 1/2-1/2*n],[3/2-1/2*n],sin(f*x+e)^2)/a/f/(1-n)/ 
(cos(f*x+e)^2)^(1/2)+cos(f*x+e)*(d*csc(f*x+e))^n*hypergeom([1/2, -1/2*n],[ 
1-1/2*n],sin(f*x+e)^2)/a/f/(cos(f*x+e)^2)^(1/2)
 

Mathematica [F]

\[ \int \frac {(d \csc (e+f x))^n}{a+a \sin (e+f x)} \, dx=\int \frac {(d \csc (e+f x))^n}{a+a \sin (e+f x)} \, dx \] Input:

Integrate[(d*Csc[e + f*x])^n/(a + a*Sin[e + f*x]),x]
 

Output:

Integrate[(d*Csc[e + f*x])^n/(a + a*Sin[e + f*x]), x]
 

Rubi [A] (verified)

Time = 0.76 (sec) , antiderivative size = 181, normalized size of antiderivative = 1.06, number of steps used = 10, number of rules used = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.435, Rules used = {3042, 3717, 3042, 4307, 3042, 4274, 3042, 4259, 3042, 3122}

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 \frac {(d \csc (e+f x))^n}{a \sin (e+f x)+a} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {(d \csc (e+f x))^n}{a \sin (e+f x)+a}dx\)

\(\Big \downarrow \) 3717

\(\displaystyle \frac {\int \frac {(d \csc (e+f x))^{n+1}}{\csc (e+f x) a+a}dx}{d}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\int \frac {(d \csc (e+f x))^{n+1}}{\csc (e+f x) a+a}dx}{d}\)

\(\Big \downarrow \) 4307

\(\displaystyle \frac {\frac {d n \int (d \csc (e+f x))^n (a-a \csc (e+f x))dx}{a^2}-\frac {d \cot (e+f x) (d \csc (e+f x))^n}{f (a \csc (e+f x)+a)}}{d}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\frac {d n \int (d \csc (e+f x))^n (a-a \csc (e+f x))dx}{a^2}-\frac {d \cot (e+f x) (d \csc (e+f x))^n}{f (a \csc (e+f x)+a)}}{d}\)

\(\Big \downarrow \) 4274

\(\displaystyle \frac {\frac {d n \left (a \int (d \csc (e+f x))^ndx-\frac {a \int (d \csc (e+f x))^{n+1}dx}{d}\right )}{a^2}-\frac {d \cot (e+f x) (d \csc (e+f x))^n}{f (a \csc (e+f x)+a)}}{d}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\frac {d n \left (a \int (d \csc (e+f x))^ndx-\frac {a \int (d \csc (e+f x))^{n+1}dx}{d}\right )}{a^2}-\frac {d \cot (e+f x) (d \csc (e+f x))^n}{f (a \csc (e+f x)+a)}}{d}\)

\(\Big \downarrow \) 4259

\(\displaystyle \frac {\frac {d n \left (a \left (\frac {\sin (e+f x)}{d}\right )^n (d \csc (e+f x))^n \int \left (\frac {\sin (e+f x)}{d}\right )^{-n}dx-\frac {a \left (\frac {\sin (e+f x)}{d}\right )^n (d \csc (e+f x))^n \int \left (\frac {\sin (e+f x)}{d}\right )^{-n-1}dx}{d}\right )}{a^2}-\frac {d \cot (e+f x) (d \csc (e+f x))^n}{f (a \csc (e+f x)+a)}}{d}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\frac {d n \left (a \left (\frac {\sin (e+f x)}{d}\right )^n (d \csc (e+f x))^n \int \left (\frac {\sin (e+f x)}{d}\right )^{-n}dx-\frac {a \left (\frac {\sin (e+f x)}{d}\right )^n (d \csc (e+f x))^n \int \left (\frac {\sin (e+f x)}{d}\right )^{-n-1}dx}{d}\right )}{a^2}-\frac {d \cot (e+f x) (d \csc (e+f x))^n}{f (a \csc (e+f x)+a)}}{d}\)

\(\Big \downarrow \) 3122

\(\displaystyle \frac {\frac {d n \left (\frac {a d \cos (e+f x) (d \csc (e+f x))^{n-1} \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1-n}{2},\frac {3-n}{2},\sin ^2(e+f x)\right )}{f (1-n) \sqrt {\cos ^2(e+f x)}}+\frac {a \cos (e+f x) (d \csc (e+f x))^n \operatorname {Hypergeometric2F1}\left (\frac {1}{2},-\frac {n}{2},\frac {2-n}{2},\sin ^2(e+f x)\right )}{f n \sqrt {\cos ^2(e+f x)}}\right )}{a^2}-\frac {d \cot (e+f x) (d \csc (e+f x))^n}{f (a \csc (e+f x)+a)}}{d}\)

Input:

Int[(d*Csc[e + f*x])^n/(a + a*Sin[e + f*x]),x]
 

Output:

(-((d*Cot[e + f*x]*(d*Csc[e + f*x])^n)/(f*(a + a*Csc[e + f*x]))) + (d*n*(( 
a*d*Cos[e + f*x]*(d*Csc[e + f*x])^(-1 + n)*Hypergeometric2F1[1/2, (1 - n)/ 
2, (3 - n)/2, Sin[e + f*x]^2])/(f*(1 - n)*Sqrt[Cos[e + f*x]^2]) + (a*Cos[e 
 + f*x]*(d*Csc[e + f*x])^n*Hypergeometric2F1[1/2, -1/2*n, (2 - n)/2, Sin[e 
 + f*x]^2])/(f*n*Sqrt[Cos[e + f*x]^2])))/a^2)/d
 

Defintions of rubi rules used

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

rule 3122
Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[Cos[c + d*x]*(( 
b*Sin[c + d*x])^(n + 1)/(b*d*(n + 1)*Sqrt[Cos[c + d*x]^2]))*Hypergeometric2 
F1[1/2, (n + 1)/2, (n + 3)/2, Sin[c + d*x]^2], x] /; FreeQ[{b, c, d, n}, x] 
 &&  !IntegerQ[2*n]
 

rule 3717
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(m_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x 
_)]^(n_.))^(p_.), x_Symbol] :> Simp[d^(n*p)   Int[(d*Csc[e + f*x])^(m - n*p 
)*(b + a*Csc[e + f*x]^n)^p, x], x] /; FreeQ[{a, b, d, e, f, m, n, p}, x] && 
  !IntegerQ[m] && IntegersQ[n, p]
 

rule 4259
Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> Simp[(b*Csc[c + d*x] 
)^(n - 1)*((Sin[c + d*x]/b)^(n - 1)   Int[1/(Sin[c + d*x]/b)^n, x]), x] /; 
FreeQ[{b, c, d, n}, x] &&  !IntegerQ[n]
 

rule 4274
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + 
(a_)), x_Symbol] :> Simp[a   Int[(d*Csc[e + f*x])^n, x], x] + Simp[b/d   In 
t[(d*Csc[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, n}, x]
 

rule 4307
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_)/(csc[(e_.) + (f_.)*(x_)]*(b_.) + ( 
a_)), x_Symbol] :> Simp[(-b)*d*Cot[e + f*x]*((d*Csc[e + f*x])^(n - 1)/(a*f* 
(a + b*Csc[e + f*x]))), x] + Simp[d*((n - 1)/(a*b))   Int[(d*Csc[e + f*x])^ 
(n - 1)*(a - b*Csc[e + f*x]), x], x] /; FreeQ[{a, b, d, e, f, n}, x] && EqQ 
[a^2 - b^2, 0]
 
Maple [F]

\[\int \frac {\left (d \csc \left (f x +e \right )\right )^{n}}{a +a \sin \left (f x +e \right )}d x\]

Input:

int((d*csc(f*x+e))^n/(a+a*sin(f*x+e)),x)
 

Output:

int((d*csc(f*x+e))^n/(a+a*sin(f*x+e)),x)
 

Fricas [F]

\[ \int \frac {(d \csc (e+f x))^n}{a+a \sin (e+f x)} \, dx=\int { \frac {\left (d \csc \left (f x + e\right )\right )^{n}}{a \sin \left (f x + e\right ) + a} \,d x } \] Input:

integrate((d*csc(f*x+e))^n/(a+a*sin(f*x+e)),x, algorithm="fricas")
 

Output:

integral((d*csc(f*x + e))^n/(a*sin(f*x + e) + a), x)
 

Sympy [F]

\[ \int \frac {(d \csc (e+f x))^n}{a+a \sin (e+f x)} \, dx=\frac {\int \frac {\left (d \csc {\left (e + f x \right )}\right )^{n}}{\sin {\left (e + f x \right )} + 1}\, dx}{a} \] Input:

integrate((d*csc(f*x+e))**n/(a+a*sin(f*x+e)),x)
 

Output:

Integral((d*csc(e + f*x))**n/(sin(e + f*x) + 1), x)/a
 

Maxima [F]

\[ \int \frac {(d \csc (e+f x))^n}{a+a \sin (e+f x)} \, dx=\int { \frac {\left (d \csc \left (f x + e\right )\right )^{n}}{a \sin \left (f x + e\right ) + a} \,d x } \] Input:

integrate((d*csc(f*x+e))^n/(a+a*sin(f*x+e)),x, algorithm="maxima")
 

Output:

integrate((d*csc(f*x + e))^n/(a*sin(f*x + e) + a), x)
 

Giac [F]

\[ \int \frac {(d \csc (e+f x))^n}{a+a \sin (e+f x)} \, dx=\int { \frac {\left (d \csc \left (f x + e\right )\right )^{n}}{a \sin \left (f x + e\right ) + a} \,d x } \] Input:

integrate((d*csc(f*x+e))^n/(a+a*sin(f*x+e)),x, algorithm="giac")
 

Output:

integrate((d*csc(f*x + e))^n/(a*sin(f*x + e) + a), x)
 

Mupad [F(-1)]

Timed out. \[ \int \frac {(d \csc (e+f x))^n}{a+a \sin (e+f x)} \, dx=\int \frac {{\left (\frac {d}{\sin \left (e+f\,x\right )}\right )}^n}{a+a\,\sin \left (e+f\,x\right )} \,d x \] Input:

int((d/sin(e + f*x))^n/(a + a*sin(e + f*x)),x)
 

Output:

int((d/sin(e + f*x))^n/(a + a*sin(e + f*x)), x)
 

Reduce [F]

\[ \int \frac {(d \csc (e+f x))^n}{a+a \sin (e+f x)} \, dx=\frac {d^{n} \left (\int \frac {\csc \left (f x +e \right )^{n}}{\sin \left (f x +e \right )+1}d x \right )}{a} \] Input:

int((d*csc(f*x+e))^n/(a+a*sin(f*x+e)),x)
                                                                                    
                                                                                    
 

Output:

(d**n*int(csc(e + f*x)**n/(sin(e + f*x) + 1),x))/a