Optimal. Leaf size=121 \[ \sinh ^{-1}(x)-\sqrt {1+x^2} \tan ^{-1}(x)+\frac {1}{2} x \sqrt {1+x^2} \tan ^{-1}(x)^2-i \tan ^{-1}\left (e^{i \tan ^{-1}(x)}\right ) \tan ^{-1}(x)^2+i \tan ^{-1}(x) \text {Li}_2\left (-i e^{i \tan ^{-1}(x)}\right )-i \tan ^{-1}(x) \text {Li}_2\left (i e^{i \tan ^{-1}(x)}\right )-\text {Li}_3\left (-i e^{i \tan ^{-1}(x)}\right )+\text {Li}_3\left (i e^{i \tan ^{-1}(x)}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.07, antiderivative size = 121, normalized size of antiderivative = 1.00, number of steps
used = 10, number of rules used = 7, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {5000, 5008,
4266, 2611, 2320, 6724, 221} \begin {gather*} i \tan ^{-1}(x) \text {Li}_2\left (-i e^{i \tan ^{-1}(x)}\right )-i \tan ^{-1}(x) \text {Li}_2\left (i e^{i \tan ^{-1}(x)}\right )-\text {Li}_3\left (-i e^{i \tan ^{-1}(x)}\right )+\text {Li}_3\left (i e^{i \tan ^{-1}(x)}\right )+\frac {1}{2} x \sqrt {x^2+1} \tan ^{-1}(x)^2-\sqrt {x^2+1} \tan ^{-1}(x)-i \tan ^{-1}\left (e^{i \tan ^{-1}(x)}\right ) \tan ^{-1}(x)^2+\sinh ^{-1}(x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 221
Rule 2320
Rule 2611
Rule 4266
Rule 5000
Rule 5008
Rule 6724
Rubi steps
\begin {align*} \int \sqrt {1+x^2} \tan ^{-1}(x)^2 \, dx &=-\sqrt {1+x^2} \tan ^{-1}(x)+\frac {1}{2} x \sqrt {1+x^2} \tan ^{-1}(x)^2+\frac {1}{2} \int \frac {\tan ^{-1}(x)^2}{\sqrt {1+x^2}} \, dx+\int \frac {1}{\sqrt {1+x^2}} \, dx\\ &=\sinh ^{-1}(x)-\sqrt {1+x^2} \tan ^{-1}(x)+\frac {1}{2} x \sqrt {1+x^2} \tan ^{-1}(x)^2+\frac {1}{2} \text {Subst}\left (\int x^2 \sec (x) \, dx,x,\tan ^{-1}(x)\right )\\ &=\sinh ^{-1}(x)-\sqrt {1+x^2} \tan ^{-1}(x)+\frac {1}{2} x \sqrt {1+x^2} \tan ^{-1}(x)^2-i \tan ^{-1}\left (e^{i \tan ^{-1}(x)}\right ) \tan ^{-1}(x)^2-\text {Subst}\left (\int x \log \left (1-i e^{i x}\right ) \, dx,x,\tan ^{-1}(x)\right )+\text {Subst}\left (\int x \log \left (1+i e^{i x}\right ) \, dx,x,\tan ^{-1}(x)\right )\\ &=\sinh ^{-1}(x)-\sqrt {1+x^2} \tan ^{-1}(x)+\frac {1}{2} x \sqrt {1+x^2} \tan ^{-1}(x)^2-i \tan ^{-1}\left (e^{i \tan ^{-1}(x)}\right ) \tan ^{-1}(x)^2+i \tan ^{-1}(x) \text {Li}_2\left (-i e^{i \tan ^{-1}(x)}\right )-i \tan ^{-1}(x) \text {Li}_2\left (i e^{i \tan ^{-1}(x)}\right )-i \text {Subst}\left (\int \text {Li}_2\left (-i e^{i x}\right ) \, dx,x,\tan ^{-1}(x)\right )+i \text {Subst}\left (\int \text {Li}_2\left (i e^{i x}\right ) \, dx,x,\tan ^{-1}(x)\right )\\ &=\sinh ^{-1}(x)-\sqrt {1+x^2} \tan ^{-1}(x)+\frac {1}{2} x \sqrt {1+x^2} \tan ^{-1}(x)^2-i \tan ^{-1}\left (e^{i \tan ^{-1}(x)}\right ) \tan ^{-1}(x)^2+i \tan ^{-1}(x) \text {Li}_2\left (-i e^{i \tan ^{-1}(x)}\right )-i \tan ^{-1}(x) \text {Li}_2\left (i e^{i \tan ^{-1}(x)}\right )-\text {Subst}\left (\int \frac {\text {Li}_2(-i x)}{x} \, dx,x,e^{i \tan ^{-1}(x)}\right )+\text {Subst}\left (\int \frac {\text {Li}_2(i x)}{x} \, dx,x,e^{i \tan ^{-1}(x)}\right )\\ &=\sinh ^{-1}(x)-\sqrt {1+x^2} \tan ^{-1}(x)+\frac {1}{2} x \sqrt {1+x^2} \tan ^{-1}(x)^2-i \tan ^{-1}\left (e^{i \tan ^{-1}(x)}\right ) \tan ^{-1}(x)^2+i \tan ^{-1}(x) \text {Li}_2\left (-i e^{i \tan ^{-1}(x)}\right )-i \tan ^{-1}(x) \text {Li}_2\left (i e^{i \tan ^{-1}(x)}\right )-\text {Li}_3\left (-i e^{i \tan ^{-1}(x)}\right )+\text {Li}_3\left (i e^{i \tan ^{-1}(x)}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.14, size = 131, normalized size = 1.08 \begin {gather*} -\sqrt {1+x^2} \tan ^{-1}(x)+\frac {1}{2} x \sqrt {1+x^2} \tan ^{-1}(x)^2-i \tan ^{-1}\left (e^{i \tan ^{-1}(x)}\right ) \tan ^{-1}(x)^2+\tanh ^{-1}\left (\frac {x}{\sqrt {1+x^2}}\right )+i \tan ^{-1}(x) \text {Li}_2\left (-i e^{i \tan ^{-1}(x)}\right )-i \tan ^{-1}(x) \text {Li}_2\left (i e^{i \tan ^{-1}(x)}\right )-\text {Li}_3\left (-i e^{i \tan ^{-1}(x)}\right )+\text {Li}_3\left (i e^{i \tan ^{-1}(x)}\right ) \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Mathics [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {cought exception: maximum recursion depth exceeded} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.33, size = 171, normalized size = 1.41
method | result | size |
default | \(\frac {\sqrt {x^{2}+1}\, \arctan \left (x \right ) \left (x \arctan \left (x \right )-2\right )}{2}+\frac {\arctan \left (x \right )^{2} \ln \left (1-\frac {i \left (i x +1\right )}{\sqrt {x^{2}+1}}\right )}{2}-\frac {\arctan \left (x \right )^{2} \ln \left (1+\frac {i \left (i x +1\right )}{\sqrt {x^{2}+1}}\right )}{2}-i \arctan \left (x \right ) \polylog \left (2, \frac {i \left (i x +1\right )}{\sqrt {x^{2}+1}}\right )+i \arctan \left (x \right ) \polylog \left (2, -\frac {i \left (i x +1\right )}{\sqrt {x^{2}+1}}\right )+\polylog \left (3, \frac {i \left (i x +1\right )}{\sqrt {x^{2}+1}}\right )-\polylog \left (3, -\frac {i \left (i x +1\right )}{\sqrt {x^{2}+1}}\right )-2 i \arctan \left (\frac {i x +1}{\sqrt {x^{2}+1}}\right )\) | \(171\) |
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.34, 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 {x^{2} + 1} \operatorname {atan}^{2}{\left (x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] N/A
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 {atan}\left (x\right )}^2\,\sqrt {x^2+1} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________