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

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 18, antiderivative size = 21 \[ \int \frac {1}{(-2+x) \sqrt {2+x-x^2}} \, dx=\frac {2 \sqrt {2+x-x^2}}{3 (-2+x)} \]

[Out]

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

Rubi [A] (verified)

Time = 0.00 (sec) , antiderivative size = 23, normalized size of antiderivative = 1.10, number of steps used = 1, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.056, Rules used = {664} \[ \int \frac {1}{(-2+x) \sqrt {2+x-x^2}} \, dx=-\frac {2 \sqrt {-x^2+x+2}}{3 (2-x)} \]

[In]

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

[Out]

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

Rule 664

Int[((d_.) + (e_.)*(x_))^(m_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[e*(d + e*x)^m*((a +
b*x + c*x^2)^(p + 1)/((p + 1)*(2*c*d - b*e))), x] /; FreeQ[{a, b, c, d, e, m, p}, x] && NeQ[b^2 - 4*a*c, 0] &&
 EqQ[c*d^2 - b*d*e + a*e^2, 0] &&  !IntegerQ[p] && EqQ[m + 2*p + 2, 0]

Rubi steps \begin{align*} \text {integral}& = -\frac {2 \sqrt {2+x-x^2}}{3 (2-x)} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.14 (sec) , antiderivative size = 21, normalized size of antiderivative = 1.00 \[ \int \frac {1}{(-2+x) \sqrt {2+x-x^2}} \, dx=\frac {2 \sqrt {2+x-x^2}}{3 (-2+x)} \]

[In]

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

[Out]

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

Maple [A] (verified)

Time = 0.28 (sec) , antiderivative size = 16, normalized size of antiderivative = 0.76

method result size
gosper \(-\frac {2 \left (1+x \right )}{3 \sqrt {-x^{2}+x +2}}\) \(16\)
risch \(-\frac {2 \left (1+x \right )}{3 \sqrt {-x^{2}+x +2}}\) \(16\)
trager \(\frac {2 \sqrt {-x^{2}+x +2}}{3 \left (-2+x \right )}\) \(18\)
default \(\frac {2 \sqrt {-\left (-2+x \right )^{2}+6-3 x}}{3 \left (-2+x \right )}\) \(22\)

[In]

int(1/(-2+x)/(-x^2+x+2)^(1/2),x,method=_RETURNVERBOSE)

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.81 \[ \int \frac {1}{(-2+x) \sqrt {2+x-x^2}} \, dx=\frac {2 \, \sqrt {-x^{2} + x + 2}}{3 \, {\left (x - 2\right )}} \]

[In]

integrate(1/(-2+x)/(-x^2+x+2)^(1/2),x, algorithm="fricas")

[Out]

2/3*sqrt(-x^2 + x + 2)/(x - 2)

Sympy [F]

\[ \int \frac {1}{(-2+x) \sqrt {2+x-x^2}} \, dx=\int \frac {1}{\sqrt {- \left (x - 2\right ) \left (x + 1\right )} \left (x - 2\right )}\, dx \]

[In]

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

[Out]

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

Maxima [A] (verification not implemented)

none

Time = 0.30 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.81 \[ \int \frac {1}{(-2+x) \sqrt {2+x-x^2}} \, dx=\frac {2 \, \sqrt {-x^{2} + x + 2}}{3 \, {\left (x - 2\right )}} \]

[In]

integrate(1/(-2+x)/(-x^2+x+2)^(1/2),x, algorithm="maxima")

[Out]

2/3*sqrt(-x^2 + x + 2)/(x - 2)

Giac [A] (verification not implemented)

none

Time = 0.32 (sec) , antiderivative size = 28, normalized size of antiderivative = 1.33 \[ \int \frac {1}{(-2+x) \sqrt {2+x-x^2}} \, dx=-\frac {4}{3 \, {\left (\frac {2 \, \sqrt {-x^{2} + x + 2} - 3}{2 \, x - 1} + 1\right )}} \]

[In]

integrate(1/(-2+x)/(-x^2+x+2)^(1/2),x, algorithm="giac")

[Out]

-4/3/((2*sqrt(-x^2 + x + 2) - 3)/(2*x - 1) + 1)

Mupad [B] (verification not implemented)

Time = 0.30 (sec) , antiderivative size = 19, normalized size of antiderivative = 0.90 \[ \int \frac {1}{(-2+x) \sqrt {2+x-x^2}} \, dx=\frac {2\,\sqrt {-x^2+x+2}}{3\,\left (x-2\right )} \]

[In]

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

[Out]

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