Optimal. Leaf size=152 \[ \frac{1}{8} \log \left (x^4-x^2+1\right )+\frac{1}{4} \sqrt{3} \tan ^{-1}\left (\frac{\sqrt{3} x-1}{\sqrt{1-x^2}}\right )+\frac{1}{4} \sqrt{3} \tan ^{-1}\left (\frac{\sqrt{3} x+1}{\sqrt{1-x^2}}\right )-\frac{1}{4} \sqrt{3} \tan ^{-1}\left (\frac{2 x^2-1}{\sqrt{3}}\right )-\sqrt{1-x^2} \tan ^{-1}\left (\sqrt{1-x^2}+x\right )+\frac{1}{4} \tanh ^{-1}\left (x \sqrt{1-x^2}\right )-\frac{1}{2} \sin ^{-1}(x) \]
[Out]
________________________________________________________________________________________
Rubi [C] time = 0.456532, antiderivative size = 286, normalized size of antiderivative = 1.88, number of steps used = 32, number of rules used = 16, integrand size = 27, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.593, Rules used = {261, 5207, 12, 6742, 1107, 618, 204, 1293, 216, 1174, 377, 205, 402, 1247, 634, 628} \[ \frac{1}{8} \log \left (x^4-x^2+1\right )+\frac{1}{4} \sqrt{3} \tan ^{-1}\left (\frac{1-2 x^2}{\sqrt{3}}\right )-\frac{1}{12} \left (-\sqrt{3}+3 i\right ) \tan ^{-1}\left (\frac{x}{\sqrt{-\frac{-\sqrt{3}+i}{\sqrt{3}+i}} \sqrt{1-x^2}}\right )+\frac{\tan ^{-1}\left (\frac{x}{\sqrt{-\frac{-\sqrt{3}+i}{\sqrt{3}+i}} \sqrt{1-x^2}}\right )}{2 \sqrt{3}}+\frac{1}{12} \left (\sqrt{3}+3 i\right ) \tan ^{-1}\left (\frac{\sqrt{-\frac{-\sqrt{3}+i}{\sqrt{3}+i}} x}{\sqrt{1-x^2}}\right )+\frac{\tan ^{-1}\left (\frac{\sqrt{-\frac{-\sqrt{3}+i}{\sqrt{3}+i}} x}{\sqrt{1-x^2}}\right )}{2 \sqrt{3}}-\sqrt{1-x^2} \tan ^{-1}\left (\sqrt{1-x^2}+x\right )-\frac{1}{2} \sin ^{-1}(x) \]
Warning: Unable to verify antiderivative.
[In]
[Out]
Rule 261
Rule 5207
Rule 12
Rule 6742
Rule 1107
Rule 618
Rule 204
Rule 1293
Rule 216
Rule 1174
Rule 377
Rule 205
Rule 402
Rule 1247
Rule 634
Rule 628
Rubi steps
\begin{align*} \int \frac{x \tan ^{-1}\left (x+\sqrt{1-x^2}\right )}{\sqrt{1-x^2}} \, dx &=-\sqrt{1-x^2} \tan ^{-1}\left (x+\sqrt{1-x^2}\right )-\int \frac{x-\sqrt{1-x^2}}{2 \left (1+x \sqrt{1-x^2}\right )} \, dx\\ &=-\sqrt{1-x^2} \tan ^{-1}\left (x+\sqrt{1-x^2}\right )-\frac{1}{2} \int \frac{x-\sqrt{1-x^2}}{1+x \sqrt{1-x^2}} \, dx\\ &=-\sqrt{1-x^2} \tan ^{-1}\left (x+\sqrt{1-x^2}\right )-\frac{1}{2} \int \left (\frac{x}{1+x \sqrt{1-x^2}}-\frac{\sqrt{1-x^2}}{1+x \sqrt{1-x^2}}\right ) \, dx\\ &=-\sqrt{1-x^2} \tan ^{-1}\left (x+\sqrt{1-x^2}\right )-\frac{1}{2} \int \frac{x}{1+x \sqrt{1-x^2}} \, dx+\frac{1}{2} \int \frac{\sqrt{1-x^2}}{1+x \sqrt{1-x^2}} \, dx\\ &=-\sqrt{1-x^2} \tan ^{-1}\left (x+\sqrt{1-x^2}\right )-\frac{1}{2} \int \left (\frac{x}{1-x^2+x^4}-\frac{x^2 \sqrt{1-x^2}}{1-x^2+x^4}\right ) \, dx+\frac{1}{2} \int \left (\frac{\sqrt{1-x^2}}{1-x^2+x^4}-\frac{x \left (1-x^2\right )}{1-x^2+x^4}\right ) \, dx\\ &=-\sqrt{1-x^2} \tan ^{-1}\left (x+\sqrt{1-x^2}\right )-\frac{1}{2} \int \frac{x}{1-x^2+x^4} \, dx+\frac{1}{2} \int \frac{\sqrt{1-x^2}}{1-x^2+x^4} \, dx+\frac{1}{2} \int \frac{x^2 \sqrt{1-x^2}}{1-x^2+x^4} \, dx-\frac{1}{2} \int \frac{x \left (1-x^2\right )}{1-x^2+x^4} \, dx\\ &=-\sqrt{1-x^2} \tan ^{-1}\left (x+\sqrt{1-x^2}\right )-\frac{1}{4} \operatorname{Subst}\left (\int \frac{1}{1-x+x^2} \, dx,x,x^2\right )-\frac{1}{4} \operatorname{Subst}\left (\int \frac{1-x}{1-x+x^2} \, dx,x,x^2\right )-\frac{1}{2} \int \frac{1}{\sqrt{1-x^2}} \, dx+\frac{1}{2} \int \frac{1}{\sqrt{1-x^2} \left (1-x^2+x^4\right )} \, dx-\frac{i \int \frac{\sqrt{1-x^2}}{-1-i \sqrt{3}+2 x^2} \, dx}{\sqrt{3}}+\frac{i \int \frac{\sqrt{1-x^2}}{-1+i \sqrt{3}+2 x^2} \, dx}{\sqrt{3}}\\ &=-\frac{1}{2} \sin ^{-1}(x)-\sqrt{1-x^2} \tan ^{-1}\left (x+\sqrt{1-x^2}\right )-\frac{1}{8} \operatorname{Subst}\left (\int \frac{1}{1-x+x^2} \, dx,x,x^2\right )+\frac{1}{8} \operatorname{Subst}\left (\int \frac{-1+2 x}{1-x+x^2} \, dx,x,x^2\right )+\frac{1}{2} \operatorname{Subst}\left (\int \frac{1}{-3-x^2} \, dx,x,-1+2 x^2\right )-\frac{i \int \frac{1}{\sqrt{1-x^2} \left (-1-i \sqrt{3}+2 x^2\right )} \, dx}{\sqrt{3}}+\frac{i \int \frac{1}{\sqrt{1-x^2} \left (-1+i \sqrt{3}+2 x^2\right )} \, dx}{\sqrt{3}}-\frac{1}{6} \left (3-i \sqrt{3}\right ) \int \frac{1}{\sqrt{1-x^2} \left (-1+i \sqrt{3}+2 x^2\right )} \, dx-\frac{1}{6} \left (3+i \sqrt{3}\right ) \int \frac{1}{\sqrt{1-x^2} \left (-1-i \sqrt{3}+2 x^2\right )} \, dx\\ &=-\frac{1}{2} \sin ^{-1}(x)+\frac{\tan ^{-1}\left (\frac{1-2 x^2}{\sqrt{3}}\right )}{2 \sqrt{3}}-\sqrt{1-x^2} \tan ^{-1}\left (x+\sqrt{1-x^2}\right )+\frac{1}{8} \log \left (1-x^2+x^4\right )+\frac{1}{4} \operatorname{Subst}\left (\int \frac{1}{-3-x^2} \, dx,x,-1+2 x^2\right )+\frac{i \operatorname{Subst}\left (\int \frac{1}{-1+i \sqrt{3}-\left (-1-i \sqrt{3}\right ) x^2} \, dx,x,\frac{x}{\sqrt{1-x^2}}\right )}{\sqrt{3}}-\frac{i \operatorname{Subst}\left (\int \frac{1}{-1-i \sqrt{3}-\left (-1+i \sqrt{3}\right ) x^2} \, dx,x,\frac{x}{\sqrt{1-x^2}}\right )}{\sqrt{3}}-\frac{1}{6} \left (3-i \sqrt{3}\right ) \operatorname{Subst}\left (\int \frac{1}{-1+i \sqrt{3}-\left (-1-i \sqrt{3}\right ) x^2} \, dx,x,\frac{x}{\sqrt{1-x^2}}\right )-\frac{1}{6} \left (3+i \sqrt{3}\right ) \operatorname{Subst}\left (\int \frac{1}{-1-i \sqrt{3}-\left (-1+i \sqrt{3}\right ) x^2} \, dx,x,\frac{x}{\sqrt{1-x^2}}\right )\\ &=-\frac{1}{2} \sin ^{-1}(x)+\frac{1}{4} \sqrt{3} \tan ^{-1}\left (\frac{1-2 x^2}{\sqrt{3}}\right )+\frac{\tan ^{-1}\left (\frac{x}{\sqrt{-\frac{i-\sqrt{3}}{i+\sqrt{3}}} \sqrt{1-x^2}}\right )}{2 \sqrt{3}}-\frac{1}{12} \left (3 i-\sqrt{3}\right ) \tan ^{-1}\left (\frac{x}{\sqrt{-\frac{i-\sqrt{3}}{i+\sqrt{3}}} \sqrt{1-x^2}}\right )+\frac{\tan ^{-1}\left (\frac{\sqrt{-\frac{i-\sqrt{3}}{i+\sqrt{3}}} x}{\sqrt{1-x^2}}\right )}{2 \sqrt{3}}+\frac{1}{12} \left (3 i+\sqrt{3}\right ) \tan ^{-1}\left (\frac{\sqrt{-\frac{i-\sqrt{3}}{i+\sqrt{3}}} x}{\sqrt{1-x^2}}\right )-\sqrt{1-x^2} \tan ^{-1}\left (x+\sqrt{1-x^2}\right )+\frac{1}{8} \log \left (1-x^2+x^4\right )\\ \end{align*}
Mathematica [C] time = 4.53127, size = 2180, normalized size = 14.34 \[ \text{Result too large to show} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F] time = 0.059, size = 0, normalized size = 0. \begin{align*} \int{x\arctan \left ( x+\sqrt{-{x}^{2}+1} \right ){\frac{1}{\sqrt{-{x}^{2}+1}}}}\, dx \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*} -\sqrt{x + 1} \sqrt{-x + 1} \arctan \left (x + \sqrt{x + 1} \sqrt{-x + 1}\right ) - \int \frac{x}{x^{2} + 2 \, x e^{\left (\frac{1}{2} \, \log \left (x + 1\right ) + \frac{1}{2} \, \log \left (-x + 1\right )\right )} + e^{\left (\log \left (x + 1\right ) + \log \left (-x + 1\right )\right )} + 1}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.63759, size = 548, normalized size = 3.61 \begin{align*} -\frac{1}{4} \, \sqrt{3} \arctan \left (\frac{1}{3} \, \sqrt{3}{\left (2 \, x^{2} - 1\right )}\right ) - \sqrt{-x^{2} + 1} \arctan \left (x + \sqrt{-x^{2} + 1}\right ) - \frac{1}{8} \, \sqrt{3} \arctan \left (\frac{4 \, \sqrt{3} \sqrt{-x^{2} + 1} x + \sqrt{3}}{3 \,{\left (2 \, x^{2} - 1\right )}}\right ) - \frac{1}{8} \, \sqrt{3} \arctan \left (\frac{4 \, \sqrt{3} \sqrt{-x^{2} + 1} x - \sqrt{3}}{3 \,{\left (2 \, x^{2} - 1\right )}}\right ) + \frac{1}{2} \, \arctan \left (\frac{\sqrt{-x^{2} + 1} x}{x^{2} - 1}\right ) + \frac{1}{8} \, \log \left (x^{4} - x^{2} + 1\right ) + \frac{1}{16} \, \log \left (-x^{4} + x^{2} + 2 \, \sqrt{-x^{2} + 1} x + 1\right ) - \frac{1}{16} \, \log \left (-x^{4} + x^{2} - 2 \, \sqrt{-x^{2} + 1} x + 1\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.24644, size = 504, normalized size = 3.32 \begin{align*} -\frac{1}{4} \, \pi \mathrm{sgn}\left (x\right ) + \frac{1}{8} \, \sqrt{3}{\left (\pi \mathrm{sgn}\left (x\right ) + 2 \, \arctan \left (-\frac{\sqrt{3} x{\left (\frac{\sqrt{-x^{2} + 1} - 1}{x} + \frac{{\left (\sqrt{-x^{2} + 1} - 1\right )}^{2}}{x^{2}} - 1\right )}}{3 \,{\left (\sqrt{-x^{2} + 1} - 1\right )}}\right )\right )} + \frac{1}{8} \, \sqrt{3}{\left (\pi \mathrm{sgn}\left (x\right ) + 2 \, \arctan \left (\frac{\sqrt{3} x{\left (\frac{\sqrt{-x^{2} + 1} - 1}{x} - \frac{{\left (\sqrt{-x^{2} + 1} - 1\right )}^{2}}{x^{2}} + 1\right )}}{3 \,{\left (\sqrt{-x^{2} + 1} - 1\right )}}\right )\right )} - \frac{1}{4} \, \sqrt{3} \arctan \left (\frac{1}{3} \, \sqrt{3}{\left (2 \, x^{2} - 1\right )}\right ) - \sqrt{-x^{2} + 1} \arctan \left (x + \sqrt{-x^{2} + 1}\right ) - \frac{1}{2} \, \arctan \left (-\frac{x{\left (\frac{{\left (\sqrt{-x^{2} + 1} - 1\right )}^{2}}{x^{2}} - 1\right )}}{2 \,{\left (\sqrt{-x^{2} + 1} - 1\right )}}\right ) + \frac{1}{8} \, \log \left (x^{4} - x^{2} + 1\right ) - \frac{1}{8} \, \log \left ({\left (\frac{x}{\sqrt{-x^{2} + 1} - 1} - \frac{\sqrt{-x^{2} + 1} - 1}{x}\right )}^{2} + \frac{2 \, x}{\sqrt{-x^{2} + 1} - 1} - \frac{2 \,{\left (\sqrt{-x^{2} + 1} - 1\right )}}{x} + 4\right ) + \frac{1}{8} \, \log \left ({\left (\frac{x}{\sqrt{-x^{2} + 1} - 1} - \frac{\sqrt{-x^{2} + 1} - 1}{x}\right )}^{2} - \frac{2 \, x}{\sqrt{-x^{2} + 1} - 1} + \frac{2 \,{\left (\sqrt{-x^{2} + 1} - 1\right )}}{x} + 4\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]