\(\int x^2 \csc ^{-1}(a+b x)^2 \, dx\) [28]

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

Optimal result

Integrand size = 12, antiderivative size = 272 \[ \int x^2 \csc ^{-1}(a+b x)^2 \, dx=\frac {x}{3 b^2}-\frac {2 a (a+b x) \sqrt {1-\frac {1}{(a+b x)^2}} \csc ^{-1}(a+b x)}{b^3}+\frac {(a+b x)^2 \sqrt {1-\frac {1}{(a+b x)^2}} \csc ^{-1}(a+b x)}{3 b^3}+\frac {a^3 \csc ^{-1}(a+b x)^2}{3 b^3}+\frac {1}{3} x^3 \csc ^{-1}(a+b x)^2+\frac {2 \csc ^{-1}(a+b x) \text {arctanh}\left (e^{i \csc ^{-1}(a+b x)}\right )}{3 b^3}+\frac {4 a^2 \csc ^{-1}(a+b x) \text {arctanh}\left (e^{i \csc ^{-1}(a+b x)}\right )}{b^3}-\frac {2 a \log (a+b x)}{b^3}-\frac {i \operatorname {PolyLog}\left (2,-e^{i \csc ^{-1}(a+b x)}\right )}{3 b^3}-\frac {2 i a^2 \operatorname {PolyLog}\left (2,-e^{i \csc ^{-1}(a+b x)}\right )}{b^3}+\frac {i \operatorname {PolyLog}\left (2,e^{i \csc ^{-1}(a+b x)}\right )}{3 b^3}+\frac {2 i a^2 \operatorname {PolyLog}\left (2,e^{i \csc ^{-1}(a+b x)}\right )}{b^3} \] Output:

1/3*x/b^2-2*a*(b*x+a)*(1-1/(b*x+a)^2)^(1/2)*arccsc(b*x+a)/b^3+1/3*(b*x+a)^ 
2*(1-1/(b*x+a)^2)^(1/2)*arccsc(b*x+a)/b^3+1/3*a^3*arccsc(b*x+a)^2/b^3+1/3* 
x^3*arccsc(b*x+a)^2+2/3*arccsc(b*x+a)*arctanh(I/(b*x+a)+(1-1/(b*x+a)^2)^(1 
/2))/b^3+4*a^2*arccsc(b*x+a)*arctanh(I/(b*x+a)+(1-1/(b*x+a)^2)^(1/2))/b^3- 
2*a*ln(b*x+a)/b^3-1/3*I*polylog(2,-I/(b*x+a)-(1-1/(b*x+a)^2)^(1/2))/b^3-2* 
I*a^2*polylog(2,-I/(b*x+a)-(1-1/(b*x+a)^2)^(1/2))/b^3+1/3*I*polylog(2,I/(b 
*x+a)+(1-1/(b*x+a)^2)^(1/2))/b^3+2*I*a^2*polylog(2,I/(b*x+a)+(1-1/(b*x+a)^ 
2)^(1/2))/b^3
 

Mathematica [A] (warning: unable to verify)

Time = 2.94 (sec) , antiderivative size = 314, normalized size of antiderivative = 1.15 \[ \int x^2 \csc ^{-1}(a+b x)^2 \, dx=-\frac {-2 \left (2-12 a \csc ^{-1}(a+b x)+\left (1+6 a^2\right ) \csc ^{-1}(a+b x)^2\right ) \cot \left (\frac {1}{2} \csc ^{-1}(a+b x)\right )+2 \csc ^{-1}(a+b x) \left (-1+3 a \csc ^{-1}(a+b x)\right ) \csc ^2\left (\frac {1}{2} \csc ^{-1}(a+b x)\right )-\frac {\csc ^{-1}(a+b x)^2 \csc ^4\left (\frac {1}{2} \csc ^{-1}(a+b x)\right )}{2 (a+b x)}-48 a \log \left (\frac {1}{a+b x}\right )+8 \left (1+6 a^2\right ) \left (\csc ^{-1}(a+b x) \left (\log \left (1-e^{i \csc ^{-1}(a+b x)}\right )-\log \left (1+e^{i \csc ^{-1}(a+b x)}\right )\right )+i \left (\operatorname {PolyLog}\left (2,-e^{i \csc ^{-1}(a+b x)}\right )-\operatorname {PolyLog}\left (2,e^{i \csc ^{-1}(a+b x)}\right )\right )\right )+2 \csc ^{-1}(a+b x) \left (1+3 a \csc ^{-1}(a+b x)\right ) \sec ^2\left (\frac {1}{2} \csc ^{-1}(a+b x)\right )-8 (a+b x)^3 \csc ^{-1}(a+b x)^2 \sin ^4\left (\frac {1}{2} \csc ^{-1}(a+b x)\right )-2 \left (2+12 a \csc ^{-1}(a+b x)+\left (1+6 a^2\right ) \csc ^{-1}(a+b x)^2\right ) \tan \left (\frac {1}{2} \csc ^{-1}(a+b x)\right )}{24 b^3} \] Input:

