3.738 \(\int \frac{\sqrt{-2 x^2+x^4}}{\left (-1+x^2\right ) \left (2+x^2\right )} \, dx\)

Optimal. Leaf size=83 \[ \frac{2 \sqrt{x^4-2 x^2} \tan ^{-1}\left (\frac{\sqrt{x^2-2}}{2}\right )}{3 x \sqrt{x^2-2}}-\frac{\sqrt{x^4-2 x^2} \tan ^{-1}\left (\sqrt{x^2-2}\right )}{3 x \sqrt{x^2-2}} \]

[Out]

(2*Sqrt[-2*x^2 + x^4]*ArcTan[Sqrt[-2 + x^2]/2])/(3*x*Sqrt[-2 + x^2]) - (Sqrt[-2*
x^2 + x^4]*ArcTan[Sqrt[-2 + x^2]])/(3*x*Sqrt[-2 + x^2])

_______________________________________________________________________________________

Rubi [A]  time = 0.311982, antiderivative size = 83, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 5, integrand size = 28, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.179 \[ \frac{2 \sqrt{x^4-2 x^2} \tan ^{-1}\left (\frac{\sqrt{x^2-2}}{2}\right )}{3 x \sqrt{x^2-2}}-\frac{\sqrt{x^4-2 x^2} \tan ^{-1}\left (\sqrt{x^2-2}\right )}{3 x \sqrt{x^2-2}} \]

Antiderivative was successfully verified.

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

[Out]

(2*Sqrt[-2*x^2 + x^4]*ArcTan[Sqrt[-2 + x^2]/2])/(3*x*Sqrt[-2 + x^2]) - (Sqrt[-2*
x^2 + x^4]*ArcTan[Sqrt[-2 + x^2]])/(3*x*Sqrt[-2 + x^2])

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 24.3553, size = 70, normalized size = 0.84 \[ \frac{2 \sqrt{x^{4} - 2 x^{2}} \operatorname{atan}{\left (\frac{\sqrt{x^{2} - 2}}{2} \right )}}{3 x \sqrt{x^{2} - 2}} - \frac{\sqrt{x^{4} - 2 x^{2}} \operatorname{atan}{\left (\sqrt{x^{2} - 2} \right )}}{3 x \sqrt{x^{2} - 2}} \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

2*sqrt(x**4 - 2*x**2)*atan(sqrt(x**2 - 2)/2)/(3*x*sqrt(x**2 - 2)) - sqrt(x**4 -
2*x**2)*atan(sqrt(x**2 - 2))/(3*x*sqrt(x**2 - 2))

_______________________________________________________________________________________

Mathematica [A]  time = 0.0423178, size = 52, normalized size = 0.63 \[ -\frac{x \sqrt{x^2-2} \left (2 \tan ^{-1}\left (\frac{2}{\sqrt{x^2-2}}\right )+\tan ^{-1}\left (\sqrt{x^2-2}\right )\right )}{3 \sqrt{x^2 \left (x^2-2\right )}} \]

Antiderivative was successfully verified.

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

[Out]

-(x*Sqrt[-2 + x^2]*(2*ArcTan[2/Sqrt[-2 + x^2]] + ArcTan[Sqrt[-2 + x^2]]))/(3*Sqr
t[x^2*(-2 + x^2)])

_______________________________________________________________________________________

Maple [A]  time = 0.039, size = 63, normalized size = 0.8 \[{\frac{1}{6\,x}\sqrt{{x}^{4}-2\,{x}^{2}} \left ( \arctan \left ({(2+x){\frac{1}{\sqrt{{x}^{2}-2}}}} \right ) -\arctan \left ({(x-2){\frac{1}{\sqrt{{x}^{2}-2}}}} \right ) +4\,\arctan \left ( 1/2\,\sqrt{{x}^{2}-2} \right ) \right ){\frac{1}{\sqrt{{x}^{2}-2}}}} \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

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

_______________________________________________________________________________________

Maxima [A]  time = 0.828996, size = 31, normalized size = 0.37 \[ \frac{2}{3} \, \arctan \left (\frac{1}{2} \, \sqrt{x^{2} - 2}\right ) - \frac{1}{3} \, \arctan \left (\sqrt{x^{2} - 2}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

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

_______________________________________________________________________________________

Fricas [A]  time = 0.285729, size = 122, normalized size = 1.47 \[ \frac{1}{3} \, \arctan \left (\frac{x^{3} - \sqrt{x^{4} - 2 \, x^{2}} x - 2 \, x}{x^{2} - \sqrt{x^{4} - 2 \, x^{2}}}\right ) - \frac{2}{3} \, \arctan \left (\frac{x^{3} - \sqrt{x^{4} - 2 \, x^{2}} x - 2 \, x}{2 \,{\left (x^{2} - \sqrt{x^{4} - 2 \, x^{2}}\right )}}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

1/3*arctan((x^3 - sqrt(x^4 - 2*x^2)*x - 2*x)/(x^2 - sqrt(x^4 - 2*x^2))) - 2/3*ar
ctan(1/2*(x^3 - sqrt(x^4 - 2*x^2)*x - 2*x)/(x^2 - sqrt(x^4 - 2*x^2)))

_______________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

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

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.286085, size = 65, normalized size = 0.78 \[ \frac{1}{3} \,{\left (\arctan \left (\sqrt{2} i\right ) - 2 \, \arctan \left (\frac{1}{2} \, \sqrt{2} i\right )\right )}{\rm sign}\left (x\right ) + \frac{1}{3} \,{\left (2 \, \arctan \left (\frac{1}{2} \, \sqrt{x^{2} - 2}\right ) - \arctan \left (\sqrt{x^{2} - 2}\right )\right )}{\rm sign}\left (x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

1/3*(arctan(sqrt(2)*i) - 2*arctan(1/2*sqrt(2)*i))*sign(x) + 1/3*(2*arctan(1/2*sq
rt(x^2 - 2)) - arctan(sqrt(x^2 - 2)))*sign(x)