3.827 \(\int \frac{x}{x-\sqrt{1+2 x^2}} \, dx\)

Optimal. Leaf size=31 \[ -\sqrt{2 x^2+1}+\tan ^{-1}\left (\sqrt{2 x^2+1}\right )-x+\tan ^{-1}(x) \]

[Out]

-x - Sqrt[1 + 2*x^2] + ArcTan[x] + ArcTan[Sqrt[1 + 2*x^2]]

_______________________________________________________________________________________

Rubi [A]  time = 0.0979391, 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 \[ -\sqrt{2 x^2+1}+\tan ^{-1}\left (\sqrt{2 x^2+1}\right )-x+\tan ^{-1}(x) \]

Antiderivative was successfully verified.

[In]  Int[x/(x - Sqrt[1 + 2*x^2]),x]

[Out]

-x - Sqrt[1 + 2*x^2] + ArcTan[x] + ArcTan[Sqrt[1 + 2*x^2]]

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 6.94545, size = 26, normalized size = 0.84 \[ - x - \sqrt{2 x^{2} + 1} + \operatorname{atan}{\left (x \right )} + \operatorname{atan}{\left (\sqrt{2 x^{2} + 1} \right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate(x/(x-(2*x**2+1)**(1/2)),x)

[Out]

-x - sqrt(2*x**2 + 1) + atan(x) + atan(sqrt(2*x**2 + 1))

_______________________________________________________________________________________

Mathematica [C]  time = 0.0649585, size = 101, normalized size = 3.26 \[ \frac{1}{4} \left (-4 \sqrt{2 x^2+1}+2 i \log \left (x^2+1\right )-i \log \left (3 x^2-2 \sqrt{2 x^2+1} x+1\right )-i \log \left (3 x^2+2 \sqrt{2 x^2+1} x+1\right )-4 \tan ^{-1}\left (\frac{1}{\sqrt{2 x^2+1}}\right )-4 x+4 \tan ^{-1}(x)\right ) \]

Antiderivative was successfully verified.

[In]  Integrate[x/(x - Sqrt[1 + 2*x^2]),x]

[Out]

(-4*x - 4*Sqrt[1 + 2*x^2] + 4*ArcTan[x] - 4*ArcTan[1/Sqrt[1 + 2*x^2]] + (2*I)*Lo
g[1 + x^2] - I*Log[1 + 3*x^2 - 2*x*Sqrt[1 + 2*x^2]] - I*Log[1 + 3*x^2 + 2*x*Sqrt
[1 + 2*x^2]])/4

_______________________________________________________________________________________

Maple [A]  time = 0.01, size = 28, normalized size = 0.9 \[ -x+\arctan \left ( x \right ) +\arctan \left ( \sqrt{2\,{x}^{2}+1} \right ) -\sqrt{2\,{x}^{2}+1} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int(x/(x-(2*x^2+1)^(1/2)),x)

[Out]

-x+arctan(x)+arctan((2*x^2+1)^(1/2))-(2*x^2+1)^(1/2)

_______________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \[ \int \frac{x}{x - \sqrt{2 \, x^{2} + 1}}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(x/(x - sqrt(2*x^2 + 1)),x, algorithm="maxima")

[Out]

integrate(x/(x - sqrt(2*x^2 + 1)), x)

_______________________________________________________________________________________

Fricas [A]  time = 0.264969, size = 103, normalized size = 3.32 \[ -\frac{2 \, x^{2} +{\left (\sqrt{2 \, x^{2} + 1} - 1\right )} \arctan \left (-\frac{x^{2} - \sqrt{2 \, x^{2} + 1} + 1}{x^{2}}\right ) + \sqrt{2 \, x^{2} + 1}{\left (x - \arctan \left (x\right )\right )} - x + \arctan \left (x\right )}{\sqrt{2 \, x^{2} + 1} - 1} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(x/(x - sqrt(2*x^2 + 1)),x, algorithm="fricas")

[Out]

-(2*x^2 + (sqrt(2*x^2 + 1) - 1)*arctan(-(x^2 - sqrt(2*x^2 + 1) + 1)/x^2) + sqrt(
2*x^2 + 1)*(x - arctan(x)) - x + arctan(x))/(sqrt(2*x^2 + 1) - 1)

_______________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \[ \int \frac{x}{x - \sqrt{2 x^{2} + 1}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(x/(x-(2*x**2+1)**(1/2)),x)

[Out]

Integral(x/(x - sqrt(2*x**2 + 1)), x)

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.269298, size = 85, normalized size = 2.74 \[ -\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 ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(x/(x - sqrt(2*x^2 + 1)),x, algorithm="giac")

[Out]

-1/2*pi - x - sqrt(2*x^2 + 1) + arctan(x) + arctan(-1/2*((sqrt(2)*x - sqrt(2*x^2
 + 1))^2 + 1)/(sqrt(2)*x - sqrt(2*x^2 + 1)))