3.150 \(\int \frac {-41+55 x-27 x^2+5 x^3}{(5-4 x+x^2)^2} \, dx\)

Optimal. Leaf size=38 \[ \frac {1-x}{x^2-4 x+5}+\frac {5}{2} \log \left (x^2-4 x+5\right )-2 \tan ^{-1}(2-x) \]

________________________________________________________________________________________

Rubi [A]  time = 0.03, antiderivative size = 38, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.192, Rules used = {1660, 634, 618, 204, 628} \[ \frac {1-x}{x^2-4 x+5}+\frac {5}{2} \log \left (x^2-4 x+5\right )-2 \tan ^{-1}(2-x) \]

Antiderivative was successfully verified.

[In]

Int[(-41 + 55*x - 27*x^2 + 5*x^3)/(5 - 4*x + x^2)^2,x]

[Out]

(1 - x)/(5 - 4*x + x^2) - 2*ArcTan[2 - x] + (5*Log[5 - 4*x + x^2])/2

Rule 204

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

Rule 618

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 628

Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[(d*Log[RemoveContent[a + b*x +
c*x^2, x]])/b, x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]

Rule 634

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

Rule 1660

Int[(Pq_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> With[{Q = PolynomialQuotient[Pq, a + b*x + c*
x^2, x], f = Coeff[PolynomialRemainder[Pq, a + b*x + c*x^2, x], x, 0], g = Coeff[PolynomialRemainder[Pq, a + b
*x + c*x^2, x], x, 1]}, Simp[((b*f - 2*a*g + (2*c*f - b*g)*x)*(a + b*x + c*x^2)^(p + 1))/((p + 1)*(b^2 - 4*a*c
)), x] + Dist[1/((p + 1)*(b^2 - 4*a*c)), Int[(a + b*x + c*x^2)^(p + 1)*ExpandToSum[(p + 1)*(b^2 - 4*a*c)*Q - (
2*p + 3)*(2*c*f - b*g), x], x], x]] /; FreeQ[{a, b, c}, x] && PolyQ[Pq, x] && NeQ[b^2 - 4*a*c, 0] && LtQ[p, -1
]

Rubi steps

\begin {align*} \int \frac {-41+55 x-27 x^2+5 x^3}{\left (5-4 x+x^2\right )^2} \, dx &=\frac {1-x}{5-4 x+x^2}+\frac {1}{4} \int \frac {-32+20 x}{5-4 x+x^2} \, dx\\ &=\frac {1-x}{5-4 x+x^2}+2 \int \frac {1}{5-4 x+x^2} \, dx+\frac {5}{2} \int \frac {-4+2 x}{5-4 x+x^2} \, dx\\ &=\frac {1-x}{5-4 x+x^2}+\frac {5}{2} \log \left (5-4 x+x^2\right )-4 \operatorname {Subst}\left (\int \frac {1}{-4-x^2} \, dx,x,-4+2 x\right )\\ &=\frac {1-x}{5-4 x+x^2}-2 \tan ^{-1}(2-x)+\frac {5}{2} \log \left (5-4 x+x^2\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.02, size = 38, normalized size = 1.00 \[ \frac {1-x}{x^2-4 x+5}+\frac {5}{2} \log \left (x^2-4 x+5\right )-2 \tan ^{-1}(2-x) \]

Antiderivative was successfully verified.

[In]

Integrate[(-41 + 55*x - 27*x^2 + 5*x^3)/(5 - 4*x + x^2)^2,x]

[Out]

(1 - x)/(5 - 4*x + x^2) - 2*ArcTan[2 - x] + (5*Log[5 - 4*x + x^2])/2

________________________________________________________________________________________

IntegrateAlgebraic [A]  time = 0.02, size = 38, normalized size = 1.00 \[ \frac {1-x}{x^2-4 x+5}+\frac {5}{2} \log \left (x^2-4 x+5\right )-2 \tan ^{-1}(2-x) \]

Antiderivative was successfully verified.

[In]

IntegrateAlgebraic[(-41 + 55*x - 27*x^2 + 5*x^3)/(5 - 4*x + x^2)^2,x]

[Out]

(1 - x)/(5 - 4*x + x^2) - 2*ArcTan[2 - x] + (5*Log[5 - 4*x + x^2])/2

________________________________________________________________________________________

fricas [A]  time = 0.93, size = 50, normalized size = 1.32 \[ \frac {4 \, {\left (x^{2} - 4 \, x + 5\right )} \arctan \left (x - 2\right ) + 5 \, {\left (x^{2} - 4 \, x + 5\right )} \log \left (x^{2} - 4 \, x + 5\right ) - 2 \, x + 2}{2 \, {\left (x^{2} - 4 \, x + 5\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((5*x^3-27*x^2+55*x-41)/(x^2-4*x+5)^2,x, algorithm="fricas")

[Out]

1/2*(4*(x^2 - 4*x + 5)*arctan(x - 2) + 5*(x^2 - 4*x + 5)*log(x^2 - 4*x + 5) - 2*x + 2)/(x^2 - 4*x + 5)

________________________________________________________________________________________

giac [A]  time = 0.92, size = 33, normalized size = 0.87 \[ -\frac {x - 1}{x^{2} - 4 \, x + 5} + 2 \, \arctan \left (x - 2\right ) + \frac {5}{2} \, \log \left (x^{2} - 4 \, x + 5\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((5*x^3-27*x^2+55*x-41)/(x^2-4*x+5)^2,x, algorithm="giac")

[Out]

-(x - 1)/(x^2 - 4*x + 5) + 2*arctan(x - 2) + 5/2*log(x^2 - 4*x + 5)

________________________________________________________________________________________

maple [A]  time = 0.40, size = 35, normalized size = 0.92




method result size



default \(\frac {1-x}{x^{2}-4 x +5}+2 \arctan \left (-2+x \right )+\frac {5 \ln \left (x^{2}-4 x +5\right )}{2}\) \(35\)
risch \(\frac {1-x}{x^{2}-4 x +5}+2 \arctan \left (-2+x \right )+\frac {5 \ln \left (x^{2}-4 x +5\right )}{2}\) \(35\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int((5*x^3-27*x^2+55*x-41)/(x^2-4*x+5)^2,x,method=_RETURNVERBOSE)

[Out]

(1-x)/(x^2-4*x+5)+2*arctan(-2+x)+5/2*ln(x^2-4*x+5)

________________________________________________________________________________________

maxima [A]  time = 0.98, size = 33, normalized size = 0.87 \[ -\frac {x - 1}{x^{2} - 4 \, x + 5} + 2 \, \arctan \left (x - 2\right ) + \frac {5}{2} \, \log \left (x^{2} - 4 \, x + 5\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((5*x^3-27*x^2+55*x-41)/(x^2-4*x+5)^2,x, algorithm="maxima")

[Out]

-(x - 1)/(x^2 - 4*x + 5) + 2*arctan(x - 2) + 5/2*log(x^2 - 4*x + 5)

________________________________________________________________________________________

mupad [B]  time = 0.20, size = 41, normalized size = 1.08 \[ 2\,\mathrm {atan}\left (x-2\right )+\frac {5\,\ln \left (x^2-4\,x+5\right )}{2}-\frac {x}{x^2-4\,x+5}+\frac {1}{x^2-4\,x+5} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((55*x - 27*x^2 + 5*x^3 - 41)/(x^2 - 4*x + 5)^2,x)

[Out]

2*atan(x - 2) + (5*log(x^2 - 4*x + 5))/2 - x/(x^2 - 4*x + 5) + 1/(x^2 - 4*x + 5)

________________________________________________________________________________________

sympy [A]  time = 0.14, size = 31, normalized size = 0.82 \[ \frac {1 - x}{x^{2} - 4 x + 5} + \frac {5 \log {\left (x^{2} - 4 x + 5 \right )}}{2} + 2 \operatorname {atan}{\left (x - 2 \right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((5*x**3-27*x**2+55*x-41)/(x**2-4*x+5)**2,x)

[Out]

(1 - x)/(x**2 - 4*x + 5) + 5*log(x**2 - 4*x + 5)/2 + 2*atan(x - 2)

________________________________________________________________________________________