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

3.1.19.1 Optimal result
3.1.19.2 Mathematica [A] (verified)
3.1.19.3 Rubi [A] (verified)
3.1.19.4 Maple [A] (verified)
3.1.19.5 Fricas [A] (verification not implemented)
3.1.19.6 Sympy [F]
3.1.19.7 Maxima [F]
3.1.19.8 Giac [B] (verification not implemented)
3.1.19.9 Mupad [F(-1)]

3.1.19.1 Optimal result

Integrand size = 10, antiderivative size = 116 \[ \int x^2 \csc ^{-1}(a+b x) \, dx=-\frac {5 a (a+b x) \sqrt {1-\frac {1}{(a+b x)^2}}}{6 b^3}+\frac {x (a+b x) \sqrt {1-\frac {1}{(a+b x)^2}}}{6 b^2}+\frac {a^3 \csc ^{-1}(a+b x)}{3 b^3}+\frac {1}{3} x^3 \csc ^{-1}(a+b x)+\frac {\left (1+6 a^2\right ) \text {arctanh}\left (\sqrt {1-\frac {1}{(a+b x)^2}}\right )}{6 b^3} \]

output
1/3*a^3*arccsc(b*x+a)/b^3+1/3*x^3*arccsc(b*x+a)+1/6*(6*a^2+1)*arctanh((1-1 
/(b*x+a)^2)^(1/2))/b^3-5/6*a*(b*x+a)*(1-1/(b*x+a)^2)^(1/2)/b^3+1/6*x*(b*x+ 
a)*(1-1/(b*x+a)^2)^(1/2)/b^2
 
3.1.19.2 Mathematica [A] (verified)

Time = 0.14 (sec) , antiderivative size = 129, normalized size of antiderivative = 1.11 \[ \int x^2 \csc ^{-1}(a+b x) \, dx=\frac {\left (-5 a^2-4 a b x+b^2 x^2\right ) \sqrt {\frac {-1+a^2+2 a b x+b^2 x^2}{(a+b x)^2}}+2 b^3 x^3 \csc ^{-1}(a+b x)+2 a^3 \arcsin \left (\frac {1}{a+b x}\right )+\left (1+6 a^2\right ) \log \left ((a+b x) \left (1+\sqrt {\frac {-1+a^2+2 a b x+b^2 x^2}{(a+b x)^2}}\right )\right )}{6 b^3} \]

input
Integrate[x^2*ArcCsc[a + b*x],x]
 
output
((-5*a^2 - 4*a*b*x + b^2*x^2)*Sqrt[(-1 + a^2 + 2*a*b*x + b^2*x^2)/(a + b*x 
)^2] + 2*b^3*x^3*ArcCsc[a + b*x] + 2*a^3*ArcSin[(a + b*x)^(-1)] + (1 + 6*a 
^2)*Log[(a + b*x)*(1 + Sqrt[(-1 + a^2 + 2*a*b*x + b^2*x^2)/(a + b*x)^2])]) 
/(6*b^3)
 
3.1.19.3 Rubi [A] (verified)

Time = 0.38 (sec) , antiderivative size = 117, normalized size of antiderivative = 1.01, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {5782, 4927, 3042, 4269, 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) \, 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)d\csc ^{-1}(a+b x)}{b^3}\)

\(\Big \downarrow \) 4927

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

\(\Big \downarrow \) 3042

\(\displaystyle -\frac {-\frac {1}{3} \int \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)}{b^3}\)

\(\Big \downarrow \) 4269

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

\(\Big \downarrow \) 2009

\(\displaystyle -\frac {\frac {1}{3} \left (\frac {1}{2} \left (-2 a^3 \csc ^{-1}(a+b x)-\left (6 a^2+1\right ) \text {arctanh}\left (\sqrt {1-\frac {1}{(a+b x)^2}}\right )+5 a (a+b x) \sqrt {1-\frac {1}{(a+b x)^2}}\right )-\frac {1}{2} b x (a+b x) \sqrt {1-\frac {1}{(a+b x)^2}}\right )-\frac {1}{3} b^3 x^3 \csc ^{-1}(a+b x)}{b^3}\)

input
Int[x^2*ArcCsc[a + b*x],x]
 
output
-((-1/3*(b^3*x^3*ArcCsc[a + b*x]) + (-1/2*(b*x*(a + b*x)*Sqrt[1 - (a + b*x 
)^(-2)]) + (5*a*(a + b*x)*Sqrt[1 - (a + b*x)^(-2)] - 2*a^3*ArcCsc[a + b*x] 
 - (1 + 6*a^2)*ArcTanh[Sqrt[1 - (a + b*x)^(-2)]])/2)/3)/b^3)
 

