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

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

[Out]

(-2*ArcTan[(1 - 2*x)/Sqrt[7]])/Sqrt[7]

_______________________________________________________________________________________

Rubi [A]  time = 0.0257762, antiderivative size = 19, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 10, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.2 \[ -\frac{2 \tan ^{-1}\left (\frac{1-2 x}{\sqrt{7}}\right )}{\sqrt{7}} \]

Antiderivative was successfully verified.

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

[Out]

(-2*ArcTan[(1 - 2*x)/Sqrt[7]])/Sqrt[7]

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 0.663014, size = 22, normalized size = 1.16 \[ \frac{2 \sqrt{7} \operatorname{atan}{\left (\sqrt{7} \left (\frac{2 x}{7} - \frac{1}{7}\right ) \right )}}{7} \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

2*sqrt(7)*atan(sqrt(7)*(2*x/7 - 1/7))/7

_______________________________________________________________________________________

Mathematica [A]  time = 0.00933582, size = 19, normalized size = 1. \[ \frac{2 \tan ^{-1}\left (\frac{2 x-1}{\sqrt{7}}\right )}{\sqrt{7}} \]

Antiderivative was successfully verified.

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

[Out]

(2*ArcTan[(-1 + 2*x)/Sqrt[7]])/Sqrt[7]

_______________________________________________________________________________________

Maple [A]  time = 0.004, size = 17, normalized size = 0.9 \[{\frac{2\,\sqrt{7}}{7}\arctan \left ({\frac{ \left ( 2\,x-1 \right ) \sqrt{7}}{7}} \right ) } \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

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

_______________________________________________________________________________________

Maxima [A]  time = 1.5319, size = 22, normalized size = 1.16 \[ \frac{2}{7} \, \sqrt{7} \arctan \left (\frac{1}{7} \, \sqrt{7}{\left (2 \, x - 1\right )}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

2/7*sqrt(7)*arctan(1/7*sqrt(7)*(2*x - 1))

_______________________________________________________________________________________

Fricas [A]  time = 0.194369, size = 22, normalized size = 1.16 \[ \frac{2}{7} \, \sqrt{7} \arctan \left (\frac{1}{7} \, \sqrt{7}{\left (2 \, x - 1\right )}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

2/7*sqrt(7)*arctan(1/7*sqrt(7)*(2*x - 1))

_______________________________________________________________________________________

Sympy [A]  time = 0.093559, size = 26, normalized size = 1.37 \[ \frac{2 \sqrt{7} \operatorname{atan}{\left (\frac{2 \sqrt{7} x}{7} - \frac{\sqrt{7}}{7} \right )}}{7} \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

2*sqrt(7)*atan(2*sqrt(7)*x/7 - sqrt(7)/7)/7

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.224673, size = 22, normalized size = 1.16 \[ \frac{2}{7} \, \sqrt{7} \arctan \left (\frac{1}{7} \, \sqrt{7}{\left (2 \, x - 1\right )}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

2/7*sqrt(7)*arctan(1/7*sqrt(7)*(2*x - 1))