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

   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 = 21, antiderivative size = 14 \[ \int \frac {1}{\left (4-4 x+x^2\right ) \left (5-4 x+x^2\right )} \, dx=\frac {1}{2-x}+\arctan (2-x) \]

[Out]

1/(2-x)-arctan(-2+x)

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 14, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {27, 707, 632, 210} \[ \int \frac {1}{\left (4-4 x+x^2\right ) \left (5-4 x+x^2\right )} \, dx=\arctan (2-x)+\frac {1}{2-x} \]

[In]

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

[Out]

(2 - x)^(-1) + ArcTan[2 - 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 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 632

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 707

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

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

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 14, normalized size of antiderivative = 1.00 \[ \int \frac {1}{\left (4-4 x+x^2\right ) \left (5-4 x+x^2\right )} \, dx=-\frac {1}{-2+x}+\arctan (2-x) \]

[In]

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

[Out]

-(-2 + x)^(-1) + ArcTan[2 - x]

Maple [A] (verified)

Time = 0.24 (sec) , antiderivative size = 15, normalized size of antiderivative = 1.07

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

[In]

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

[Out]

-1/(-2+x)-arctan(-2+x)

Fricas [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 17, normalized size of antiderivative = 1.21 \[ \int \frac {1}{\left (4-4 x+x^2\right ) \left (5-4 x+x^2\right )} \, dx=-\frac {{\left (x - 2\right )} \arctan \left (x - 2\right ) + 1}{x - 2} \]

[In]

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

[Out]

-((x - 2)*arctan(x - 2) + 1)/(x - 2)

Sympy [A] (verification not implemented)

Time = 0.08 (sec) , antiderivative size = 10, normalized size of antiderivative = 0.71 \[ \int \frac {1}{\left (4-4 x+x^2\right ) \left (5-4 x+x^2\right )} \, dx=- \operatorname {atan}{\left (x - 2 \right )} - \frac {1}{x - 2} \]

[In]

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

[Out]

-atan(x - 2) - 1/(x - 2)

Maxima [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 14, normalized size of antiderivative = 1.00 \[ \int \frac {1}{\left (4-4 x+x^2\right ) \left (5-4 x+x^2\right )} \, dx=-\frac {1}{x - 2} - \arctan \left (x - 2\right ) \]

[In]

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

[Out]

-1/(x - 2) - arctan(x - 2)

Giac [A] (verification not implemented)

none

Time = 0.30 (sec) , antiderivative size = 14, normalized size of antiderivative = 1.00 \[ \int \frac {1}{\left (4-4 x+x^2\right ) \left (5-4 x+x^2\right )} \, dx=-\frac {1}{x - 2} - \arctan \left (x - 2\right ) \]

[In]

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

[Out]

-1/(x - 2) - arctan(x - 2)

Mupad [B] (verification not implemented)

Time = 0.09 (sec) , antiderivative size = 14, normalized size of antiderivative = 1.00 \[ \int \frac {1}{\left (4-4 x+x^2\right ) \left (5-4 x+x^2\right )} \, dx=-\mathrm {atan}\left (x-2\right )-\frac {1}{x-2} \]

[In]

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

[Out]

- atan(x - 2) - 1/(x - 2)