3.1.19.3.1 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 4269
Int[(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^(n_), x_Symbol] :> Simp[(-b^2)*C 
ot[c + d*x]*((a + b*Csc[c + d*x])^(n - 2)/(d*(n - 1))), x] + Simp[1/(n - 1) 
   Int[(a + b*Csc[c + d*x])^(n - 3)*Simp[a^3*(n - 1) + (b*(b^2*(n - 2) + 3* 
a^2*(n - 1)))*Csc[c + d*x] + (a*b^2*(3*n - 4))*Csc[c + d*x]^2, x], x], x] / 
; FreeQ[{a, b, c, d}, x] && NeQ[a^2 - b^2, 0] && GtQ[n, 2] && IntegerQ[2*n]
 

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]
 
3.1.19.4 Maple [A] (verified)

Time = 0.31 (sec) , antiderivative size = 193, normalized size of antiderivative = 1.66

method result size
derivativedivides \(\frac {-\frac {\operatorname {arccsc}\left (b x +a \right ) a^{3}}{3}+\operatorname {arccsc}\left (b x +a \right ) a^{2} \left (b x +a \right )-\operatorname {arccsc}\left (b x +a \right ) a \left (b x +a \right )^{2}+\frac {\operatorname {arccsc}\left (b x +a \right ) \left (b x +a \right )^{3}}{3}-\frac {\sqrt {\left (b x +a \right )^{2}-1}\, \left (-2 a^{3} \arctan \left (\frac {1}{\sqrt {\left (b x +a \right )^{2}-1}}\right )-6 a^{2} \ln \left (b x +a +\sqrt {\left (b x +a \right )^{2}-1}\right )+6 a \sqrt {\left (b x +a \right )^{2}-1}-\left (b x +a \right ) \sqrt {\left (b x +a \right )^{2}-1}-\ln \left (b x +a +\sqrt {\left (b x +a \right )^{2}-1}\right )\right )}{6 \sqrt {\frac {\left (b x +a \right )^{2}-1}{\left (b x +a \right )^{2}}}\, \left (b x +a \right )}}{b^{3}}\) \(193\)
default \(\frac {-\frac {\operatorname {arccsc}\left (b x +a \right ) a^{3}}{3}+\operatorname {arccsc}\left (b x +a \right ) a^{2} \left (b x +a \right )-\operatorname {arccsc}\left (b x +a \right ) a \left (b x +a \right )^{2}+\frac {\operatorname {arccsc}\left (b x +a \right ) \left (b x +a \right )^{3}}{3}-\frac {\sqrt {\left (b x +a \right )^{2}-1}\, \left (-2 a^{3} \arctan \left (\frac {1}{\sqrt {\left (b x +a \right )^{2}-1}}\right )-6 a^{2} \ln \left (b x +a +\sqrt {\left (b x +a \right )^{2}-1}\right )+6 a \sqrt {\left (b x +a \right )^{2}-1}-\left (b x +a \right ) \sqrt {\left (b x +a \right )^{2}-1}-\ln \left (b x +a +\sqrt {\left (b x +a \right )^{2}-1}\right )\right )}{6 \sqrt {\frac {\left (b x +a \right )^{2}-1}{\left (b x +a \right )^{2}}}\, \left (b x +a \right )}}{b^{3}}\) \(193\)
parts \(\frac {x^{3} \operatorname {arccsc}\left (b x +a \right )}{3}-\frac {\sqrt {b^{2} x^{2}+2 a b x +a^{2}-1}\, \left (-2 a^{3} \arctan \left (\frac {1}{\sqrt {b^{2} x^{2}+2 a b x +a^{2}-1}}\right ) \sqrt {b^{2}}-x \sqrt {b^{2} x^{2}+2 a b x +a^{2}-1}\, b \sqrt {b^{2}}-6 \ln \left (\frac {b^{2} x +\sqrt {b^{2} x^{2}+2 a b x +a^{2}-1}\, \sqrt {b^{2}}+a b}{\sqrt {b^{2}}}\right ) a^{2} b +5 \sqrt {b^{2}}\, \sqrt {b^{2} x^{2}+2 a b x +a^{2}-1}\, a -\ln \left (\frac {b^{2} x +\sqrt {b^{2} x^{2}+2 a b x +a^{2}-1}\, \sqrt {b^{2}}+a b}{\sqrt {b^{2}}}\right ) b \right )}{6 b^{3} \sqrt {\frac {b^{2} x^{2}+2 a b x +a^{2}-1}{\left (b x +a \right )^{2}}}\, \left (b x +a \right ) \sqrt {b^{2}}}\) \(253\)

input
int(x^2*arccsc(b*x+a),x,method=_RETURNVERBOSE)
 
output
1/b^3*(-1/3*arccsc(b*x+a)*a^3+arccsc(b*x+a)*a^2*(b*x+a)-arccsc(b*x+a)*a*(b 
*x+a)^2+1/3*arccsc(b*x+a)*(b*x+a)^3-1/6*((b*x+a)^2-1)^(1/2)*(-2*a^3*arctan 
(1/((b*x+a)^2-1)^(1/2))-6*a^2*ln(b*x+a+((b*x+a)^2-1)^(1/2))+6*a*((b*x+a)^2 
-1)^(1/2)-(b*x+a)*((b*x+a)^2-1)^(1/2)-ln(b*x+a+((b*x+a)^2-1)^(1/2)))/(((b* 
x+a)^2-1)/(b*x+a)^2)^(1/2)/(b*x+a))
 
