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

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

Optimal result

Integrand size = 12, antiderivative size = 24 \[ \int \frac {5}{1-2 x+x^2} \, dx=10+\frac {5}{1-x}-\frac {3}{1+e^2-\log (5)} \]

[Out]

10-3/(1+exp(2)-ln(5))+5/(1-x)

Rubi [A] (verified)

Time = 0.00 (sec) , antiderivative size = 9, normalized size of antiderivative = 0.38, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {12, 27, 32} \[ \int \frac {5}{1-2 x+x^2} \, dx=\frac {5}{1-x} \]

[In]

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

[Out]

5/(1 - x)

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 27

Int[(u_.)*((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[u*Cancel[(b/2 + c*x)^(2*p)/c^p], x] /; Fr
eeQ[{a, b, c}, x] && EqQ[b^2 - 4*a*c, 0] && IntegerQ[p]

Rule 32

Int[((a_.) + (b_.)*(x_))^(m_), x_Symbol] :> Simp[(a + b*x)^(m + 1)/(b*(m + 1)), x] /; FreeQ[{a, b, m}, x] && N
eQ[m, -1]

Rubi steps \begin{align*} \text {integral}& = 5 \int \frac {1}{1-2 x+x^2} \, dx \\ & = 5 \int \frac {1}{(-1+x)^2} \, dx \\ & = \frac {5}{1-x} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.00 (sec) , antiderivative size = 7, normalized size of antiderivative = 0.29 \[ \int \frac {5}{1-2 x+x^2} \, dx=-\frac {5}{-1+x} \]

[In]

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

[Out]

-5/(-1 + x)

Maple [A] (verified)

Time = 0.57 (sec) , antiderivative size = 8, normalized size of antiderivative = 0.33

method result size
gosper \(-\frac {5}{-1+x}\) \(8\)
default \(-\frac {5}{-1+x}\) \(8\)
norman \(-\frac {5}{-1+x}\) \(8\)
risch \(-\frac {5}{-1+x}\) \(8\)
parallelrisch \(-\frac {5}{-1+x}\) \(8\)
meijerg \(\frac {5 x}{1-x}\) \(11\)

[In]

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

[Out]

-5/(-1+x)

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 7, normalized size of antiderivative = 0.29 \[ \int \frac {5}{1-2 x+x^2} \, dx=-\frac {5}{x - 1} \]

[In]

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

[Out]

-5/(x - 1)

Sympy [A] (verification not implemented)

Time = 0.04 (sec) , antiderivative size = 5, normalized size of antiderivative = 0.21 \[ \int \frac {5}{1-2 x+x^2} \, dx=- \frac {5}{x - 1} \]

[In]

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

[Out]

-5/(x - 1)

Maxima [A] (verification not implemented)

none

Time = 0.19 (sec) , antiderivative size = 7, normalized size of antiderivative = 0.29 \[ \int \frac {5}{1-2 x+x^2} \, dx=-\frac {5}{x - 1} \]

[In]

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

[Out]

-5/(x - 1)

Giac [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 7, normalized size of antiderivative = 0.29 \[ \int \frac {5}{1-2 x+x^2} \, dx=-\frac {5}{x - 1} \]

[In]

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

[Out]

-5/(x - 1)

Mupad [B] (verification not implemented)

Time = 0.05 (sec) , antiderivative size = 7, normalized size of antiderivative = 0.29 \[ \int \frac {5}{1-2 x+x^2} \, dx=-\frac {5}{x-1} \]

[In]

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

[Out]

-5/(x - 1)