Optimal. Leaf size=195 \[ \frac {1}{2} \sqrt {a+a x^2}+\frac {1}{2} x \sqrt {a+a x^2} \cot ^{-1}(x)-\frac {i a \sqrt {1+x^2} \cot ^{-1}(x) \text {ArcTan}\left (\frac {\sqrt {1+i x}}{\sqrt {1-i x}}\right )}{\sqrt {a+a x^2}}-\frac {i a \sqrt {1+x^2} \text {PolyLog}\left (2,-\frac {i \sqrt {1+i x}}{\sqrt {1-i x}}\right )}{2 \sqrt {a+a x^2}}+\frac {i a \sqrt {1+x^2} \text {PolyLog}\left (2,\frac {i \sqrt {1+i x}}{\sqrt {1-i x}}\right )}{2 \sqrt {a+a x^2}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 195, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 3, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.214, Rules used = {4999, 5011,
5007} \begin {gather*} -\frac {i a \sqrt {x^2+1} \text {ArcTan}\left (\frac {\sqrt {1+i x}}{\sqrt {1-i x}}\right ) \cot ^{-1}(x)}{\sqrt {a x^2+a}}-\frac {i a \sqrt {x^2+1} \text {Li}_2\left (-\frac {i \sqrt {i x+1}}{\sqrt {1-i x}}\right )}{2 \sqrt {a x^2+a}}+\frac {i a \sqrt {x^2+1} \text {Li}_2\left (\frac {i \sqrt {i x+1}}{\sqrt {1-i x}}\right )}{2 \sqrt {a x^2+a}}+\frac {1}{2} \sqrt {a x^2+a}+\frac {1}{2} x \sqrt {a x^2+a} \cot ^{-1}(x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 4999
Rule 5007
Rule 5011
Rubi steps
\begin {align*} \int \sqrt {a+a x^2} \cot ^{-1}(x) \, dx &=\frac {1}{2} \sqrt {a+a x^2}+\frac {1}{2} x \sqrt {a+a x^2} \cot ^{-1}(x)+\frac {1}{2} a \int \frac {\cot ^{-1}(x)}{\sqrt {a+a x^2}} \, dx\\ &=\frac {1}{2} \sqrt {a+a x^2}+\frac {1}{2} x \sqrt {a+a x^2} \cot ^{-1}(x)+\frac {\left (a \sqrt {1+x^2}\right ) \int \frac {\cot ^{-1}(x)}{\sqrt {1+x^2}} \, dx}{2 \sqrt {a+a x^2}}\\ &=\frac {1}{2} \sqrt {a+a x^2}+\frac {1}{2} x \sqrt {a+a x^2} \cot ^{-1}(x)-\frac {i a \sqrt {1+x^2} \cot ^{-1}(x) \tan ^{-1}\left (\frac {\sqrt {1+i x}}{\sqrt {1-i x}}\right )}{\sqrt {a+a x^2}}-\frac {i a \sqrt {1+x^2} \text {Li}_2\left (-\frac {i \sqrt {1+i x}}{\sqrt {1-i x}}\right )}{2 \sqrt {a+a x^2}}+\frac {i a \sqrt {1+x^2} \text {Li}_2\left (\frac {i \sqrt {1+i x}}{\sqrt {1-i x}}\right )}{2 \sqrt {a+a x^2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.89, size = 136, normalized size = 0.70 \begin {gather*} -\frac {\left (a \left (1+x^2\right )\right )^{3/2} \left (-2 \cot \left (\frac {1}{2} \cot ^{-1}(x)\right )-\cot ^{-1}(x) \csc ^2\left (\frac {1}{2} \cot ^{-1}(x)\right )+4 \cot ^{-1}(x) \log \left (1-e^{i \cot ^{-1}(x)}\right )-4 \cot ^{-1}(x) \log \left (1+e^{i \cot ^{-1}(x)}\right )+4 i \text {PolyLog}\left (2,-e^{i \cot ^{-1}(x)}\right )-4 i \text {PolyLog}\left (2,e^{i \cot ^{-1}(x)}\right )+\cot ^{-1}(x) \sec ^2\left (\frac {1}{2} \cot ^{-1}(x)\right )-2 \tan \left (\frac {1}{2} \cot ^{-1}(x)\right )\right )}{8 a \left (1+\frac {1}{x^2}\right )^{3/2} x^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.27, size = 117, normalized size = 0.60
method | result | size |
default | \(\frac {\sqrt {a \left (i+x \right ) \left (x -i\right )}\, \left (x \,\mathrm {arccot}\left (x \right )+1\right )}{2}-\frac {i \sqrt {a \left (i+x \right ) \left (x -i\right )}\, \left (i \mathrm {arccot}\left (x \right ) \ln \left (\frac {i+x}{\sqrt {x^{2}+1}}+1\right )-i \mathrm {arccot}\left (x \right ) \ln \left (1-\frac {i+x}{\sqrt {x^{2}+1}}\right )+\polylog \left (2, -\frac {i+x}{\sqrt {x^{2}+1}}\right )-\polylog \left (2, \frac {i+x}{\sqrt {x^{2}+1}}\right )\right )}{2 \sqrt {x^{2}+1}}\) | \(117\) |
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 [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \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 \sqrt {a \left (x^{2} + 1\right )} \operatorname {acot}{\left (x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \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 \mathrm {acot}\left (x\right )\,\sqrt {a\,x^2+a} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________