Optimal. Leaf size=187 \[ \frac{i \text{PolyLog}\left (2,-\frac{i \sqrt{1+i (a+b x)}}{\sqrt{1-i (a+b x)}}\right )}{2 b}-\frac{i \text{PolyLog}\left (2,\frac{i \sqrt{1+i (a+b x)}}{\sqrt{1-i (a+b x)}}\right )}{2 b}+\frac{\sqrt{(a+b x)^2+1}}{2 b}+\frac{(a+b x) \sqrt{(a+b x)^2+1} \cot ^{-1}(a+b x)}{2 b}+\frac{i \tan ^{-1}\left (\frac{\sqrt{1+i (a+b x)}}{\sqrt{1-i (a+b x)}}\right ) \cot ^{-1}(a+b x)}{b} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.2229, antiderivative size = 187, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 35, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.114, Rules used = {5058, 4953, 261, 4887} \[ \frac{i \text{PolyLog}\left (2,-\frac{i \sqrt{1+i (a+b x)}}{\sqrt{1-i (a+b x)}}\right )}{2 b}-\frac{i \text{PolyLog}\left (2,\frac{i \sqrt{1+i (a+b x)}}{\sqrt{1-i (a+b x)}}\right )}{2 b}+\frac{\sqrt{(a+b x)^2+1}}{2 b}+\frac{(a+b x) \sqrt{(a+b x)^2+1} \cot ^{-1}(a+b x)}{2 b}+\frac{i \tan ^{-1}\left (\frac{\sqrt{1+i (a+b x)}}{\sqrt{1-i (a+b x)}}\right ) \cot ^{-1}(a+b x)}{b} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 5058
Rule 4953
Rule 261
Rule 4887
Rubi steps
\begin{align*} \int \frac{(a+b x)^2 \cot ^{-1}(a+b x)}{\sqrt{1+a^2+2 a b x+b^2 x^2}} \, dx &=\frac{\operatorname{Subst}\left (\int \frac{x^2 \cot ^{-1}(x)}{\sqrt{1+x^2}} \, dx,x,a+b x\right )}{b}\\ &=\frac{(a+b x) \sqrt{1+(a+b x)^2} \cot ^{-1}(a+b x)}{2 b}+\frac{\operatorname{Subst}\left (\int \frac{x}{\sqrt{1+x^2}} \, dx,x,a+b x\right )}{2 b}-\frac{\operatorname{Subst}\left (\int \frac{\cot ^{-1}(x)}{\sqrt{1+x^2}} \, dx,x,a+b x\right )}{2 b}\\ &=\frac{\sqrt{1+(a+b x)^2}}{2 b}+\frac{(a+b x) \sqrt{1+(a+b x)^2} \cot ^{-1}(a+b x)}{2 b}+\frac{i \cot ^{-1}(a+b x) \tan ^{-1}\left (\frac{\sqrt{1+i (a+b x)}}{\sqrt{1-i (a+b x)}}\right )}{b}+\frac{i \text{Li}_2\left (-\frac{i \sqrt{1+i (a+b x)}}{\sqrt{1-i (a+b x)}}\right )}{2 b}-\frac{i \text{Li}_2\left (\frac{i \sqrt{1+i (a+b x)}}{\sqrt{1-i (a+b x)}}\right )}{2 b}\\ \end{align*}
Mathematica [A] time = 1.4439, size = 202, normalized size = 1.08 \[ -\frac{\sqrt{(a+b x)^2 \left (\frac{1}{(a+b x)^2}+1\right )} \left (-4 i \text{PolyLog}\left (2,-e^{i \cot ^{-1}(a+b x)}\right )+4 i \text{PolyLog}\left (2,e^{i \cot ^{-1}(a+b x)}\right )-2 \cot \left (\frac{1}{2} \cot ^{-1}(a+b x)\right )-4 \cot ^{-1}(a+b x) \log \left (1-e^{i \cot ^{-1}(a+b x)}\right )+4 \cot ^{-1}(a+b x) \log \left (1+e^{i \cot ^{-1}(a+b x)}\right )-2 \tan \left (\frac{1}{2} \cot ^{-1}(a+b x)\right )-\cot ^{-1}(a+b x) \csc ^2\left (\frac{1}{2} \cot ^{-1}(a+b x)\right )+\cot ^{-1}(a+b x) \sec ^2\left (\frac{1}{2} \cot ^{-1}(a+b x)\right )\right )}{8 b (a+b x) \sqrt{\frac{1}{(a+b x)^2}+1}} \]
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.642, size = 167, normalized size = 0.9 \begin{align*}{\frac{{\rm arccot} \left (bx+a\right )xb+{\rm arccot} \left (bx+a\right )a+1}{2\,b}\sqrt{{b}^{2}{x}^{2}+2\,xab+{a}^{2}+1}}-{\frac{{\rm arccot} \left (bx+a\right )}{2\,b}\ln \left ( 1+{(i+a+bx){\frac{1}{\sqrt{1+ \left ( bx+a \right ) ^{2}}}}} \right ) }+{\frac{{\rm arccot} \left (bx+a\right )}{2\,b}\ln \left ( 1-{(i+a+bx){\frac{1}{\sqrt{1+ \left ( bx+a \right ) ^{2}}}}} \right ) }+{\frac{{\frac{i}{2}}}{b}{\it polylog} \left ( 2,-{(i+a+bx){\frac{1}{\sqrt{1+ \left ( bx+a \right ) ^{2}}}}} \right ) }-{\frac{{\frac{i}{2}}}{b}{\it polylog} \left ( 2,{(i+a+bx){\frac{1}{\sqrt{1+ \left ( bx+a \right ) ^{2}}}}} \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F] time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (\frac{{\left (b^{2} x^{2} + 2 \, a b x + a^{2}\right )} \operatorname{arccot}\left (b x + a\right )}{\sqrt{b^{2} x^{2} + 2 \, a b x + a^{2} + 1}}, x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\left (a + b x\right )^{2} \operatorname{acot}{\left (a + b x \right )}}{\sqrt{a^{2} + 2 a b x + b^{2} x^{2} + 1}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{{\left (b x + a\right )}^{2} \operatorname{arccot}\left (b x + a\right )}{\sqrt{b^{2} x^{2} + 2 \, a b x + a^{2} + 1}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]