\(\int \frac {(e x)^{-1+n}}{(a+b \csc (c+d x^n))^2} \, dx\) [82]

Optimal result
Mathematica [A] (verified)
Rubi [A] (verified)
Maple [C] (warning: unable to verify)
Fricas [A] (verification not implemented)
Sympy [F]
Maxima [F]
Giac [F]
Mupad [F(-1)]
Reduce [B] (verification not implemented)

Optimal result

Integrand size = 22, antiderivative size = 156 \[ \int \frac {(e x)^{-1+n}}{\left (a+b \csc \left (c+d x^n\right )\right )^2} \, dx=\frac {(e x)^n}{a^2 e n}+\frac {2 b \left (2 a^2-b^2\right ) x^{-n} (e x)^n \text {arctanh}\left (\frac {a+b \tan \left (\frac {1}{2} \left (c+d x^n\right )\right )}{\sqrt {a^2-b^2}}\right )}{a^2 \left (a^2-b^2\right )^{3/2} d e n}-\frac {b^2 x^{-n} (e x)^n \cot \left (c+d x^n\right )}{a \left (a^2-b^2\right ) d e n \left (a+b \csc \left (c+d x^n\right )\right )} \] Output:

(e*x)^n/a^2/e/n+2*b*(2*a^2-b^2)*(e*x)^n*arctanh((a+b*tan(1/2*c+1/2*d*x^n)) 
/(a^2-b^2)^(1/2))/a^2/(a^2-b^2)^(3/2)/d/e/n/(x^n)-b^2*(e*x)^n*cot(c+d*x^n) 
/a/(a^2-b^2)/d/e/n/(x^n)/(a+b*csc(c+d*x^n))
 

Mathematica [A] (verified)

Time = 1.30 (sec) , antiderivative size = 176, normalized size of antiderivative = 1.13 \[ \int \frac {(e x)^{-1+n}}{\left (a+b \csc \left (c+d x^n\right )\right )^2} \, dx=\frac {x^{-n} (e x)^n \left (2 b \left (-2 a^2+b^2\right ) \arctan \left (\frac {a+b \tan \left (\frac {1}{2} \left (c+d x^n\right )\right )}{\sqrt {-a^2+b^2}}\right ) \left (a+b \csc \left (c+d x^n\right )\right )+\sqrt {-a^2+b^2} \left (-a b^2 \cot \left (c+d x^n\right )+\left (a^2-b^2\right ) \left (c+d x^n\right ) \left (a+b \csc \left (c+d x^n\right )\right )\right )\right )}{a^2 (a-b) (a+b) \sqrt {-a^2+b^2} d e n \left (a+b \csc \left (c+d x^n\right )\right )} \] Input:

Integrate[(e*x)^(-1 + n)/(a + b*Csc[c + d*x^n])^2,x]
 

Output:

((e*x)^n*(2*b*(-2*a^2 + b^2)*ArcTan[(a + b*Tan[(c + d*x^n)/2])/Sqrt[-a^2 + 
 b^2]]*(a + b*Csc[c + d*x^n]) + Sqrt[-a^2 + b^2]*(-(a*b^2*Cot[c + d*x^n]) 
+ (a^2 - b^2)*(c + d*x^n)*(a + b*Csc[c + d*x^n]))))/(a^2*(a - b)*(a + b)*S 
qrt[-a^2 + b^2]*d*e*n*x^n*(a + b*Csc[c + d*x^n]))
 

Rubi [A] (verified)

Time = 0.78 (sec) , antiderivative size = 167, normalized size of antiderivative = 1.07, number of steps used = 14, number of rules used = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.591, Rules used = {4697, 4693, 3042, 4272, 25, 3042, 4407, 3042, 4318, 3042, 3139, 1083, 219}

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 {(e x)^{n-1}}{\left (a+b \csc \left (c+d x^n\right )\right )^2} \, dx\)

\(\Big \downarrow \) 4697

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

\(\Big \downarrow \) 4693

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4272

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

\(\Big \downarrow \) 25

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4407

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4318

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3139

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

\(\Big \downarrow \) 1083

