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

Optimal result
Mathematica [B] (warning: unable to verify)
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 = 432 \[ \int \frac {(d \csc (e+f x))^n}{(a+b \sin (e+f x))^3} \, dx=-\frac {3 a b^2 \operatorname {AppellF1}\left (\frac {1}{2},\frac {1}{2} (-1+n),3,\frac {3}{2},\cos ^2(e+f x),-\frac {b^2 \cos ^2(e+f x)}{a^2-b^2}\right ) \cos (e+f x) (d \csc (e+f x))^{3+n} \sin ^4(e+f x) \sin ^2(e+f x)^{\frac {1}{2} (-1+n)}}{\left (a^2-b^2\right )^3 d^3 f}+\frac {b^3 \operatorname {AppellF1}\left (\frac {1}{2},\frac {1}{2} (-2+n),3,\frac {3}{2},\cos ^2(e+f x),-\frac {b^2 \cos ^2(e+f x)}{a^2-b^2}\right ) \cos (e+f x) (d \csc (e+f x))^{3+n} \sin ^3(e+f x) \sin ^2(e+f x)^{n/2}}{\left (a^2-b^2\right )^3 d^3 f}+\frac {3 a^2 b \operatorname {AppellF1}\left (\frac {1}{2},\frac {n}{2},3,\frac {3}{2},\cos ^2(e+f x),-\frac {b^2 \cos ^2(e+f x)}{a^2-b^2}\right ) \cos (e+f x) (d \csc (e+f x))^{3+n} \sin ^3(e+f x) \sin ^2(e+f x)^{n/2}}{\left (a^2-b^2\right )^3 d^3 f}-\frac {a^3 \operatorname {AppellF1}\left (\frac {1}{2},\frac {1+n}{2},3,\frac {3}{2},\cos ^2(e+f x),-\frac {b^2 \cos ^2(e+f x)}{a^2-b^2}\right ) \cos (e+f x) (d \csc (e+f x))^{3+n} \sin ^2(e+f x)^{\frac {3+n}{2}}}{\left (a^2-b^2\right )^3 d^3 f} \] Output:

-3*a*b^2*AppellF1(1/2,-1/2+1/2*n,3,3/2,cos(f*x+e)^2,-b^2*cos(f*x+e)^2/(a^2 
-b^2))*cos(f*x+e)*(d*csc(f*x+e))^(3+n)*sin(f*x+e)^4*(sin(f*x+e)^2)^(-1/2+1 
/2*n)/(a^2-b^2)^3/d^3/f+b^3*AppellF1(1/2,-1+1/2*n,3,3/2,cos(f*x+e)^2,-b^2* 
cos(f*x+e)^2/(a^2-b^2))*cos(f*x+e)*(d*csc(f*x+e))^(3+n)*sin(f*x+e)^3*(sin( 
f*x+e)^2)^(1/2*n)/(a^2-b^2)^3/d^3/f+3*a^2*b*AppellF1(1/2,1/2*n,3,3/2,cos(f 
*x+e)^2,-b^2*cos(f*x+e)^2/(a^2-b^2))*cos(f*x+e)*(d*csc(f*x+e))^(3+n)*sin(f 
*x+e)^3*(sin(f*x+e)^2)^(1/2*n)/(a^2-b^2)^3/d^3/f-a^3*AppellF1(1/2,1/2+1/2* 
n,3,3/2,cos(f*x+e)^2,-b^2*cos(f*x+e)^2/(a^2-b^2))*cos(f*x+e)*(d*csc(f*x+e) 
)^(3+n)*(sin(f*x+e)^2)^(3/2+1/2*n)/(a^2-b^2)^3/d^3/f
 

Mathematica [B] (warning: unable to verify)

Leaf count is larger than twice the leaf count of optimal. \(2406\) vs. \(2(432)=864\).

Time = 26.53 (sec) , antiderivative size = 2406, normalized size of antiderivative = 5.57 \[ \int \frac {(d \csc (e+f x))^n}{(a+b \sin (e+f x))^3} \, dx=\text {Result too large to show} \] Input:

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

Output:

