Optimal. Leaf size=152 \[ -\frac {1}{2} \sin ^{-1}(x)+\frac {1}{4} \sqrt {3} \tan ^{-1}\left (\frac {-1+\sqrt {3} x}{\sqrt {1-x^2}}\right )+\frac {1}{4} \sqrt {3} \tan ^{-1}\left (\frac {1+\sqrt {3} x}{\sqrt {1-x^2}}\right )-\frac {1}{4} \sqrt {3} \tan ^{-1}\left (\frac {-1+2 x^2}{\sqrt {3}}\right )-\sqrt {1-x^2} \tan ^{-1}\left (x+\sqrt {1-x^2}\right )+\frac {1}{4} \tanh ^{-1}\left (x \sqrt {1-x^2}\right )+\frac {1}{8} \log \left (1-x^2+x^4\right ) \]
[Out]
________________________________________________________________________________________
Rubi [C] Result contains complex when optimal does not.
time = 0.32, 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 =
{267, 5315, 12, 6874, 1121, 632, 210, 1307, 222, 1188, 385, 211, 399, 1261, 648, 642}
\begin {gather*} -\frac {\text {ArcSin}(x)}{2}+\frac {1}{4} \sqrt {3} \text {ArcTan}\left (\frac {1-2 x^2}{\sqrt {3}}\right )-\frac {1}{12} \left (-\sqrt {3}+3 i\right ) \text {ArcTan}\left (\frac {x}{\sqrt {-\frac {-\sqrt {3}+i}{\sqrt {3}+i}} \sqrt {1-x^2}}\right )+\frac {\text {ArcTan}\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 ) \text {ArcTan}\left (\frac {\sqrt {-\frac {-\sqrt {3}+i}{\sqrt {3}+i}} x}{\sqrt {1-x^2}}\right )+\frac {\text {ArcTan}\left (\frac {\sqrt {-\frac {-\sqrt {3}+i}{\sqrt {3}+i}} x}{\sqrt {1-x^2}}\right )}{2 \sqrt {3}}-\sqrt {1-x^2} \text {ArcTan}\left (\sqrt {1-x^2}+x\right )+\frac {1}{8} \log \left (x^4-x^2+1\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 210
Rule 211
Rule 222
Rule 267
Rule 385
Rule 399
Rule 632
Rule 642
Rule 648
Rule 1121
Rule 1188
Rule 1261
Rule 1307
Rule 5315
Rule 6874
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} \text {Subst}\left (\int \frac {1}{1-x+x^2} \, dx,x,x^2\right )-\frac {1}{4} \text {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} \text {Subst}\left (\int \frac {1}{1-x+x^2} \, dx,x,x^2\right )+\frac {1}{8} \text {Subst}\left (\int \frac {-1+2 x}{1-x+x^2} \, dx,x,x^2\right )+\frac {1}{2} \text {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} \text {Subst}\left (\int \frac {1}{-3-x^2} \, dx,x,-1+2 x^2\right )+\frac {i \text {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 \text {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 ) \text {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 ) \text {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] Result contains complex when optimal does not.
time = 3.25, size = 2180, normalized size = 14.34 \begin {gather*} \text {Result too large to show} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.10, size = 0, normalized size = 0.00 \[\int \frac {x \arctan \left (x +\sqrt {-x^{2}+1}\right )}{\sqrt {-x^{2}+1}}\, dx\]
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 [A]
time = 0.93, size = 200, normalized size = 1.32 \begin {gather*} -\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 {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 373 vs.
\(2 (119) = 238\).
time = 0.50, size = 373, normalized size = 2.45 \begin {gather*} -\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 {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 \frac {x\,\mathrm {atan}\left (x+\sqrt {1-x^2}\right )}{\sqrt {1-x^2}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________