\(\int (b \csc (e+f x))^n (a \sin (e+f x))^m \, dx\) [538]

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 = 87 \[ \int (b \csc (e+f x))^n (a \sin (e+f x))^m \, dx=\frac {\cos (e+f x) (b \csc (e+f x))^n \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1}{2} (1+m-n),\frac {1}{2} (3+m-n),\sin ^2(e+f x)\right ) (a \sin (e+f x))^{1+m}}{a f (1+m-n) \sqrt {\cos ^2(e+f x)}} \] Output:

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

Mathematica [A] (verified)

Time = 12.04 (sec) , antiderivative size = 102, normalized size of antiderivative = 1.17 \[ \int (b \csc (e+f x))^n (a \sin (e+f x))^m \, dx=\frac {2 (b \csc (e+f x))^n \operatorname {Hypergeometric2F1}\left (\frac {1}{2} (1+m-n),1+m-n,\frac {1}{2} (3+m-n),-\tan ^2\left (\frac {1}{2} (e+f x)\right )\right ) \sec ^2\left (\frac {1}{2} (e+f x)\right )^{m-n} (a \sin (e+f x))^m \tan \left (\frac {1}{2} (e+f x)\right )}{f (1+m-n)} \] Input:

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

Output:

(2*(b*Csc[e + f*x])^n*Hypergeometric2F1[(1 + m - n)/2, 1 + m - n, (3 + m - 
 n)/2, -Tan[(e + f*x)/2]^2]*(Sec[(e + f*x)/2]^2)^(m - n)*(a*Sin[e + f*x])^ 
m*Tan[(e + f*x)/2])/(f*(1 + m - n))
 

Rubi [A] (verified)

Time = 0.50 (sec) , antiderivative size = 87, 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, 3068, 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 (a \sin (e+f x))^m (b \csc (e+f x))^n \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int (a \sin (e+f x))^m (b \csc (e+f x))^ndx\)

\(\Big \downarrow \) 3068

\(\displaystyle (a \sin (e+f x))^n (b \csc (e+f x))^n \int (a \sin (e+f x))^{m-n}dx\)

\(\Big \downarrow \) 3042

\(\displaystyle (a \sin (e+f x))^n (b \csc (e+f x))^n \int (a \sin (e+f x))^{m-n}dx\)

\(\Big \downarrow \) 3122

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

Input:

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

Output:

(Cos[e + f*x]*(b*Csc[e + f*x])^n*Hypergeometric2F1[1/2, (1 + m - n)/2, (3 
+ m - n)/2, Sin[e + f*x]^2]*(a*Sin[e + f*x])^(1 + m))/(a*f*(1 + m - n)*Sqr 
t[Cos[e + f*x]^2])
 

Defintions of rubi rules used

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

rule 3068
Int[(csc[(e_.) + (f_.)*(x_)]*(b_.))^(n_)*((a_.)*sin[(e_.) + (f_.)*(x_)])^(m 
_.), x_Symbol] :> Simp[(a*b)^IntPart[n]*(a*Sin[e + f*x])^FracPart[n]*(b*Csc 
[e + f*x])^FracPart[n]   Int[(a*Sin[e + f*x])^(m - n), x], x] /; FreeQ[{a, 
b, e, f, m, n}, x] &&  !IntegerQ[m] &&  !IntegerQ[n]
 

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]
 
Maple [F]

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

Input:

int((b*csc(f*x+e))^n*(a*sin(f*x+e))^m,x)
 

Output:

int((b*csc(f*x+e))^n*(a*sin(f*x+e))^m,x)
 

Fricas [F]

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

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

Output:

integral((b*csc(f*x + e))^n*(a*sin(f*x + e))^m, x)
 

Sympy [F]

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

integrate((b*csc(f*x+e))**n*(a*sin(f*x+e))**m,x)
 

Output:

Integral((a*sin(e + f*x))**m*(b*csc(e + f*x))**n, x)
 

Maxima [F]

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

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

Output:

integrate((b*csc(f*x + e))^n*(a*sin(f*x + e))^m, x)
 

Giac [F]

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

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

Output:

integrate((b*csc(f*x + e))^n*(a*sin(f*x + e))^m, x)
 

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

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

int((b*csc(f*x+e))^n*(a*sin(f*x+e))^m,x)
 

Output:

b**n*a**m*int(sin(e + f*x)**m*csc(e + f*x)**n,x)