Optimal. Leaf size=40 \[ -\sqrt {2} \sinh ^{-1}\left (\sqrt {2} x\right )+\tanh ^{-1}\left (\frac {x}{\sqrt {1+2 x^2}}\right )-\frac {1}{2} \log \left (1+x^2\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, antiderivative size = 40, 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,
221, 385, 212} \begin {gather*} -\frac {1}{2} \log \left (x^2+1\right )+\tanh ^{-1}\left (\frac {x}{\sqrt {2 x^2+1}}\right )-\sqrt {2} \sinh ^{-1}\left (\sqrt {2} x\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 212
Rule 221
Rule 266
Rule 385
Rule 399
Rule 6874
Rubi steps
\begin {align*} \int \frac {1}{x-\sqrt {1+2 x^2}} \, dx &=\int \left (-\frac {x}{1+x^2}-\frac {\sqrt {1+2 x^2}}{1+x^2}\right ) \, dx\\ &=-\int \frac {x}{1+x^2} \, dx-\int \frac {\sqrt {1+2 x^2}}{1+x^2} \, dx\\ &=-\frac {1}{2} \log \left (1+x^2\right )-2 \int \frac {1}{\sqrt {1+2 x^2}} \, dx+\int \frac {1}{\left (1+x^2\right ) \sqrt {1+2 x^2}} \, dx\\ &=-\sqrt {2} \sinh ^{-1}\left (\sqrt {2} x\right )-\frac {1}{2} \log \left (1+x^2\right )+\text {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\frac {x}{\sqrt {1+2 x^2}}\right )\\ &=-\sqrt {2} \sinh ^{-1}\left (\sqrt {2} x\right )+\tanh ^{-1}\left (\frac {x}{\sqrt {1+2 x^2}}\right )-\frac {1}{2} \log \left (1+x^2\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.10, size = 68, normalized size = 1.70 \begin {gather*} \left (1+\sqrt {2}\right ) \log \left (2 \left (-1+\sqrt {2}\right ) x+\left (-2+\sqrt {2}\right ) \sqrt {1+2 x^2}\right )-\log \left (-2+\sqrt {2}-2 x^2+x \sqrt {2+4 x^2}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.13, size = 33, normalized size = 0.82
method | result | size |
default | \(\arctanh \left (\frac {x}{\sqrt {2 x^{2}+1}}\right )-\frac {\ln \left (x^{2}+1\right )}{2}-\arcsinh \left (\sqrt {2}\, x \right ) \sqrt {2}\) | \(33\) |
trager | \(\RootOf \left (\textit {\_Z}^{2}-2 \textit {\_Z} -1\right ) \ln \left (\frac {x +\sqrt {2 x^{2}+1}}{x^{2}+1}\right )-\ln \left (\frac {\RootOf \left (\textit {\_Z}^{2}-2 \textit {\_Z} -1\right )^{2} x^{2}+3 \RootOf \left (\textit {\_Z}^{2}-2 \textit {\_Z} -1\right ) \sqrt {2 x^{2}+1}\, x +2 \RootOf \left (\textit {\_Z}^{2}-2 \textit {\_Z} -1\right ) x^{2}+x \sqrt {2 x^{2}+1}+x^{2}+\RootOf \left (\textit {\_Z}^{2}-2 \textit {\_Z} -1\right )+1}{x^{2}+1}\right ) \RootOf \left (\textit {\_Z}^{2}-2 \textit {\_Z} -1\right )+\ln \left (\frac {\RootOf \left (\textit {\_Z}^{2}-2 \textit {\_Z} -1\right )^{2} x^{2}+3 \RootOf \left (\textit {\_Z}^{2}-2 \textit {\_Z} -1\right ) \sqrt {2 x^{2}+1}\, x +2 \RootOf \left (\textit {\_Z}^{2}-2 \textit {\_Z} -1\right ) x^{2}+x \sqrt {2 x^{2}+1}+x^{2}+\RootOf \left (\textit {\_Z}^{2}-2 \textit {\_Z} -1\right )+1}{x^{2}+1}\right )\) | \(211\) |
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. 90 vs.
\(2 (32) = 64\).
time = 0.34, size = 90, normalized size = 2.25 \begin {gather*} \sqrt {2} \log \left (\sqrt {2} x - \sqrt {2 \, x^{2} + 1}\right ) - \frac {1}{2} \, \log \left (x^{2} + 1\right ) - \frac {1}{2} \, \log \left (\frac {2 \, x^{2} - \sqrt {2 \, x^{2} + 1} {\left (x + 1\right )} + x + 1}{x^{2}}\right ) + \frac {1}{2} \, \log \left (\frac {2 \, x^{2} + \sqrt {2 \, 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.07, size = 27, normalized size = 0.68 \begin {gather*} - \log {\left (- x + \sqrt {2 x^{2} + 1} \right )} - \sqrt {2} \operatorname {asinh}{\left (\sqrt {2} x \right )} \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. 88 vs.
\(2 (32) = 64\).
time = 3.65, size = 88, normalized size = 2.20 \begin {gather*} \sqrt {2} \log \left (-\sqrt {2} x + \sqrt {2 \, x^{2} + 1}\right ) + \frac {1}{2} \, \log \left ({\left (\sqrt {2} x - \sqrt {2 \, x^{2} + 1}\right )}^{2} + 2 \, \sqrt {2} + 3\right ) - \frac {1}{2} \, \log \left ({\left (\sqrt {2} x - \sqrt {2 \, x^{2} + 1}\right )}^{2} - 2 \, \sqrt {2} + 3\right ) - \frac {1}{2} \, \log \left (x^{2} + 1\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 3.50, size = 57, normalized size = 1.42 \begin {gather*} -\ln \left (x-\mathrm {i}\right )-\frac {\ln \left (x-\frac {\sqrt {2}\,\sqrt {x^2+\frac {1}{2}}}{2}+\frac {1}{2}{}\mathrm {i}\right )}{2}+\frac {\ln \left (x+\frac {\sqrt {2}\,\sqrt {x^2+\frac {1}{2}}}{2}-\frac {1}{2}{}\mathrm {i}\right )}{2}-\sqrt {2}\,\mathrm {asinh}\left (\sqrt {2}\,x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________