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

Optimal. Leaf size=8 \[ -\arctan (1-x) \]

[Out]

arctan(x-1)

________________________________________________________________________________________

Rubi [A]
time = 0.00, antiderivative size = 8, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {631, 210} \begin {gather*} -\arctan (1-x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

-ArcTan[1 - x]

Rule 210

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[-b, 2])^(-1))*ArcTan[Rt[-b, 2]*(x/Rt[-a, 2])
], x] /; FreeQ[{a, b}, x] && PosQ[a/b] && (LtQ[a, 0] || LtQ[b, 0])

Rule 631

Int[((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> With[{q = 1 - 4*Simplify[a*(c/b^2)]}, Dist[-2/b, Sub
st[Int[1/(q - x^2), x], x, 1 + 2*c*(x/b)], x] /; RationalQ[q] && (EqQ[q^2, 1] ||  !RationalQ[b^2 - 4*a*c])] /;
 FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rubi steps

\begin {gather*} \begin {aligned} \text {Integral} &=\text {Subst}\left (\int \frac {1}{-1-x^2} \, dx,x,1-x\right )\\ &=-\arctan (1-x)\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]
time = 0.00, size = 8, normalized size = 1.00 \begin {gather*} -\arctan (1-x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

-ArcTan[1 - x]

________________________________________________________________________________________

Maple [A]
time = 0.14, size = 5, normalized size = 0.62

method result size
default \(\arctan \left (x -1\right )\) \(5\)
risch \(\arctan \left (x -1\right )\) \(5\)
parallelrisch \(\frac {i \ln \left (x -1+i\right )}{2}-\frac {i \ln \left (x -1-i\right )}{2}\) \(20\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

arctan(x-1)

________________________________________________________________________________________

Maxima [A]
time = 0.47, size = 4, normalized size = 0.50 \begin {gather*} \arctan \left (x - 1\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

arctan(x - 1)

________________________________________________________________________________________

Fricas [A]
time = 0.56, size = 4, normalized size = 0.50 \begin {gather*} \arctan \left (x - 1\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

arctan(x - 1)

________________________________________________________________________________________

Sympy [A]
time = 0.04, size = 3, normalized size = 0.38 \begin {gather*} \operatorname {atan}{\left (x - 1 \right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

atan(x - 1)

________________________________________________________________________________________

Giac [A]
time = 0.52, size = 4, normalized size = 0.50 \begin {gather*} \arctan \left (x - 1\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

arctan(x - 1)

________________________________________________________________________________________

Mupad [B]
time = 0.09, size = 4, normalized size = 0.50 \begin {gather*} \mathrm {atan}\left (x-1\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

atan(x - 1)

________________________________________________________________________________________

Chatgpt [A]
time = 1.00, size = 4, normalized size = 0.50 \begin {gather*} \arctan \left (x -1\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

arctan(x-1)

________________________________________________________________________________________