Optimal. Leaf size=37 \[ -\frac {1}{2} \sin ^{-1}(x)-\frac {1}{2} \tanh ^{-1}\left (\frac {x}{\sqrt {1-x^2}}\right )+\frac {1}{4} \log \left (1-2 x^2\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, antiderivative size = 37, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 6, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.353, Rules used = {6874, 266, 399,
222, 385, 213} \begin {gather*} -\frac {\text {ArcSin}(x)}{2}+\frac {1}{4} \log \left (1-2 x^2\right )-\frac {1}{2} \tanh ^{-1}\left (\frac {x}{\sqrt {1-x^2}}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 213
Rule 222
Rule 266
Rule 385
Rule 399
Rule 6874
Rubi steps
\begin {align*} \int \frac {1}{x-\sqrt {1-x^2}} \, dx &=\int \left (\frac {x}{-1+2 x^2}+\frac {\sqrt {1-x^2}}{-1+2 x^2}\right ) \, dx\\ &=\int \frac {x}{-1+2 x^2} \, dx+\int \frac {\sqrt {1-x^2}}{-1+2 x^2} \, dx\\ &=\frac {1}{4} \log \left (1-2 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+2 x^2\right )} \, dx\\ &=-\frac {1}{2} \sin ^{-1}(x)+\frac {1}{4} \log \left (1-2 x^2\right )+\frac {1}{2} \text {Subst}\left (\int \frac {1}{-1+x^2} \, dx,x,\frac {x}{\sqrt {1-x^2}}\right )\\ &=-\frac {1}{2} \sin ^{-1}(x)-\frac {1}{2} \tanh ^{-1}\left (\frac {x}{\sqrt {1-x^2}}\right )+\frac {1}{4} \log \left (1-2 x^2\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.04, size = 39, normalized size = 1.05 \begin {gather*} \tan ^{-1}\left (\frac {\sqrt {1-x^2}}{1+x}\right )+\frac {1}{2} \log \left (-x+\sqrt {1-x^2}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(196\) vs.
\(2(29)=58\).
time = 0.15, size = 197, normalized size = 5.32
method | result | size |
trager | \(-\ln \left (-\frac {\sqrt {-x^{2}+1}+x}{2 x^{2}-1}\right ) \RootOf \left (2 \textit {\_Z}^{2}+2 \textit {\_Z} +1\right )-\ln \left (-\frac {\sqrt {-x^{2}+1}+x}{2 x^{2}-1}\right )+\frac {\ln \left (-\frac {2 \RootOf \left (2 \textit {\_Z}^{2}+2 \textit {\_Z} +1\right )^{2} x^{2}-x \sqrt {-x^{2}+1}+\RootOf \left (2 \textit {\_Z}^{2}+2 \textit {\_Z} +1\right )}{2 x^{2}-1}\right )}{2}+\ln \left (-\frac {2 \RootOf \left (2 \textit {\_Z}^{2}+2 \textit {\_Z} +1\right )^{2} x^{2}-x \sqrt {-x^{2}+1}+\RootOf \left (2 \textit {\_Z}^{2}+2 \textit {\_Z} +1\right )}{2 x^{2}-1}\right ) \RootOf \left (2 \textit {\_Z}^{2}+2 \textit {\_Z} +1\right )\) | \(185\) |
default | \(\frac {\ln \left (2 x^{2}-1\right )}{4}+\frac {\sqrt {2}\, \left (\frac {\sqrt {-4 \left (x -\frac {\sqrt {2}}{2}\right )^{2}-4 \left (x -\frac {\sqrt {2}}{2}\right ) \sqrt {2}+2}}{4}-\frac {\sqrt {2}\, \arcsin \left (x \right )}{4}-\frac {\sqrt {2}\, \arctanh \left (\frac {\left (1-\left (x -\frac {\sqrt {2}}{2}\right ) \sqrt {2}\right ) \sqrt {2}}{\sqrt {-4 \left (x -\frac {\sqrt {2}}{2}\right )^{2}-4 \left (x -\frac {\sqrt {2}}{2}\right ) \sqrt {2}+2}}\right )}{4}\right )}{2}-\frac {\sqrt {2}\, \left (\frac {\sqrt {-4 \left (x +\frac {\sqrt {2}}{2}\right )^{2}+4 \left (x +\frac {\sqrt {2}}{2}\right ) \sqrt {2}+2}}{4}+\frac {\sqrt {2}\, \arcsin \left (x \right )}{4}-\frac {\sqrt {2}\, \arctanh \left (\frac {\left (\left (x +\frac {\sqrt {2}}{2}\right ) \sqrt {2}+1\right ) \sqrt {2}}{\sqrt {-4 \left (x +\frac {\sqrt {2}}{2}\right )^{2}+4 \left (x +\frac {\sqrt {2}}{2}\right ) \sqrt {2}+2}}\right )}{4}\right )}{2}\) | \(197\) |
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 [B] Leaf count of result is larger than twice the leaf count of optimal. 84 vs.
\(2 (29) = 58\).
time = 0.39, size = 84, normalized size = 2.27 \begin {gather*} \arctan \left (\frac {\sqrt {-x^{2} + 1} - 1}{x}\right ) + \frac {1}{4} \, \log \left (2 \, x^{2} - 1\right ) + \frac {1}{4} \, \log \left (-\frac {x^{2} + \sqrt {-x^{2} + 1} {\left (x + 1\right )} - x - 1}{x^{2}}\right ) - \frac {1}{4} \, \log \left (-\frac {x^{2} - \sqrt {-x^{2} + 1} {\left (x - 1\right )} + x - 1}{x^{2}}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.08, size = 17, normalized size = 0.46 \begin {gather*} \frac {\log {\left (x - \sqrt {1 - x^{2}} \right )}}{2} - \frac {\operatorname {asin}{\left (x \right )}}{2} \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. 140 vs.
\(2 (29) = 58\).
time = 3.42, size = 140, normalized size = 3.78 \begin {gather*} -\frac {1}{4} \, \pi \mathrm {sgn}\left (x\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}{4} \, \log \left ({\left | x + \frac {1}{2} \, \sqrt {2} \right |}\right ) + \frac {1}{4} \, \log \left ({\left | x - \frac {1}{2} \, \sqrt {2} \right |}\right ) - \frac {1}{4} \, \log \left ({\left | -\frac {x}{\sqrt {-x^{2} + 1} - 1} + \frac {\sqrt {-x^{2} + 1} - 1}{x} + 2 \right |}\right ) + \frac {1}{4} \, \log \left ({\left | -\frac {x}{\sqrt {-x^{2} + 1} - 1} + \frac {\sqrt {-x^{2} + 1} - 1}{x} - 2 \right |}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.14, size = 105, normalized size = 2.84 \begin {gather*} \frac {\ln \left (x-\frac {\sqrt {2}}{2}\right )}{4}+\frac {\ln \left (x+\frac {\sqrt {2}}{2}\right )}{4}-\frac {\ln \left (\frac {\sqrt {2}\,\left (\frac {\sqrt {2}\,x}{2}-1\right )\,1{}\mathrm {i}-\sqrt {1-x^2}\,1{}\mathrm {i}}{x-\frac {\sqrt {2}}{2}}\right )}{4}+\frac {\ln \left (\frac {\sqrt {2}\,\left (\frac {\sqrt {2}\,x}{2}+1\right )\,1{}\mathrm {i}+\sqrt {1-x^2}\,1{}\mathrm {i}}{x+\frac {\sqrt {2}}{2}}\right )}{4}-\frac {\mathrm {asin}\left (x\right )}{2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________