Integrate[x^2*ArcCsc[a + b*x]^2,x]
 

Output:

-1/24*(-2*(2 - 12*a*ArcCsc[a + b*x] + (1 + 6*a^2)*ArcCsc[a + b*x]^2)*Cot[A 
rcCsc[a + b*x]/2] + 2*ArcCsc[a + b*x]*(-1 + 3*a*ArcCsc[a + b*x])*Csc[ArcCs 
c[a + b*x]/2]^2 - (ArcCsc[a + b*x]^2*Csc[ArcCsc[a + b*x]/2]^4)/(2*(a + b*x 
)) - 48*a*Log[(a + b*x)^(-1)] + 8*(1 + 6*a^2)*(ArcCsc[a + b*x]*(Log[1 - E^ 
(I*ArcCsc[a + b*x])] - Log[1 + E^(I*ArcCsc[a + b*x])]) + I*(PolyLog[2, -E^ 
(I*ArcCsc[a + b*x])] - PolyLog[2, E^(I*ArcCsc[a + b*x])])) + 2*ArcCsc[a + 
b*x]*(1 + 3*a*ArcCsc[a + b*x])*Sec[ArcCsc[a + b*x]/2]^2 - 8*(a + b*x)^3*Ar 
cCsc[a + b*x]^2*Sin[ArcCsc[a + b*x]/2]^4 - 2*(2 + 12*a*ArcCsc[a + b*x] + ( 
1 + 6*a^2)*ArcCsc[a + b*x]^2)*Tan[ArcCsc[a + b*x]/2])/b^3
 

Rubi [A] (verified)

Time = 0.60 (sec) , antiderivative size = 255, normalized size of antiderivative = 0.94, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.417, Rules used = {5782, 4927, 3042, 4678, 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 x^2 \csc ^{-1}(a+b x)^2 \, dx\)

\(\Big \downarrow \) 5782

\(\displaystyle -\frac {\int b^2 x^2 (a+b x)^2 \sqrt {1-\frac {1}{(a+b x)^2}} \csc ^{-1}(a+b x)^2d\csc ^{-1}(a+b x)}{b^3}\)

\(\Big \downarrow \) 4927

\(\displaystyle -\frac {-\frac {2}{3} \int -b^3 x^3 \csc ^{-1}(a+b x)d\csc ^{-1}(a+b x)-\frac {1}{3} b^3 x^3 \csc ^{-1}(a+b x)^2}{b^3}\)

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4678

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

\(\Big \downarrow \) 2009

\(\displaystyle -\frac {-\frac {1}{3} b^3 x^3 \csc ^{-1}(a+b x)^2-\frac {2}{3} \left (\frac {1}{2} a^3 \csc ^{-1}(a+b x)^2+6 a^2 \csc ^{-1}(a+b x) \text {arctanh}\left (e^{i \csc ^{-1}(a+b x)}\right )-3 i a^2 \operatorname {PolyLog}\left (2,-e^{i \csc ^{-1}(a+b x)}\right )+3 i a^2 \operatorname {PolyLog}\left (2,e^{i \csc ^{-1}(a+b x)}\right )+\csc ^{-1}(a+b x) \text {arctanh}\left (e^{i \csc ^{-1}(a+b x)}\right )-\frac {1}{2} i \operatorname {PolyLog}\left (2,-e^{i \csc ^{-1}(a+b x)}\right )+\frac {1}{2} i \operatorname {PolyLog}\left (2,e^{i \csc ^{-1}(a+b x)}\right )+\frac {1}{2} (a+b x)+3 a \log \left (\frac {1}{a+b x}\right )-3 a (a+b x) \sqrt {1-\frac {1}{(a+b x)^2}} \csc ^{-1}(a+b x)+\frac {1}{2} (a+b x)^2 \sqrt {1-\frac {1}{(a+b x)^2}} \csc ^{-1}(a+b x)\right )}{b^3}\)

