Optimal. Leaf size=121 \[ i \tan ^{-1}(x) \text{PolyLog}\left (2,-i e^{i \tan ^{-1}(x)}\right )-i \tan ^{-1}(x) \text{PolyLog}\left (2,i e^{i \tan ^{-1}(x)}\right )-\text{PolyLog}\left (3,-i e^{i \tan ^{-1}(x)}\right )+\text{PolyLog}\left (3,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) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.109459, antiderivative size = 121, normalized size of antiderivative = 1., number of steps used = 10, number of rules used = 7, integrand size = 14, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.5, Rules used = {4880, 4888, 4181, 2531, 2282, 6589, 215} \[ i \tan ^{-1}(x) \text{PolyLog}\left (2,-i e^{i \tan ^{-1}(x)}\right )-i \tan ^{-1}(x) \text{PolyLog}\left (2,i e^{i \tan ^{-1}(x)}\right )-\text{PolyLog}\left (3,-i e^{i \tan ^{-1}(x)}\right )+\text{PolyLog}\left (3,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) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 4880
Rule 4888
Rule 4181
Rule 2531
Rule 2282
Rule 6589
Rule 215
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} \operatorname{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-\operatorname{Subst}\left (\int x \log \left (1-i e^{i x}\right ) \, dx,x,\tan ^{-1}(x)\right )+\operatorname{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 \operatorname{Subst}\left (\int \text{Li}_2\left (-i e^{i x}\right ) \, dx,x,\tan ^{-1}(x)\right )+i \operatorname{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 )-\operatorname{Subst}\left (\int \frac{\text{Li}_2(-i x)}{x} \, dx,x,e^{i \tan ^{-1}(x)}\right )+\operatorname{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.194612, size = 131, normalized size = 1.08 \[ i \tan ^{-1}(x) \text{PolyLog}\left (2,-i e^{i \tan ^{-1}(x)}\right )-i \tan ^{-1}(x) \text{PolyLog}\left (2,i e^{i \tan ^{-1}(x)}\right )-\text{PolyLog}\left (3,-i e^{i \tan ^{-1}(x)}\right )+\text{PolyLog}\left (3,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)+\tanh ^{-1}\left (\frac{x}{\sqrt{x^2+1}}\right )-i \tan ^{-1}\left (e^{i \tan ^{-1}(x)}\right ) \tan ^{-1}(x)^2 \]
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.266, size = 171, normalized size = 1.4 \begin{align*}{\frac{\arctan \left ( x \right ) \left ( x\arctan \left ( x \right ) -2 \right ) }{2}\sqrt{{x}^{2}+1}}+{\frac{ \left ( \arctan \left ( x \right ) \right ) ^{2}}{2}\ln \left ( 1-{i \left ( 1+ix \right ){\frac{1}{\sqrt{{x}^{2}+1}}}} \right ) }-{\frac{ \left ( \arctan \left ( x \right ) \right ) ^{2}}{2}\ln \left ( 1+{i \left ( 1+ix \right ){\frac{1}{\sqrt{{x}^{2}+1}}}} \right ) }-i\arctan \left ( x \right ){\it polylog} \left ( 2,{i \left ( 1+ix \right ){\frac{1}{\sqrt{{x}^{2}+1}}}} \right ) +{\it polylog} \left ( 3,{i \left ( 1+ix \right ){\frac{1}{\sqrt{{x}^{2}+1}}}} \right ) +i\arctan \left ( x \right ){\it polylog} \left ( 2,{-i \left ( 1+ix \right ){\frac{1}{\sqrt{{x}^{2}+1}}}} \right ) -{\it polylog} \left ( 3,{-i \left ( 1+ix \right ){\frac{1}{\sqrt{{x}^{2}+1}}}} \right ) -2\,i\arctan \left ({(1+ix){\frac{1}{\sqrt{{x}^{2}+1}}}} \right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \sqrt{x^{2} + 1} \arctan \left (x\right )^{2}\,{d x} \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 (\sqrt{x^{2} + 1} \arctan \left (x\right )^{2}, 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 \sqrt{x^{2} + 1} \operatorname{atan}^{2}{\left (x \right )}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: TypeError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]