\(\displaystyle \frac {x^{-n} (e x)^n \left (\frac {\frac {4 \left (2 a^2-b^2\right ) \int \frac {1}{-x^{2 n}-4 \left (1-\frac {a^2}{b^2}\right )}d\left (\frac {2 a}{b}+2 \tan \left (\frac {1}{2} \left (d x^n+c\right )\right )\right )}{a d}+\frac {\left (a^2-b^2\right ) x^n}{a}}{a \left (a^2-b^2\right )}-\frac {b^2 \cot \left (c+d x^n\right )}{a d \left (a^2-b^2\right ) \left (a+b \csc \left (c+d x^n\right )\right )}\right )}{e n}\)

\(\Big \downarrow \) 219

\(\displaystyle \frac {x^{-n} (e x)^n \left (\frac {\frac {2 b \left (2 a^2-b^2\right ) \text {arctanh}\left (\frac {b \left (\frac {2 a}{b}+2 \tan \left (\frac {1}{2} \left (c+d x^n\right )\right )\right )}{2 \sqrt {a^2-b^2}}\right )}{a d \sqrt {a^2-b^2}}+\frac {\left (a^2-b^2\right ) x^n}{a}}{a \left (a^2-b^2\right )}-\frac {b^2 \cot \left (c+d x^n\right )}{a d \left (a^2-b^2\right ) \left (a+b \csc \left (c+d x^n\right )\right )}\right )}{e n}\)

Input:

Int[(e*x)^(-1 + n)/(a + b*Csc[c + d*x^n])^2,x]
 

Output:

((e*x)^n*((((a^2 - b^2)*x^n)/a + (2*b*(2*a^2 - b^2)*ArcTanh[(b*((2*a)/b + 
2*Tan[(c + d*x^n)/2]))/(2*Sqrt[a^2 - b^2])])/(a*Sqrt[a^2 - b^2]*d))/(a*(a^ 
2 - b^2)) - (b^2*Cot[c + d*x^n])/(a*(a^2 - b^2)*d*(a + b*Csc[c + d*x^n]))) 
)/(e*n*x^n)
 

Defintions of rubi rules used

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

rule 219
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))* 
ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (Gt 
Q[a, 0] || LtQ[b, 0])
 

