Optimal. Leaf size=68 \[ -\frac{\sqrt{-x^2-x+2}}{x}+\frac{\tanh ^{-1}\left (\frac{4-x}{2 \sqrt{2} \sqrt{-x^2-x+2}}\right )}{2 \sqrt{2}}+\sin ^{-1}\left (\frac{1}{3} (-2 x-1)\right ) \]
[Out]
_______________________________________________________________________________________
Rubi [A] time = 0.100346, antiderivative size = 68, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 6, integrand size = 18, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.333 \[ -\frac{\sqrt{-x^2-x+2}}{x}+\frac{\tanh ^{-1}\left (\frac{4-x}{2 \sqrt{2} \sqrt{-x^2-x+2}}\right )}{2 \sqrt{2}}+\sin ^{-1}\left (\frac{1}{3} (-2 x-1)\right ) \]
Antiderivative was successfully verified.
[In] Int[Sqrt[2 - x - x^2]/x^2,x]
[Out]
_______________________________________________________________________________________
Rubi in Sympy [A] time = 5.7675, size = 61, normalized size = 0.9 \[ - \operatorname{atan}{\left (- \frac{- 2 x - 1}{2 \sqrt{- x^{2} - x + 2}} \right )} + \frac{\sqrt{2} \operatorname{atanh}{\left (\frac{\sqrt{2} \left (- x + 4\right )}{4 \sqrt{- x^{2} - x + 2}} \right )}}{4} - \frac{\sqrt{- x^{2} - x + 2}}{x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] rubi_integrate((-x**2-x+2)**(1/2)/x**2,x)
[Out]
_______________________________________________________________________________________
Mathematica [A] time = 0.0649716, size = 77, normalized size = 1.13 \[ -\frac{\sqrt{-x^2-x+2}}{x}+\frac{\log \left (2 \sqrt{2} \sqrt{-x^2-x+2}-x+4\right )}{2 \sqrt{2}}-\frac{\log (x)}{2 \sqrt{2}}+\sin ^{-1}\left (\frac{1}{3} (-2 x-1)\right ) \]
Antiderivative was successfully verified.
[In] Integrate[Sqrt[2 - x - x^2]/x^2,x]
[Out]
_______________________________________________________________________________________
Maple [A] time = 0.007, size = 88, normalized size = 1.3 \[ -{\frac{1}{2\,x} \left ( -{x}^{2}-x+2 \right ) ^{{\frac{3}{2}}}}-{\frac{1}{4}\sqrt{-{x}^{2}-x+2}}-\arcsin \left ({\frac{1}{3}}+{\frac{2\,x}{3}} \right ) +{\frac{\sqrt{2}}{4}{\it Artanh} \left ({\frac{ \left ( 4-x \right ) \sqrt{2}}{4}{\frac{1}{\sqrt{-{x}^{2}-x+2}}}} \right ) }+{\frac{-1-2\,x}{4}\sqrt{-{x}^{2}-x+2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] int((-x^2-x+2)^(1/2)/x^2,x)
[Out]
_______________________________________________________________________________________
Maxima [A] time = 1.59728, size = 80, normalized size = 1.18 \[ \frac{1}{4} \, \sqrt{2} \log \left (\frac{2 \, \sqrt{2} \sqrt{-x^{2} - x + 2}}{{\left | x \right |}} + \frac{4}{{\left | x \right |}} - 1\right ) - \frac{\sqrt{-x^{2} - x + 2}}{x} + \arcsin \left (-\frac{2}{3} \, x - \frac{1}{3}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate(sqrt(-x^2 - x + 2)/x^2,x, algorithm="maxima")
[Out]
_______________________________________________________________________________________
Fricas [A] time = 0.209001, size = 126, normalized size = 1.85 \[ -\frac{\sqrt{2}{\left (4 \, \sqrt{2} x \arctan \left (\frac{2 \, x + 1}{2 \, \sqrt{-x^{2} - x + 2}}\right ) - x \log \left (-\frac{\sqrt{2}{\left (7 \, x^{2} + 16 \, x - 32\right )} + 8 \, \sqrt{-x^{2} - x + 2}{\left (x - 4\right )}}{x^{2}}\right ) + 4 \, \sqrt{2} \sqrt{-x^{2} - x + 2}\right )}}{8 \, x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate(sqrt(-x^2 - x + 2)/x^2,x, algorithm="fricas")
[Out]
_______________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \[ \int \frac{\sqrt{- \left (x - 1\right ) \left (x + 2\right )}}{x^{2}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((-x**2-x+2)**(1/2)/x**2,x)
[Out]
_______________________________________________________________________________________
GIAC/XCAS [A] time = 0.233224, size = 227, normalized size = 3.34 \[ -\frac{1}{4} \, \sqrt{2}{\rm ln}\left (\frac{{\left | -4 \, \sqrt{2} + \frac{2 \,{\left (2 \, \sqrt{-x^{2} - x + 2} - 3\right )}}{2 \, x + 1} + 6 \right |}}{{\left | 4 \, \sqrt{2} + \frac{2 \,{\left (2 \, \sqrt{-x^{2} - x + 2} - 3\right )}}{2 \, x + 1} + 6 \right |}}\right ) + \frac{6 \,{\left (\frac{3 \,{\left (2 \, \sqrt{-x^{2} - x + 2} - 3\right )}}{2 \, x + 1} + 1\right )}}{\frac{6 \,{\left (2 \, \sqrt{-x^{2} - x + 2} - 3\right )}}{2 \, x + 1} + \frac{{\left (2 \, \sqrt{-x^{2} - x + 2} - 3\right )}^{2}}{{\left (2 \, x + 1\right )}^{2}} + 1} - \arcsin \left (\frac{2}{3} \, x + \frac{1}{3}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate(sqrt(-x^2 - x + 2)/x^2,x, algorithm="giac")
[Out]