Optimal. Leaf size=31 \[ -\sqrt{2 x^2+1}+\tan ^{-1}\left (\sqrt{2 x^2+1}\right )-x+\tan ^{-1}(x) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0423509, antiderivative size = 31, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 6, integrand size = 19, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.316, Rules used = {2107, 321, 203, 444, 50, 63} \[ -\sqrt{2 x^2+1}+\tan ^{-1}\left (\sqrt{2 x^2+1}\right )-x+\tan ^{-1}(x) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2107
Rule 321
Rule 203
Rule 444
Rule 50
Rule 63
Rubi steps
\begin{align*} \int \frac{x}{x-\sqrt{1+2 x^2}} \, dx &=-\int \frac{x^2}{1+x^2} \, dx-\int \frac{x \sqrt{1+2 x^2}}{1+x^2} \, dx\\ &=-x-\frac{1}{2} \operatorname{Subst}\left (\int \frac{\sqrt{1+2 x}}{1+x} \, dx,x,x^2\right )+\int \frac{1}{1+x^2} \, dx\\ &=-x-\sqrt{1+2 x^2}+\tan ^{-1}(x)+\frac{1}{2} \operatorname{Subst}\left (\int \frac{1}{(1+x) \sqrt{1+2 x}} \, dx,x,x^2\right )\\ &=-x-\sqrt{1+2 x^2}+\tan ^{-1}(x)+\frac{1}{2} \operatorname{Subst}\left (\int \frac{1}{\frac{1}{2}+\frac{x^2}{2}} \, dx,x,\sqrt{1+2 x^2}\right )\\ &=-x-\sqrt{1+2 x^2}+\tan ^{-1}(x)+\tan ^{-1}\left (\sqrt{1+2 x^2}\right )\\ \end{align*}
Mathematica [A] time = 0.032193, size = 31, normalized size = 1. \[ -\sqrt{2 x^2+1}+\tan ^{-1}\left (\sqrt{2 x^2+1}\right )-x+\tan ^{-1}(x) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.007, size = 28, normalized size = 0.9 \begin{align*} -x+\arctan \left ( x \right ) +\arctan \left ( \sqrt{2\,{x}^{2}+1} \right ) -\sqrt{2\,{x}^{2}+1} \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 \frac{x}{x - \sqrt{2 \, x^{2} + 1}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.44933, size = 104, normalized size = 3.35 \begin{align*} -x - \sqrt{2 \, x^{2} + 1} + \arctan \left (x\right ) - \arctan \left (-\frac{x^{2} - \sqrt{2 \, x^{2} + 1} + 1}{x^{2}}\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 \frac{x}{x - \sqrt{2 x^{2} + 1}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.16244, size = 85, normalized size = 2.74 \begin{align*} -\frac{1}{2} \, \pi - x - \sqrt{2 \, x^{2} + 1} + \arctan \left (x\right ) + \arctan \left (-\frac{{\left (\sqrt{2} x - \sqrt{2 \, x^{2} + 1}\right )}^{2} + 1}{2 \,{\left (\sqrt{2} x - \sqrt{2 \, x^{2} + 1}\right )}}\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]