rule 1083
Int[((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Simp[-2   Subst[I 
nt[1/Simp[b^2 - 4*a*c - x^2, x], x], x, b + 2*c*x], x] /; FreeQ[{a, b, c}, 
x]
 

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

rule 3139
Int[((a_) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> With[{e = Fre 
eFactors[Tan[(c + d*x)/2], x]}, Simp[2*(e/d)   Subst[Int[1/(a + 2*b*e*x + a 
*e^2*x^2), x], x, Tan[(c + d*x)/2]/e], x]] /; FreeQ[{a, b, c, d}, x] && NeQ 
[a^2 - b^2, 0]
 

rule 4272
Int[(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^(n_), x_Symbol] :> Simp[b^2*Cot[ 
c + d*x]*((a + b*Csc[c + d*x])^(n + 1)/(a*d*(n + 1)*(a^2 - b^2))), x] + Sim 
p[1/(a*(n + 1)*(a^2 - b^2))   Int[(a + b*Csc[c + d*x])^(n + 1)*Simp[(a^2 - 
b^2)*(n + 1) - a*b*(n + 1)*Csc[c + d*x] + b^2*(n + 2)*Csc[c + d*x]^2, x], x 
], x] /; FreeQ[{a, b, c, d}, x] && NeQ[a^2 - b^2, 0] && LtQ[n, -1] && Integ 
erQ[2*n]
 

rule 4318
Int[csc[(e_.) + (f_.)*(x_)]/(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)), x_Symbo 
l] :> Simp[1/b   Int[1/(1 + (a/b)*Sin[e + f*x]), x], x] /; FreeQ[{a, b, e, 
f}, x] && NeQ[a^2 - b^2, 0]
 

rule 4407
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.) + (c_))/(csc[(e_.) + (f_.)*(x_)]*(b_.) + 
 (a_)), x_Symbol] :> Simp[c*(x/a), x] - Simp[(b*c - a*d)/a   Int[Csc[e + f* 
x]/(a + b*Csc[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c 
- a*d, 0]
 

rule 4693
Int[((a_.) + Csc[(c_.) + (d_.)*(x_)^(n_)]*(b_.))^(p_.)*(x_)^(m_.), x_Symbol 
] :> Simp[1/n   Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(a + b*Csc[c + d*x])^ 
p, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p}, x] && IGtQ[Simplify[(m + 
 1)/n], 0] && IntegerQ[p]
 

rule 4697
Int[((a_.) + Csc[(c_.) + (d_.)*(x_)^(n_)]*(b_.))^(p_.)*((e_)*(x_))^(m_.), x 
_Symbol] :> Simp[e^IntPart[m]*((e*x)^FracPart[m]/x^FracPart[m])   Int[x^m*( 
a + b*Csc[c + d*x^n])^p, x], x] /; FreeQ[{a, b, c, d, e, m, n, p}, x]
 
Maple [C] (warning: unable to verify)

Result contains higher order function than in optimal. Order 9 vs. order 3.

Time = 1.52 (sec) , antiderivative size = 622, normalized size of antiderivative = 3.99

method result size
risch \(\frac {x \,{\mathrm e}^{\frac {\left (-1+n \right ) \left (-i \operatorname {csgn}\left (i e \right ) \operatorname {csgn}\left (i x \right ) \operatorname {csgn}\left (i e x \right ) \pi +i \operatorname {csgn}\left (i e \right ) \operatorname {csgn}\left (i e x \right )^{2} \pi +i \operatorname {csgn}\left (i x \right ) \operatorname {csgn}\left (i e x \right )^{2} \pi -i \operatorname {csgn}\left (i e x \right )^{3} \pi +2 \ln \left (x \right )+2 \ln \left (e \right )\right )}{2}}}{a^{2} n}-\frac {2 i b^{2} e^{n} \left (-1\right )^{-\frac {\operatorname {csgn}\left (i x \right ) \operatorname {csgn}\left (i e x \right )^{2}}{2}} \left (-1\right )^{-\frac {\operatorname {csgn}\left (i e \right ) \operatorname {csgn}\left (i e x \right )^{2}}{2}} \left (-1\right )^{\frac {\operatorname {csgn}\left (i e \right ) \operatorname {csgn}\left (i x \right ) \operatorname {csgn}\left (i e x \right )}{2}} \left (b \,{\mathrm e}^{\frac {i \left (-\pi n \,\operatorname {csgn}\left (i e \right ) \operatorname {csgn}\left (i x \right ) \operatorname {csgn}\left (i e x \right )+\pi n \,\operatorname {csgn}\left (i e \right ) \operatorname {csgn}\left (i e x \right )^{2}+\pi n \,\operatorname {csgn}\left (i x \right ) \operatorname {csgn}\left (i e x \right )^{2}-\pi n \operatorname {csgn}\left (i e x \right )^{3}+\pi \operatorname {csgn}\left (i e x \right )^{3}+2 d \,x^{n}+2 c \right )}{2}}+i {\mathrm e}^{\frac {i \pi \,\operatorname {csgn}\left (i e x \right ) \left (-\operatorname {csgn}\left (i e \right ) \operatorname {csgn}\left (i x \right ) n +\operatorname {csgn}\left (i e \right ) \operatorname {csgn}\left (i e x \right ) n +n \,\operatorname {csgn}\left (i x \right ) \operatorname {csgn}\left (i e x \right )-n \operatorname {csgn}\left (i e x \right )^{2}+\operatorname {csgn}\left (i e x \right )^{2}\right )}{2}} a \right )}{a^{2} \left (-a^{2}+b^{2}\right ) d n \left (2 b \,{\mathrm e}^{i \left (c +d \,x^{n}\right )}-i a \,{\mathrm e}^{2 i \left (c +d \,x^{n}\right )}+i a \right ) e}-\frac {2 i \arctan \left (\frac {2 i a \,{\mathrm e}^{i \left (d \,x^{n}+2 c \right )}-2 \,{\mathrm e}^{i c} b}{2 \sqrt {a^{2} {\mathrm e}^{2 i c}-{\mathrm e}^{2 i c} b^{2}}}\right ) e^{n} \left (-2 a^{2}+b^{2}\right ) b \,{\mathrm e}^{\frac {i \left (-\pi n \,\operatorname {csgn}\left (i e \right ) \operatorname {csgn}\left (i x \right ) \operatorname {csgn}\left (i e x \right )+\pi n \,\operatorname {csgn}\left (i e \right ) \operatorname {csgn}\left (i e x \right )^{2}+\pi n \,\operatorname {csgn}\left (i x \right ) \operatorname {csgn}\left (i e x \right )^{2}-\pi n \operatorname {csgn}\left (i e x \right )^{3}+\pi \,\operatorname {csgn}\left (i e \right ) \operatorname {csgn}\left (i x \right ) \operatorname {csgn}\left (i e x \right )-\pi \,\operatorname {csgn}\left (i e \right ) \operatorname {csgn}\left (i e x \right )^{2}-\pi \,\operatorname {csgn}\left (i x \right ) \operatorname {csgn}\left (i e x \right )^{2}+\pi \operatorname {csgn}\left (i e x \right )^{3}+2 c \right )}{2}}}{\sqrt {a^{2} {\mathrm e}^{2 i c}-{\mathrm e}^{2 i c} b^{2}}\, d e n \,a^{2} \left (-a^{2}+b^{2}\right )}\) \(622\)

Input:

int((e*x)^(-1+n)/(a+b*csc(c+d*x^n))^2,x,method=_RETURNVERBOSE)
                                                                                    
                                                                                    
 

Output:

1/a^2/n*x*exp(1/2*(-1+n)*(-I*csgn(I*e)*csgn(I*x)*csgn(I*e*x)*Pi+I*csgn(I*e 
)*csgn(I*e*x)^2*Pi+I*csgn(I*x)*csgn(I*e*x)^2*Pi-I*csgn(I*e*x)^3*Pi+2*ln(x) 
+2*ln(e)))-2*I*b^2/a^2/(-a^2+b^2)/d/n/(2*b*exp(I*(c+d*x^n))-I*a*exp(2*I*(c 
+d*x^n))+I*a)*e^n*(-1)^(-1/2*csgn(I*x)*csgn(I*e*x)^2)*(-1)^(-1/2*csgn(I*e) 
*csgn(I*e*x)^2)*(-1)^(1/2*csgn(I*e)*csgn(I*x)*csgn(I*e*x))*(b*exp(1/2*I*(- 
Pi*n*csgn(I*e)*csgn(I*x)*csgn(I*e*x)+Pi*n*csgn(I*e)*csgn(I*e*x)^2+Pi*n*csg 
n(I*x)*csgn(I*e*x)^2-Pi*n*csgn(I*e*x)^3+Pi*csgn(I*e*x)^3+2*d*x^n+2*c))+I*e 
xp(1/2*I*Pi*csgn(I*e*x)*(-csgn(I*e)*csgn(I*x)*n+csgn(I*e)*csgn(I*e*x)*n+n* 
csgn(I*x)*csgn(I*e*x)-n*csgn(I*e*x)^2+csgn(I*e*x)^2))*a)/e-2*I*arctan(1/2* 
(2*I*a*exp(I*(d*x^n+2*c))-2*exp(I*c)*b)/(a^2*exp(2*I*c)-exp(2*I*c)*b^2)^(1 
/2))/(a^2*exp(2*I*c)-exp(2*I*c)*b^2)^(1/2)/d/e*e^n/n/a^2/(-a^2+b^2)*(-2*a^ 
2+b^2)*b*exp(1/2*I*(-Pi*n*csgn(I*e)*csgn(I*x)*csgn(I*e*x)+Pi*n*csgn(I*e)*c 
sgn(I*e*x)^2+Pi*n*csgn(I*x)*csgn(I*e*x)^2-Pi*n*csgn(I*e*x)^3+Pi*csgn(I*e)* 
csgn(I*x)*csgn(I*e*x)-Pi*csgn(I*e)*csgn(I*e*x)^2-Pi*csgn(I*x)*csgn(I*e*x)^ 
2+Pi*csgn(I*e*x)^3+2*c))
 

Fricas [A] (verification not implemented)

Time = 0.12 (sec) , antiderivative size = 630, normalized size of antiderivative = 4.04 \[ \int \frac {(e x)^{-1+n}}{\left (a+b \csc \left (c+d x^n\right )\right )^2} \, dx=\left [\frac {2 \, {\left (a^{5} - 2 \, a^{3} b^{2} + a b^{4}\right )} d e^{n - 1} x^{n} \sin \left (d x^{n} + c\right ) + 2 \, {\left (a^{4} b - 2 \, a^{2} b^{3} + b^{5}\right )} d e^{n - 1} x^{n} - 2 \, {\left (a^{3} b^{2} - a b^{4}\right )} e^{n - 1} \cos \left (d x^{n} + c\right ) + {\left ({\left (2 \, a^{3} b - a b^{3}\right )} \sqrt {a^{2} - b^{2}} e^{n - 1} \sin \left (d x^{n} + c\right ) + {\left (2 \, a^{2} b^{2} - b^{4}\right )} \sqrt {a^{2} - b^{2}} e^{n - 1}\right )} \log \left (\frac {{\left (a^{2} - 2 \, b^{2}\right )} \cos \left (d x^{n} + c\right )^{2} + 2 \, \sqrt {a^{2} - b^{2}} a \cos \left (d x^{n} + c\right ) + a^{2} + b^{2} + 2 \, {\left (\sqrt {a^{2} - b^{2}} b \cos \left (d x^{n} + c\right ) + a b\right )} \sin \left (d x^{n} + c\right )}{a^{2} \cos \left (d x^{n} + c\right )^{2} - 2 \, a b \sin \left (d x^{n} + c\right ) - a^{2} - b^{2}}\right )}{2 \, {\left ({\left (a^{7} - 2 \, a^{5} b^{2} + a^{3} b^{4}\right )} d n \sin \left (d x^{n} + c\right ) + {\left (a^{6} b - 2 \, a^{4} b^{3} + a^{2} b^{5}\right )} d n\right )}}, \frac {{\left (a^{5} - 2 \, a^{3} b^{2} + a b^{4}\right )} d e^{n - 1} x^{n} \sin \left (d x^{n} + c\right ) + {\left (a^{4} b - 2 \, a^{2} b^{3} + b^{5}\right )} d e^{n - 1} x^{n} - {\left (a^{3} b^{2} - a b^{4}\right )} e^{n - 1} \cos \left (d x^{n} + c\right ) + {\left ({\left (2 \, a^{3} b - a b^{3}\right )} \sqrt {-a^{2} + b^{2}} e^{n - 1} \sin \left (d x^{n} + c\right ) + {\left (2 \, a^{2} b^{2} - b^{4}\right )} \sqrt {-a^{2} + b^{2}} e^{n - 1}\right )} \arctan \left (-\frac {\sqrt {-a^{2} + b^{2}} b \sin \left (d x^{n} + c\right ) + \sqrt {-a^{2} + b^{2}} a}{{\left (a^{2} - b^{2}\right )} \cos \left (d x^{n} + c\right )}\right )}{{\left (a^{7} - 2 \, a^{5} b^{2} + a^{3} b^{4}\right )} d n \sin \left (d x^{n} + c\right ) + {\left (a^{6} b - 2 \, a^{4} b^{3} + a^{2} b^{5}\right )} d n}\right ] \] Input:

integrate((e*x)^(-1+n)/(a+b*csc(c+d*x^n))^2,x, algorithm="fricas")
 

Output:

[1/2*(2*(a^5 - 2*a^3*b^2 + a*b^4)*d*e^(n - 1)*x^n*sin(d*x^n + c) + 2*(a^4* 
b - 2*a^2*b^3 + b^5)*d*e^(n - 1)*x^n - 2*(a^3*b^2 - a*b^4)*e^(n - 1)*cos(d 
*x^n + c) + ((2*a^3*b - a*b^3)*sqrt(a^2 - b^2)*e^(n - 1)*sin(d*x^n + c) + 
(2*a^2*b^2 - b^4)*sqrt(a^2 - b^2)*e^(n - 1))*log(((a^2 - 2*b^2)*cos(d*x^n 
+ c)^2 + 2*sqrt(a^2 - b^2)*a*cos(d*x^n + c) + a^2 + b^2 + 2*(sqrt(a^2 - b^ 
2)*b*cos(d*x^n + c) + a*b)*sin(d*x^n + c))/(a^2*cos(d*x^n + c)^2 - 2*a*b*s 
in(d*x^n + c) - a^2 - b^2)))/((a^7 - 2*a^5*b^2 + a^3*b^4)*d*n*sin(d*x^n + 
c) + (a^6*b - 2*a^4*b^3 + a^2*b^5)*d*n), ((a^5 - 2*a^3*b^2 + a*b^4)*d*e^(n 
 - 1)*x^n*sin(d*x^n + c) + (a^4*b - 2*a^2*b^3 + b^5)*d*e^(n - 1)*x^n - (a^ 
3*b^2 - a*b^4)*e^(n - 1)*cos(d*x^n + c) + ((2*a^3*b - a*b^3)*sqrt(-a^2 + b 
^2)*e^(n - 1)*sin(d*x^n + c) + (2*a^2*b^2 - b^4)*sqrt(-a^2 + b^2)*e^(n - 1 
))*arctan(-(sqrt(-a^2 + b^2)*b*sin(d*x^n + c) + sqrt(-a^2 + b^2)*a)/((a^2 
- b^2)*cos(d*x^n + c))))/((a^7 - 2*a^5*b^2 + a^3*b^4)*d*n*sin(d*x^n + c) + 
 (a^6*b - 2*a^4*b^3 + a^2*b^5)*d*n)]
 

Sympy [F]

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

integrate((e*x)**(-1+n)/(a+b*csc(c+d*x**n))**2,x)
 

Output:

Integral((e*x)**(n - 1)/(a + b*csc(c + d*x**n))**2, x)
 

Maxima [F]

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

integrate((e*x)^(-1+n)/(a+b*csc(c+d*x^n))^2,x, algorithm="maxima")
 

Output:

((a^4 - a^2*b^2)*d*e^n*x^n*cos(2*d*x^n + 2*c)^2 - 2*a*b^3*e^n*cos(d*x^n + 
c) + 4*(a^2*b^2 - b^4)*d*e^n*x^n*cos(d*x^n + c)^2 + (a^4 - a^2*b^2)*d*e^n* 
x^n*sin(2*d*x^n + 2*c)^2 + 4*(a^2*b^2 - b^4)*d*e^n*x^n*sin(d*x^n + c)^2 + 
4*(a^3*b - a*b^3)*d*e^n*x^n*sin(d*x^n + c) + (a^4 - a^2*b^2)*d*e^n*x^n - 2 
*(a*b^3*e^n*cos(d*x^n + c) + 2*(a^3*b - a*b^3)*d*e^n*x^n*sin(d*x^n + c) + 
(a^4 - a^2*b^2)*d*e^n*x^n)*cos(2*d*x^n + 2*c) + 2*((2*a^8*b - 3*a^6*b^3 + 
a^4*b^5)*d*e^(n + 1)*n*cos(2*d*x^n + 2*c)^2*sin(c) + 4*(2*a^6*b^3 - 3*a^4* 
b^5 + a^2*b^7)*d*e^(n + 1)*n*cos(d*x^n + c)^2*sin(c) + 4*(2*a^7*b^2 - 3*a^ 
5*b^4 + a^3*b^6)*d*e^(n + 1)*n*cos(d*x^n + c)*sin(2*d*x^n + 2*c)*sin(c) + 
(2*a^8*b - 3*a^6*b^3 + a^4*b^5)*d*e^(n + 1)*n*sin(2*d*x^n + 2*c)^2*sin(c) 
+ 4*(2*a^6*b^3 - 3*a^4*b^5 + a^2*b^7)*d*e^(n + 1)*n*sin(d*x^n + c)^2*sin(c 
) + 4*(2*a^7*b^2 - 3*a^5*b^4 + a^3*b^6)*d*e^(n + 1)*n*sin(d*x^n + c)*sin(c 
) + (2*a^8*b - 3*a^6*b^3 + a^4*b^5)*d*e^(n + 1)*n*sin(c) - 2*(2*(2*a^7*b^2 
 - 3*a^5*b^4 + a^3*b^6)*d*e^(n + 1)*n*sin(d*x^n + c)*sin(c) + (2*a^8*b - 3 
*a^6*b^3 + a^4*b^5)*d*e^(n + 1)*n*sin(c))*cos(2*d*x^n + 2*c))*integrate((a 
^3*x^n*cos(2*d*x^n + 2*c)*cos(d*x^n) + a^3*x^n*sin(2*d*x^n + 2*c)*sin(d*x^ 
n) - 2*(a^2*b - b^3)*x^n*cos(d*x^n)^2*sin(c) - 2*(a^2*b - b^3)*x^n*sin(d*x 
^n)^2*sin(c) - (a^3 - a*b^2)*x^n*cos(d*x^n) - (a*b^2*x^n*cos(d*x^n)*cos(2* 
c) + a*b^2*x^n*sin(d*x^n)*sin(2*c))*cos(2*d*x^n) - (a*b^2*x^n*cos(2*c)*sin 
(d*x^n) - a*b^2*x^n*cos(d*x^n)*sin(2*c))*sin(2*d*x^n))/(a^8*e*x*cos(2*d...
 

Giac [F]

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

integrate((e*x)^(-1+n)/(a+b*csc(c+d*x^n))^2,x, algorithm="giac")
 

Output:

integrate((e*x)^(n - 1)/(b*csc(d*x^n + c) + a)^2, x)
 

Mupad [F(-1)]

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

int((e*x)^(n - 1)/(a + b/sin(c + d*x^n))^2,x)
 

Output:

int((e*x)^(n - 1)/(a + b/sin(c + d*x^n))^2, x)
 

Reduce [B] (verification not implemented)

Time = 0.18 (sec) , antiderivative size = 385, normalized size of antiderivative = 2.47 \[ \int \frac {(e x)^{-1+n}}{\left (a+b \csc \left (c+d x^n\right )\right )^2} \, dx=\frac {e^{n} \left (4 \sqrt {-a^{2}+b^{2}}\, \mathit {atan} \left (\frac {\tan \left (\frac {x^{n} d}{2}+\frac {c}{2}\right ) b +a}{\sqrt {-a^{2}+b^{2}}}\right ) \sin \left (x^{n} d +c \right ) a^{3} b -2 \sqrt {-a^{2}+b^{2}}\, \mathit {atan} \left (\frac {\tan \left (\frac {x^{n} d}{2}+\frac {c}{2}\right ) b +a}{\sqrt {-a^{2}+b^{2}}}\right ) \sin \left (x^{n} d +c \right ) a \,b^{3}+4 \sqrt {-a^{2}+b^{2}}\, \mathit {atan} \left (\frac {\tan \left (\frac {x^{n} d}{2}+\frac {c}{2}\right ) b +a}{\sqrt {-a^{2}+b^{2}}}\right ) a^{2} b^{2}-2 \sqrt {-a^{2}+b^{2}}\, \mathit {atan} \left (\frac {\tan \left (\frac {x^{n} d}{2}+\frac {c}{2}\right ) b +a}{\sqrt {-a^{2}+b^{2}}}\right ) b^{4}-\cos \left (x^{n} d +c \right ) a^{3} b^{2}+\cos \left (x^{n} d +c \right ) a \,b^{4}+x^{n} \sin \left (x^{n} d +c \right ) a^{5} d -2 x^{n} \sin \left (x^{n} d +c \right ) a^{3} b^{2} d +x^{n} \sin \left (x^{n} d +c \right ) a \,b^{4} d +x^{n} a^{4} b d -2 x^{n} a^{2} b^{3} d +x^{n} b^{5} d \right )}{a^{2} d e n \left (\sin \left (x^{n} d +c \right ) a^{5}-2 \sin \left (x^{n} d +c \right ) a^{3} b^{2}+\sin \left (x^{n} d +c \right ) a \,b^{4}+a^{4} b -2 a^{2} b^{3}+b^{5}\right )} \] Input:

int((e*x)^(-1+n)/(a+b*csc(c+d*x^n))^2,x)
 

Output:

(e**n*(4*sqrt( - a**2 + b**2)*atan((tan((x**n*d + c)/2)*b + a)/sqrt( - a** 
2 + b**2))*sin(x**n*d + c)*a**3*b - 2*sqrt( - a**2 + b**2)*atan((tan((x**n 
*d + c)/2)*b + a)/sqrt( - a**2 + b**2))*sin(x**n*d + c)*a*b**3 + 4*sqrt( - 
 a**2 + b**2)*atan((tan((x**n*d + c)/2)*b + a)/sqrt( - a**2 + b**2))*a**2* 
b**2 - 2*sqrt( - a**2 + b**2)*atan((tan((x**n*d + c)/2)*b + a)/sqrt( - a** 
2 + b**2))*b**4 - cos(x**n*d + c)*a**3*b**2 + cos(x**n*d + c)*a*b**4 + x** 
n*sin(x**n*d + c)*a**5*d - 2*x**n*sin(x**n*d + c)*a**3*b**2*d + x**n*sin(x 
**n*d + c)*a*b**4*d + x**n*a**4*b*d - 2*x**n*a**2*b**3*d + x**n*b**5*d))/( 
a**2*d*e*n*(sin(x**n*d + c)*a**5 - 2*sin(x**n*d + c)*a**3*b**2 + sin(x**n* 
d + c)*a*b**4 + a**4*b - 2*a**2*b**3 + b**5))