3.3.8 \(\int \frac {-128+6 x^2-2 x^3}{4-4 x+x^2} \, dx\)

Optimal. Leaf size=22 \[ 2+e^5-2 x-x \left (\frac {60}{2-x}+x\right ) \]

________________________________________________________________________________________

Rubi [A]  time = 0.02, antiderivative size = 18, normalized size of antiderivative = 0.82, number of steps used = 3, number of rules used = 2, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.087, Rules used = {27, 1850} \begin {gather*} -x^2-2 x-\frac {120}{2-x} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(-128 + 6*x^2 - 2*x^3)/(4 - 4*x + x^2),x]

[Out]

-120/(2 - x) - 2*x - x^2

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 1850

Int[(Pq_)*((a_) + (b_.)*(x_)^(n_.))^(p_.), x_Symbol] :> Int[ExpandIntegrand[Pq*(a + b*x^n)^p, x], x] /; FreeQ[
{a, b, n}, x] && PolyQ[Pq, x] && (IGtQ[p, 0] || EqQ[n, 1])

Rubi steps

\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {-128+6 x^2-2 x^3}{(-2+x)^2} \, dx\\ &=\int \left (-2-\frac {120}{(-2+x)^2}-2 x\right ) \, dx\\ &=-\frac {120}{2-x}-2 x-x^2\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 19, normalized size = 0.86 \begin {gather*} -\frac {2 \left (104+12 x-x^3\right )}{4-2 x} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(-128 + 6*x^2 - 2*x^3)/(4 - 4*x + x^2),x]

[Out]

(-2*(104 + 12*x - x^3))/(4 - 2*x)

________________________________________________________________________________________

fricas [A]  time = 0.65, size = 15, normalized size = 0.68 \begin {gather*} -\frac {x^{3} - 4 \, x - 120}{x - 2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-2*x^3+6*x^2-128)/(x^2-4*x+4),x, algorithm="fricas")

[Out]

-(x^3 - 4*x - 120)/(x - 2)

________________________________________________________________________________________

giac [A]  time = 0.32, size = 16, normalized size = 0.73 \begin {gather*} -x^{2} - 2 \, x + \frac {120}{x - 2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-2*x^3+6*x^2-128)/(x^2-4*x+4),x, algorithm="giac")

[Out]

-x^2 - 2*x + 120/(x - 2)

________________________________________________________________________________________

maple [A]  time = 0.10, size = 13, normalized size = 0.59




method result size



gosper \(-\frac {x^{3}-128}{x -2}\) \(13\)
norman \(\frac {-x^{3}+128}{x -2}\) \(14\)
default \(-x^{2}-2 x +\frac {120}{x -2}\) \(17\)
risch \(-x^{2}-2 x +\frac {120}{x -2}\) \(17\)
meijerg \(-\frac {32 x}{1-\frac {x}{2}}-\frac {x \left (-\frac {1}{2} x^{2}-3 x +12\right )}{1-\frac {x}{2}}+\frac {2 x \left (-\frac {3 x}{2}+6\right )}{1-\frac {x}{2}}\) \(47\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int((-2*x^3+6*x^2-128)/(x^2-4*x+4),x,method=_RETURNVERBOSE)

[Out]

-(x^3-128)/(x-2)

________________________________________________________________________________________

maxima [A]  time = 0.38, size = 16, normalized size = 0.73 \begin {gather*} -x^{2} - 2 \, x + \frac {120}{x - 2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-2*x^3+6*x^2-128)/(x^2-4*x+4),x, algorithm="maxima")

[Out]

-x^2 - 2*x + 120/(x - 2)

________________________________________________________________________________________

mupad [B]  time = 0.04, size = 16, normalized size = 0.73 \begin {gather*} \frac {-x^3+4\,x+120}{x-2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-(2*x^3 - 6*x^2 + 128)/(x^2 - 4*x + 4),x)

[Out]

(4*x - x^3 + 120)/(x - 2)

________________________________________________________________________________________

sympy [A]  time = 0.07, size = 10, normalized size = 0.45 \begin {gather*} - x^{2} - 2 x + \frac {120}{x - 2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-2*x**3+6*x**2-128)/(x**2-4*x+4),x)

[Out]

-x**2 - 2*x + 120/(x - 2)

________________________________________________________________________________________