3.1.19.5 Fricas [A] (verification not implemented)

Time = 0.28 (sec) , antiderivative size = 117, normalized size of antiderivative = 1.01 \[ \int x^2 \csc ^{-1}(a+b x) \, dx=\frac {2 \, b^{3} x^{3} \operatorname {arccsc}\left (b x + a\right ) - 4 \, a^{3} \arctan \left (-b x - a + \sqrt {b^{2} x^{2} + 2 \, a b x + a^{2} - 1}\right ) - {\left (6 \, a^{2} + 1\right )} \log \left (-b x - a + \sqrt {b^{2} x^{2} + 2 \, a b x + a^{2} - 1}\right ) + \sqrt {b^{2} x^{2} + 2 \, a b x + a^{2} - 1} {\left (b x - 5 \, a\right )}}{6 \, b^{3}} \]

input
integrate(x^2*arccsc(b*x+a),x, algorithm="fricas")
 
output
1/6*(2*b^3*x^3*arccsc(b*x + a) - 4*a^3*arctan(-b*x - a + sqrt(b^2*x^2 + 2* 
a*b*x + a^2 - 1)) - (6*a^2 + 1)*log(-b*x - a + sqrt(b^2*x^2 + 2*a*b*x + a^ 
2 - 1)) + sqrt(b^2*x^2 + 2*a*b*x + a^2 - 1)*(b*x - 5*a))/b^3
 
3.1.19.6 Sympy [F]

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

input
integrate(x**2*acsc(b*x+a),x)
 
output
Integral(x**2*acsc(a + b*x), x)
 
3.1.19.7 Maxima [F]

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

input
integrate(x^2*arccsc(b*x+a),x, algorithm="maxima")
 
output
1/3*x^3*arctan2(1, sqrt(b*x + a + 1)*sqrt(b*x + a - 1)) + integrate(1/3*(b 
^2*x^4 + a*b*x^3)*e^(1/2*log(b*x + a + 1) + 1/2*log(b*x + a - 1))/(b^2*x^2 
 + 2*a*b*x + a^2 + (b^2*x^2 + 2*a*b*x + a^2 - 1)*e^(log(b*x + a + 1) + log 
(b*x + a - 1)) - 1), x)
 
3.1.19.8 Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 203 vs. \(2 (100) = 200\).

Time = 0.29 (sec) , antiderivative size = 203, normalized size of antiderivative = 1.75 \[ \int x^2 \csc ^{-1}(a+b x) \, dx=-\frac {1}{24} \, b {\left (\frac {8 \, {\left (b x + a\right )}^{3} {\left (\frac {3 \, a}{b x + a} - \frac {3 \, a^{2}}{{\left (b x + a\right )}^{2}} - 1\right )} \arcsin \left (-\frac {1}{{\left (b x + a\right )} {\left (\frac {a}{b x + a} - 1\right )} - a}\right )}{b^{4}} + \frac {{\left (b x + a\right )}^{2} {\left (\sqrt {-\frac {1}{{\left (b x + a\right )}^{2}} + 1} - 1\right )}^{2} + 12 \, {\left (b x + a\right )} a {\left (\sqrt {-\frac {1}{{\left (b x + a\right )}^{2}} + 1} - 1\right )} + 4 \, {\left (6 \, a^{2} + 1\right )} \log \left (-{\left (\sqrt {-\frac {1}{{\left (b x + a\right )}^{2}} + 1} - 1\right )} {\left | b x + a \right |}\right ) - \frac {12 \, {\left (b x + a\right )} a {\left (\sqrt {-\frac {1}{{\left (b x + a\right )}^{2}} + 1} - 1\right )} + 1}{{\left (b x + a\right )}^{2} {\left (\sqrt {-\frac {1}{{\left (b x + a\right )}^{2}} + 1} - 1\right )}^{2}}}{b^{4}}\right )} \]

input
integrate(x^2*arccsc(b*x+a),x, algorithm="giac")
 
output
-1/24*b*(8*(b*x + a)^3*(3*a/(b*x + a) - 3*a^2/(b*x + a)^2 - 1)*arcsin(-1/( 
(b*x + a)*(a/(b*x + a) - 1) - a))/b^4 + ((b*x + a)^2*(sqrt(-1/(b*x + a)^2 
+ 1) - 1)^2 + 12*(b*x + a)*a*(sqrt(-1/(b*x + a)^2 + 1) - 1) + 4*(6*a^2 + 1 
)*log(-(sqrt(-1/(b*x + a)^2 + 1) - 1)*abs(b*x + a)) - (12*(b*x + a)*a*(sqr 
t(-1/(b*x + a)^2 + 1) - 1) + 1)/((b*x + a)^2*(sqrt(-1/(b*x + a)^2 + 1) - 1 
)^2))/b^4)
 
3.1.19.9 Mupad [F(-1)]

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

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