Optimal. Leaf size=123 \[ -\frac {b (a+b x) \sqrt {1-\frac {1}{(a+b x)^2}}}{2 a \left (1-a^2\right ) x}+\frac {b^2 \csc ^{-1}(a+b x)}{2 a^2}-\frac {\csc ^{-1}(a+b x)}{2 x^2}+\frac {\left (1-2 a^2\right ) b^2 \text {ArcTan}\left (\frac {a-\tan \left (\frac {1}{2} \csc ^{-1}(a+b x)\right )}{\sqrt {1-a^2}}\right )}{a^2 \left (1-a^2\right )^{3/2}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.15, antiderivative size = 123, normalized size of antiderivative = 1.00, number of steps
used = 8, number of rules used = 8, integrand size = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.800, Rules used = {5367, 4512,
3870, 4004, 3916, 2739, 632, 210} \begin {gather*} \frac {\left (1-2 a^2\right ) b^2 \text {ArcTan}\left (\frac {a-\tan \left (\frac {1}{2} \csc ^{-1}(a+b x)\right )}{\sqrt {1-a^2}}\right )}{a^2 \left (1-a^2\right )^{3/2}}+\frac {b^2 \csc ^{-1}(a+b x)}{2 a^2}-\frac {b (a+b x) \sqrt {1-\frac {1}{(a+b x)^2}}}{2 a \left (1-a^2\right ) x}-\frac {\csc ^{-1}(a+b x)}{2 x^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 210
Rule 632
Rule 2739
Rule 3870
Rule 3916
Rule 4004
Rule 4512
Rule 5367
Rubi steps
\begin {align*} \int \frac {\csc ^{-1}(a+b x)}{x^3} \, dx &=-\left (b^2 \text {Subst}\left (\int \frac {x \cot (x) \csc (x)}{(-a+\csc (x))^3} \, dx,x,\csc ^{-1}(a+b x)\right )\right )\\ &=-\frac {\csc ^{-1}(a+b x)}{2 x^2}+\frac {1}{2} b^2 \text {Subst}\left (\int \frac {1}{(-a+\csc (x))^2} \, dx,x,\csc ^{-1}(a+b x)\right )\\ &=-\frac {b (a+b x) \sqrt {1-\frac {1}{(a+b x)^2}}}{2 a \left (1-a^2\right ) x}-\frac {\csc ^{-1}(a+b x)}{2 x^2}-\frac {b^2 \text {Subst}\left (\int \frac {1-a^2-a \csc (x)}{-a+\csc (x)} \, dx,x,\csc ^{-1}(a+b x)\right )}{2 a \left (1-a^2\right )}\\ &=-\frac {b (a+b x) \sqrt {1-\frac {1}{(a+b x)^2}}}{2 a \left (1-a^2\right ) x}+\frac {b^2 \csc ^{-1}(a+b x)}{2 a^2}-\frac {\csc ^{-1}(a+b x)}{2 x^2}-\frac {\left (\left (1-2 a^2\right ) b^2\right ) \text {Subst}\left (\int \frac {\csc (x)}{-a+\csc (x)} \, dx,x,\csc ^{-1}(a+b x)\right )}{2 a^2 \left (1-a^2\right )}\\ &=-\frac {b (a+b x) \sqrt {1-\frac {1}{(a+b x)^2}}}{2 a \left (1-a^2\right ) x}+\frac {b^2 \csc ^{-1}(a+b x)}{2 a^2}-\frac {\csc ^{-1}(a+b x)}{2 x^2}-\frac {\left (\left (1-2 a^2\right ) b^2\right ) \text {Subst}\left (\int \frac {1}{1-a \sin (x)} \, dx,x,\csc ^{-1}(a+b x)\right )}{2 a^2 \left (1-a^2\right )}\\ &=-\frac {b (a+b x) \sqrt {1-\frac {1}{(a+b x)^2}}}{2 a \left (1-a^2\right ) x}+\frac {b^2 \csc ^{-1}(a+b x)}{2 a^2}-\frac {\csc ^{-1}(a+b x)}{2 x^2}-\frac {\left (\left (1-2 a^2\right ) b^2\right ) \text {Subst}\left (\int \frac {1}{1-2 a x+x^2} \, dx,x,\tan \left (\frac {1}{2} \csc ^{-1}(a+b x)\right )\right )}{a^2 \left (1-a^2\right )}\\ &=-\frac {b (a+b x) \sqrt {1-\frac {1}{(a+b x)^2}}}{2 a \left (1-a^2\right ) x}+\frac {b^2 \csc ^{-1}(a+b x)}{2 a^2}-\frac {\csc ^{-1}(a+b x)}{2 x^2}+\frac {\left (2 \left (1-2 a^2\right ) b^2\right ) \text {Subst}\left (\int \frac {1}{-4 \left (1-a^2\right )-x^2} \, dx,x,-2 a+2 \tan \left (\frac {1}{2} \csc ^{-1}(a+b x)\right )\right )}{a^2 \left (1-a^2\right )}\\ &=-\frac {b (a+b x) \sqrt {1-\frac {1}{(a+b x)^2}}}{2 a \left (1-a^2\right ) x}+\frac {b^2 \csc ^{-1}(a+b x)}{2 a^2}-\frac {\csc ^{-1}(a+b x)}{2 x^2}+\frac {\left (1-2 a^2\right ) b^2 \tan ^{-1}\left (\frac {a-\tan \left (\frac {1}{2} \csc ^{-1}(a+b x)\right )}{\sqrt {1-a^2}}\right )}{a^2 \left (1-a^2\right )^{3/2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 0.57, size = 199, normalized size = 1.62 \begin {gather*} \frac {\frac {b x (a+b x) \sqrt {\frac {-1+a^2+2 a b x+b^2 x^2}{(a+b x)^2}}}{a \left (-1+a^2\right )}-\csc ^{-1}(a+b x)+\frac {b^2 x^2 \text {ArcSin}\left (\frac {1}{a+b x}\right )}{a^2}+\frac {i \left (-1+2 a^2\right ) b^2 x^2 \log \left (\frac {4 (-1+a) a^2 (1+a) \left (\frac {i \left (-1+a^2+a b x\right )}{\sqrt {1-a^2}}+(a+b x) \sqrt {\frac {-1+a^2+2 a b x+b^2 x^2}{(a+b x)^2}}\right )}{\left (-1+2 a^2\right ) b^2 x}\right )}{a^2 \left (1-a^2\right )^{3/2}}}{2 x^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(455\) vs.
\(2(109)=218\).
time = 0.64, size = 456, normalized size = 3.71
method | result | size |
derivativedivides | \(b^{2} \left (-\frac {\mathrm {arccsc}\left (b x +a \right )}{2 b^{2} x^{2}}+\frac {\sqrt {\left (b x +a \right )^{2}-1}\, \left (-\arctan \left (\frac {1}{\sqrt {\left (b x +a \right )^{2}-1}}\right ) \left (a^{2}-1\right )^{\frac {3}{2}} a^{3}+\arctan \left (\frac {1}{\sqrt {\left (b x +a \right )^{2}-1}}\right ) \left (a^{2}-1\right )^{\frac {3}{2}} a^{2} \left (b x +a \right )+2 \ln \left (\frac {2 \sqrt {a^{2}-1}\, \sqrt {\left (b x +a \right )^{2}-1}+2 a \left (b x +a \right )-2}{b x}\right ) a^{5}-2 \ln \left (\frac {2 \sqrt {a^{2}-1}\, \sqrt {\left (b x +a \right )^{2}-1}+2 a \left (b x +a \right )-2}{b x}\right ) a^{4} \left (b x +a \right )+\sqrt {\left (b x +a \right )^{2}-1}\, \left (a^{2}-1\right )^{\frac {3}{2}} a +\arctan \left (\frac {1}{\sqrt {\left (b x +a \right )^{2}-1}}\right ) \left (a^{2}-1\right )^{\frac {3}{2}} a -\arctan \left (\frac {1}{\sqrt {\left (b x +a \right )^{2}-1}}\right ) \left (a^{2}-1\right )^{\frac {3}{2}} \left (b x +a \right )-3 \ln \left (\frac {2 \sqrt {a^{2}-1}\, \sqrt {\left (b x +a \right )^{2}-1}+2 a \left (b x +a \right )-2}{b x}\right ) a^{3}+3 \ln \left (\frac {2 \sqrt {a^{2}-1}\, \sqrt {\left (b x +a \right )^{2}-1}+2 a \left (b x +a \right )-2}{b x}\right ) a^{2} \left (b x +a \right )+a \ln \left (\frac {2 \sqrt {a^{2}-1}\, \sqrt {\left (b x +a \right )^{2}-1}+2 a \left (b x +a \right )-2}{b x}\right )-\ln \left (\frac {2 \sqrt {a^{2}-1}\, \sqrt {\left (b x +a \right )^{2}-1}+2 a \left (b x +a \right )-2}{b x}\right ) \left (b x +a \right )\right )}{2 \sqrt {\frac {\left (b x +a \right )^{2}-1}{\left (b x +a \right )^{2}}}\, \left (b x +a \right ) a^{2} \left (a^{2}-1\right )^{\frac {5}{2}} b x}\right )\) | \(456\) |
default | \(b^{2} \left (-\frac {\mathrm {arccsc}\left (b x +a \right )}{2 b^{2} x^{2}}+\frac {\sqrt {\left (b x +a \right )^{2}-1}\, \left (-\arctan \left (\frac {1}{\sqrt {\left (b x +a \right )^{2}-1}}\right ) \left (a^{2}-1\right )^{\frac {3}{2}} a^{3}+\arctan \left (\frac {1}{\sqrt {\left (b x +a \right )^{2}-1}}\right ) \left (a^{2}-1\right )^{\frac {3}{2}} a^{2} \left (b x +a \right )+2 \ln \left (\frac {2 \sqrt {a^{2}-1}\, \sqrt {\left (b x +a \right )^{2}-1}+2 a \left (b x +a \right )-2}{b x}\right ) a^{5}-2 \ln \left (\frac {2 \sqrt {a^{2}-1}\, \sqrt {\left (b x +a \right )^{2}-1}+2 a \left (b x +a \right )-2}{b x}\right ) a^{4} \left (b x +a \right )+\sqrt {\left (b x +a \right )^{2}-1}\, \left (a^{2}-1\right )^{\frac {3}{2}} a +\arctan \left (\frac {1}{\sqrt {\left (b x +a \right )^{2}-1}}\right ) \left (a^{2}-1\right )^{\frac {3}{2}} a -\arctan \left (\frac {1}{\sqrt {\left (b x +a \right )^{2}-1}}\right ) \left (a^{2}-1\right )^{\frac {3}{2}} \left (b x +a \right )-3 \ln \left (\frac {2 \sqrt {a^{2}-1}\, \sqrt {\left (b x +a \right )^{2}-1}+2 a \left (b x +a \right )-2}{b x}\right ) a^{3}+3 \ln \left (\frac {2 \sqrt {a^{2}-1}\, \sqrt {\left (b x +a \right )^{2}-1}+2 a \left (b x +a \right )-2}{b x}\right ) a^{2} \left (b x +a \right )+a \ln \left (\frac {2 \sqrt {a^{2}-1}\, \sqrt {\left (b x +a \right )^{2}-1}+2 a \left (b x +a \right )-2}{b x}\right )-\ln \left (\frac {2 \sqrt {a^{2}-1}\, \sqrt {\left (b x +a \right )^{2}-1}+2 a \left (b x +a \right )-2}{b x}\right ) \left (b x +a \right )\right )}{2 \sqrt {\frac {\left (b x +a \right )^{2}-1}{\left (b x +a \right )^{2}}}\, \left (b x +a \right ) a^{2} \left (a^{2}-1\right )^{\frac {5}{2}} b x}\right )\) | \(456\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.42, size = 428, normalized size = 3.48 \begin {gather*} \left [\frac {{\left (2 \, a^{2} - 1\right )} \sqrt {a^{2} - 1} b^{2} x^{2} \log \left (\frac {a^{2} b x + a^{3} + \sqrt {b^{2} x^{2} + 2 \, a b x + a^{2} - 1} {\left (a^{2} - \sqrt {a^{2} - 1} a - 1\right )} - {\left (a b x + a^{2} - 1\right )} \sqrt {a^{2} - 1} - a}{x}\right ) - 2 \, {\left (a^{4} - 2 \, a^{2} + 1\right )} b^{2} x^{2} \arctan \left (-b x - a + \sqrt {b^{2} x^{2} + 2 \, a b x + a^{2} - 1}\right ) + {\left (a^{3} - a\right )} b^{2} x^{2} + \sqrt {b^{2} x^{2} + 2 \, a b x + a^{2} - 1} {\left (a^{3} - a\right )} b x - {\left (a^{6} - 2 \, a^{4} + a^{2}\right )} \operatorname {arccsc}\left (b x + a\right )}{2 \, {\left (a^{6} - 2 \, a^{4} + a^{2}\right )} x^{2}}, \frac {2 \, {\left (2 \, a^{2} - 1\right )} \sqrt {-a^{2} + 1} b^{2} x^{2} \arctan \left (-\frac {\sqrt {-a^{2} + 1} b x - \sqrt {b^{2} x^{2} + 2 \, a b x + a^{2} - 1} \sqrt {-a^{2} + 1}}{a^{2} - 1}\right ) - 2 \, {\left (a^{4} - 2 \, a^{2} + 1\right )} b^{2} x^{2} \arctan \left (-b x - a + \sqrt {b^{2} x^{2} + 2 \, a b x + a^{2} - 1}\right ) + {\left (a^{3} - a\right )} b^{2} x^{2} + \sqrt {b^{2} x^{2} + 2 \, a b x + a^{2} - 1} {\left (a^{3} - a\right )} b x - {\left (a^{6} - 2 \, a^{4} + a^{2}\right )} \operatorname {arccsc}\left (b x + a\right )}{2 \, {\left (a^{6} - 2 \, a^{4} + a^{2}\right )} x^{2}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\operatorname {acsc}{\left (a + b x \right )}}{x^{3}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 217 vs.
\(2 (108) = 216\).
time = 0.48, size = 217, normalized size = 1.76 \begin {gather*} \frac {1}{2} \, b {\left (\frac {2 \, {\left (2 \, a^{2} b - b\right )} \arctan \left (\frac {{\left (b x + a\right )} {\left (\sqrt {-\frac {1}{{\left (b x + a\right )}^{2}} + 1} - 1\right )} + a}{\sqrt {-a^{2} + 1}}\right )}{{\left (a^{4} - a^{2}\right )} \sqrt {-a^{2} + 1}} + \frac {2 \, {\left ({\left (b x + a\right )} a b {\left (\sqrt {-\frac {1}{{\left (b x + a\right )}^{2}} + 1} - 1\right )} + b\right )}}{{\left ({\left (b x + a\right )}^{2} {\left (\sqrt {-\frac {1}{{\left (b x + a\right )}^{2}} + 1} - 1\right )}^{2} + 2 \, {\left (b x + a\right )} a {\left (\sqrt {-\frac {1}{{\left (b x + a\right )}^{2}} + 1} - 1\right )} + 1\right )} {\left (a^{3} - a\right )}} - \frac {{\left (\frac {2 \, a b}{b x + a} - b\right )} \arcsin \left (-\frac {1}{{\left (b x + a\right )} {\left (\frac {a}{b x + a} - 1\right )} - a}\right )}{a^{2} {\left (\frac {a}{b x + a} - 1\right )}^{2}}\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {\mathrm {asin}\left (\frac {1}{a+b\,x}\right )}{x^3} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________