Input:

Int[x^2*ArcCsc[a + b*x]^2,x]
 

Output:

-((-1/3*(b^3*x^3*ArcCsc[a + b*x]^2) - (2*((a + b*x)/2 - 3*a*(a + b*x)*Sqrt 
[1 - (a + b*x)^(-2)]*ArcCsc[a + b*x] + ((a + b*x)^2*Sqrt[1 - (a + b*x)^(-2 
)]*ArcCsc[a + b*x])/2 + (a^3*ArcCsc[a + b*x]^2)/2 + ArcCsc[a + b*x]*ArcTan 
h[E^(I*ArcCsc[a + b*x])] + 6*a^2*ArcCsc[a + b*x]*ArcTanh[E^(I*ArcCsc[a + b 
*x])] + 3*a*Log[(a + b*x)^(-1)] - (I/2)*PolyLog[2, -E^(I*ArcCsc[a + b*x])] 
 - (3*I)*a^2*PolyLog[2, -E^(I*ArcCsc[a + b*x])] + (I/2)*PolyLog[2, E^(I*Ar 
cCsc[a + b*x])] + (3*I)*a^2*PolyLog[2, E^(I*ArcCsc[a + b*x])]))/3)/b^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 4678
Int[(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(n_.)*((c_.) + (d_.)*(x_))^(m_.) 
, x_Symbol] :> Int[ExpandIntegrand[(c + d*x)^m, (a + b*Csc[e + f*x])^n, x], 
 x] /; FreeQ[{a, b, c, d, e, f, m}, x] && IGtQ[m, 0] && IGtQ[n, 0]
 

rule 4927
Int[Cot[(c_.) + (d_.)*(x_)]*Csc[(c_.) + (d_.)*(x_)]*(Csc[(c_.) + (d_.)*(x_) 
]*(b_.) + (a_))^(n_.)*((e_.) + (f_.)*(x_))^(m_.), x_Symbol] :> Simp[(-(e + 
f*x)^m)*((a + b*Csc[c + d*x])^(n + 1)/(b*d*(n + 1))), x] + Simp[f*(m/(b*d*( 
n + 1)))   Int[(e + f*x)^(m - 1)*(a + b*Csc[c + d*x])^(n + 1), x], x] /; Fr 
eeQ[{a, b, c, d, e, f, n}, x] && IGtQ[m, 0] && NeQ[n, -1]
 

rule 5782
Int[((a_.) + ArcCsc[(c_) + (d_.)*(x_)]*(b_.))^(p_.)*((e_.) + (f_.)*(x_))^(m 
_.), x_Symbol] :> Simp[-(d^(m + 1))^(-1)   Subst[Int[(a + b*x)^p*Csc[x]*Cot 
[x]*(d*e - c*f + f*Csc[x])^m, x], x, ArcCsc[c + d*x]], x] /; FreeQ[{a, b, c 
, d, e, f}, x] && IGtQ[p, 0] && IntegerQ[m]
 
Maple [A] (verified)

Time = 1.03 (sec) , antiderivative size = 500, normalized size of antiderivative = 1.84

method result size
derivativedivides \(\frac {\operatorname {arccsc}\left (b x +a \right )^{2} a^{2} \left (b x +a \right )-\operatorname {arccsc}\left (b x +a \right )^{2} a \left (b x +a \right )^{2}+\frac {\operatorname {arccsc}\left (b x +a \right )^{2} \left (b x +a \right )^{3}}{3}-2 \,\operatorname {arccsc}\left (b x +a \right ) \sqrt {\frac {\left (b x +a \right )^{2}-1}{\left (b x +a \right )^{2}}}\, a \left (b x +a \right )+\frac {\operatorname {arccsc}\left (b x +a \right ) \sqrt {\frac {\left (b x +a \right )^{2}-1}{\left (b x +a \right )^{2}}}\, \left (b x +a \right )^{2}}{3}-2 i \operatorname {polylog}\left (2, -\frac {i}{b x +a}-\sqrt {1-\frac {1}{\left (b x +a \right )^{2}}}\right ) a^{2}+\frac {b x}{3}+\frac {a}{3}+\frac {\operatorname {arccsc}\left (b x +a \right ) \ln \left (1+\frac {i}{b x +a}+\sqrt {1-\frac {1}{\left (b x +a \right )^{2}}}\right )}{3}+\frac {i \operatorname {polylog}\left (2, \frac {i}{b x +a}+\sqrt {1-\frac {1}{\left (b x +a \right )^{2}}}\right )}{3}-\frac {\operatorname {arccsc}\left (b x +a \right ) \ln \left (1-\frac {i}{b x +a}-\sqrt {1-\frac {1}{\left (b x +a \right )^{2}}}\right )}{3}+2 i \operatorname {polylog}\left (2, \frac {i}{b x +a}+\sqrt {1-\frac {1}{\left (b x +a \right )^{2}}}\right ) a^{2}+2 \ln \left (1+\frac {i}{b x +a}+\sqrt {1-\frac {1}{\left (b x +a \right )^{2}}}\right ) a -4 \ln \left (\frac {i}{b x +a}+\sqrt {1-\frac {1}{\left (b x +a \right )^{2}}}\right ) a +2 \ln \left (\frac {i}{b x +a}+\sqrt {1-\frac {1}{\left (b x +a \right )^{2}}}-1\right ) a +2 \ln \left (1+\frac {i}{b x +a}+\sqrt {1-\frac {1}{\left (b x +a \right )^{2}}}\right ) a^{2} \operatorname {arccsc}\left (b x +a \right )-2 \ln \left (1-\frac {i}{b x +a}-\sqrt {1-\frac {1}{\left (b x +a \right )^{2}}}\right ) a^{2} \operatorname {arccsc}\left (b x +a \right )+2 i a \,\operatorname {arccsc}\left (b x +a \right )-\frac {i \operatorname {polylog}\left (2, -\frac {i}{b x +a}-\sqrt {1-\frac {1}{\left (b x +a \right )^{2}}}\right )}{3}}{b^{3}}\) \(500\)
default \(\frac {\operatorname {arccsc}\left (b x +a \right )^{2} a^{2} \left (b x +a \right )-\operatorname {arccsc}\left (b x +a \right )^{2} a \left (b x +a \right )^{2}+\frac {\operatorname {arccsc}\left (b x +a \right )^{2} \left (b x +a \right )^{3}}{3}-2 \,\operatorname {arccsc}\left (b x +a \right ) \sqrt {\frac {\left (b x +a \right )^{2}-1}{\left (b x +a \right )^{2}}}\, a \left (b x +a \right )+\frac {\operatorname {arccsc}\left (b x +a \right ) \sqrt {\frac {\left (b x +a \right )^{2}-1}{\left (b x +a \right )^{2}}}\, \left (b x +a \right )^{2}}{3}-2 i \operatorname {polylog}\left (2, -\frac {i}{b x +a}-\sqrt {1-\frac {1}{\left (b x +a \right )^{2}}}\right ) a^{2}+\frac {b x}{3}+\frac {a}{3}+\frac {\operatorname {arccsc}\left (b x +a \right ) \ln \left (1+\frac {i}{b x +a}+\sqrt {1-\frac {1}{\left (b x +a \right )^{2}}}\right )}{3}+\frac {i \operatorname {polylog}\left (2, \frac {i}{b x +a}+\sqrt {1-\frac {1}{\left (b x +a \right )^{2}}}\right )}{3}-\frac {\operatorname {arccsc}\left (b x +a \right ) \ln \left (1-\frac {i}{b x +a}-\sqrt {1-\frac {1}{\left (b x +a \right )^{2}}}\right )}{3}+2 i \operatorname {polylog}\left (2, \frac {i}{b x +a}+\sqrt {1-\frac {1}{\left (b x +a \right )^{2}}}\right ) a^{2}+2 \ln \left (1+\frac {i}{b x +a}+\sqrt {1-\frac {1}{\left (b x +a \right )^{2}}}\right ) a -4 \ln \left (\frac {i}{b x +a}+\sqrt {1-\frac {1}{\left (b x +a \right )^{2}}}\right ) a +2 \ln \left (\frac {i}{b x +a}+\sqrt {1-\frac {1}{\left (b x +a \right )^{2}}}-1\right ) a +2 \ln \left (1+\frac {i}{b x +a}+\sqrt {1-\frac {1}{\left (b x +a \right )^{2}}}\right ) a^{2} \operatorname {arccsc}\left (b x +a \right )-2 \ln \left (1-\frac {i}{b x +a}-\sqrt {1-\frac {1}{\left (b x +a \right )^{2}}}\right ) a^{2} \operatorname {arccsc}\left (b x +a \right )+2 i a \,\operatorname {arccsc}\left (b x +a \right )-\frac {i \operatorname {polylog}\left (2, -\frac {i}{b x +a}-\sqrt {1-\frac {1}{\left (b x +a \right )^{2}}}\right )}{3}}{b^{3}}\) \(500\)

Input:

int(arccsc(b*x+a)^2*x^2,x,method=_RETURNVERBOSE)
 

Output:

1/b^3*(arccsc(b*x+a)^2*a^2*(b*x+a)-arccsc(b*x+a)^2*a*(b*x+a)^2+1/3*arccsc( 
b*x+a)^2*(b*x+a)^3-2*arccsc(b*x+a)*(((b*x+a)^2-1)/(b*x+a)^2)^(1/2)*a*(b*x+ 
a)+1/3*arccsc(b*x+a)*(((b*x+a)^2-1)/(b*x+a)^2)^(1/2)*(b*x+a)^2-2*I*polylog 
(2,-I/(b*x+a)-(1-1/(b*x+a)^2)^(1/2))*a^2+1/3*b*x+1/3*a+1/3*arccsc(b*x+a)*l 
n(1+I/(b*x+a)+(1-1/(b*x+a)^2)^(1/2))+1/3*I*polylog(2,I/(b*x+a)+(1-1/(b*x+a 
)^2)^(1/2))-1/3*arccsc(b*x+a)*ln(1-I/(b*x+a)-(1-1/(b*x+a)^2)^(1/2))+2*I*po 
lylog(2,I/(b*x+a)+(1-1/(b*x+a)^2)^(1/2))*a^2+2*ln(1+I/(b*x+a)+(1-1/(b*x+a) 
^2)^(1/2))*a-4*ln(I/(b*x+a)+(1-1/(b*x+a)^2)^(1/2))*a+2*ln(I/(b*x+a)+(1-1/( 
b*x+a)^2)^(1/2)-1)*a+2*ln(1+I/(b*x+a)+(1-1/(b*x+a)^2)^(1/2))*a^2*arccsc(b* 
x+a)-2*ln(1-I/(b*x+a)-(1-1/(b*x+a)^2)^(1/2))*a^2*arccsc(b*x+a)+2*I*a*arccs 
c(b*x+a)-1/3*I*polylog(2,-I/(b*x+a)-(1-1/(b*x+a)^2)^(1/2)))
 

Fricas [F]

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

integrate(x^2*arccsc(b*x+a)^2,x, algorithm="fricas")
 

Output:

integral(x^2*arccsc(b*x + a)^2, x)
 

Sympy [F]

\[ \int x^2 \csc ^{-1}(a+b x)^2 \, dx=\int x^{2} \operatorname {acsc}^{2}{\left (a + b x \right )}\, dx \] Input:

integrate(x**2*acsc(b*x+a)**2,x)
 

Output:

Integral(x**2*acsc(a + b*x)**2, x)
 

Maxima [F]

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

integrate(x^2*arccsc(b*x+a)^2,x, algorithm="maxima")
 

Output:

1/3*x^3*arctan2(1, sqrt(b*x + a + 1)*sqrt(b*x + a - 1))^2 - 1/12*x^3*log(b 
^2*x^2 + 2*a*b*x + a^2)^2 + integrate(1/3*(2*sqrt(b*x + a + 1)*sqrt(b*x + 
a - 1)*b*x^3*arctan2(1, sqrt(b*x + a + 1)*sqrt(b*x + a - 1)) - 3*(b^3*x^5 
+ 3*a*b^2*x^4 + (3*a^2 - 1)*b*x^3 + (a^3 - a)*x^2)*log(b*x + a)^2 + (b^3*x 
^5 + 2*a*b^2*x^4 + (a^2 - 1)*b*x^3 + 3*(b^3*x^5 + 3*a*b^2*x^4 + (3*a^2 - 1 
)*b*x^3 + (a^3 - a)*x^2)*log(b*x + a))*log(b^2*x^2 + 2*a*b*x + a^2))/(b^3* 
x^3 + 3*a*b^2*x^2 + a^3 + (3*a^2 - 1)*b*x - a), x)
 

Giac [F]

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

integrate(x^2*arccsc(b*x+a)^2,x, algorithm="giac")
 

Output:

integrate(x^2*arccsc(b*x + a)^2, x)
 

Mupad [F(-1)]

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

int(x^2*asin(1/(a + b*x))^2,x)
 

Output:

int(x^2*asin(1/(a + b*x))^2, x)
 

Reduce [F]

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

int(x^2*acsc(b*x+a)^2,x)
 

Output:

int(acsc(a + b*x)**2*x**2,x)