((d*Csc[e + f*x])^n*(Cot[e + f*x]*Sqrt[Sec[e + f*x]^2])^n*Tan[e + f*x]*(-( 
a*(a^2 + 3*b^2)*(-2 + n)*AppellF1[(1 - n)/2, -1 - n/2, 2, (3 - n)/2, -Tan[ 
e + f*x]^2, (-1 + b^2/a^2)*Tan[e + f*x]^2]) + b*(4*a*b*(-2 + n)*AppellF1[( 
1 - n)/2, -1 - n/2, 3, (3 - n)/2, -Tan[e + f*x]^2, (-1 + b^2/a^2)*Tan[e + 
f*x]^2] + (-1 + n)*((3*a^2 + b^2)*AppellF1[1 - n/2, (-1 - n)/2, 2, 2 - n/2 
, -Tan[e + f*x]^2, (-1 + b^2/a^2)*Tan[e + f*x]^2] - 4*b^2*AppellF1[1 - n/2 
, (-1 - n)/2, 3, 2 - n/2, -Tan[e + f*x]^2, (-1 + b^2/a^2)*Tan[e + f*x]^2]) 
*Tan[e + f*x])))/(a^4*(a^2 - b^2)*f*(-2 + n)*(-1 + n)*(Sec[e + f*x]^2)^(n/ 
2)*(a + b*Sin[e + f*x])^3*(((Sec[e + f*x]^2)^(1 - n/2)*(Cot[e + f*x]*Sqrt[ 
Sec[e + f*x]^2])^n*(-(a*(a^2 + 3*b^2)*(-2 + n)*AppellF1[(1 - n)/2, -1 - n/ 
2, 2, (3 - n)/2, -Tan[e + f*x]^2, (-1 + b^2/a^2)*Tan[e + f*x]^2]) + b*(4*a 
*b*(-2 + n)*AppellF1[(1 - n)/2, -1 - n/2, 3, (3 - n)/2, -Tan[e + f*x]^2, ( 
-1 + b^2/a^2)*Tan[e + f*x]^2] + (-1 + n)*((3*a^2 + b^2)*AppellF1[1 - n/2, 
(-1 - n)/2, 2, 2 - n/2, -Tan[e + f*x]^2, (-1 + b^2/a^2)*Tan[e + f*x]^2] - 
4*b^2*AppellF1[1 - n/2, (-1 - n)/2, 3, 2 - n/2, -Tan[e + f*x]^2, (-1 + b^2 
/a^2)*Tan[e + f*x]^2])*Tan[e + f*x])))/(a^4*(a^2 - b^2)*(-2 + n)*(-1 + n)) 
 + (n*(Cot[e + f*x]*Sqrt[Sec[e + f*x]^2])^(-1 + n)*(Sqrt[Sec[e + f*x]^2] - 
 Csc[e + f*x]^2*Sqrt[Sec[e + f*x]^2])*Tan[e + f*x]*(-(a*(a^2 + 3*b^2)*(-2 
+ n)*AppellF1[(1 - n)/2, -1 - n/2, 2, (3 - n)/2, -Tan[e + f*x]^2, (-1 + b^ 
2/a^2)*Tan[e + f*x]^2]) + b*(4*a*b*(-2 + n)*AppellF1[(1 - n)/2, -1 - n/...
 

Rubi [A] (verified)

Time = 1.05 (sec) , antiderivative size = 418, normalized size of antiderivative = 0.97, number of steps used = 7, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.304, Rules used = {3042, 3717, 3042, 4356, 3042, 3303, 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 \frac {(d \csc (e+f x))^n}{(a+b \sin (e+f x))^3} \, dx\)

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3717

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4356

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3303

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

\(\Big \downarrow \) 2009

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

Input:

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

Output:

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

Defintions of rubi rules used

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 3303
Int[((d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*( 
x_)])^(m_.), x_Symbol] :> Int[ExpandTrig[(d*sin[e + f*x])^n*(1/((a - b*sin[ 
e + f*x])^m/(a^2 - b^2*sin[e + f*x]^2)^m)), x], x] /; FreeQ[{a, b, d, e, f, 
 n}, x] && NeQ[a^2 - b^2, 0] && ILtQ[m, -1]
 

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 4356
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + 
(a_))^(m_.), x_Symbol] :> Simp[Sin[e + f*x]^n*(d*Csc[e + f*x])^n   Int[(b + 
 a*Sin[e + f*x])^m/Sin[e + f*x]^(m + n), x], x] /; FreeQ[{a, b, d, e, f, n} 
, x] && NeQ[a^2 - b^2, 0] && IntegerQ[m]
 
Maple [F]

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

Input:

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

Output:

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

Fricas [F]

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

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

Output:

integral(-(d*csc(f*x + e))^n/(3*a*b^2*cos(f*x + e)^2 - a^3 - 3*a*b^2 + (b^ 
3*cos(f*x + e)^2 - 3*a^2*b - b^3)*sin(f*x + e)), x)
 

Sympy [F]

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

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

Output:

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

Maxima [F]

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

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

Output:

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

Giac [F]

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

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

Output:

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

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

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

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

Output:

d**n*int(csc(e + f*x)**n/(sin(e + f*x)**3*b**3 + 3*sin(e + f*x)**2*a*b**2 
+ 3*sin(e + f*x)*a**2*b + a**3),x)