3.72.36 \(\int \frac {-x^2+2 x^3-x^4+e^4 (-4+8 x)}{x^2-2 x^3+x^4} \, dx\)

Optimal. Leaf size=18 \[ -x-\frac {4 e^4}{-x+x^2} \]

________________________________________________________________________________________

Rubi [A]  time = 0.06, antiderivative size = 24, normalized size of antiderivative = 1.33, number of steps used = 4, number of rules used = 3, integrand size = 40, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.075, Rules used = {1594, 27, 1620} \begin {gather*} -x+\frac {4 e^4}{1-x}+\frac {4 e^4}{x} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(-x^2 + 2*x^3 - x^4 + E^4*(-4 + 8*x))/(x^2 - 2*x^3 + x^4),x]

[Out]

(4*E^4)/(1 - x) + (4*E^4)/x - 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 1594

Int[(u_.)*((a_.)*(x_)^(p_.) + (b_.)*(x_)^(q_.) + (c_.)*(x_)^(r_.))^(n_.), x_Symbol] :> Int[u*x^(n*p)*(a + b*x^
(q - p) + c*x^(r - p))^n, x] /; FreeQ[{a, b, c, p, q, r}, x] && IntegerQ[n] && PosQ[q - p] && PosQ[r - p]

Rule 1620

Int[(Px_)*((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[Px*(a + b*x)
^m*(c + d*x)^n, x], x] /; FreeQ[{a, b, c, d, m, n}, x] && PolyQ[Px, x] && (IntegersQ[m, n] || IGtQ[m, -2]) &&
GtQ[Expon[Px, x], 2]

Rubi steps

\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {-x^2+2 x^3-x^4+e^4 (-4+8 x)}{x^2 \left (1-2 x+x^2\right )} \, dx\\ &=\int \frac {-x^2+2 x^3-x^4+e^4 (-4+8 x)}{(-1+x)^2 x^2} \, dx\\ &=\int \left (-1+\frac {4 e^4}{(-1+x)^2}-\frac {4 e^4}{x^2}\right ) \, dx\\ &=\frac {4 e^4}{1-x}+\frac {4 e^4}{x}-x\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 22, normalized size = 1.22 \begin {gather*} -\frac {4 e^4}{-1+x}+\frac {4 e^4}{x}-x \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(-x^2 + 2*x^3 - x^4 + E^4*(-4 + 8*x))/(x^2 - 2*x^3 + x^4),x]

[Out]

(-4*E^4)/(-1 + x) + (4*E^4)/x - x

________________________________________________________________________________________

fricas [A]  time = 0.70, size = 24, normalized size = 1.33 \begin {gather*} -\frac {x^{3} - x^{2} + 4 \, e^{4}}{x^{2} - x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.18, size = 17, normalized size = 0.94 \begin {gather*} -x - \frac {4 \, e^{4}}{x^{2} - x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-x - 4*e^4/(x^2 - x)

________________________________________________________________________________________

maple [A]  time = 0.03, size = 17, normalized size = 0.94




method result size



risch \(-x -\frac {4 \,{\mathrm e}^{4}}{x \left (x -1\right )}\) \(17\)
default \(-x -\frac {4 \,{\mathrm e}^{4}}{x -1}+\frac {4 \,{\mathrm e}^{4}}{x}\) \(21\)
gosper \(-\frac {x^{3}+4 \,{\mathrm e}^{4}-x}{x \left (x -1\right )}\) \(22\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-x-4*exp(4)/x/(x-1)

________________________________________________________________________________________

maxima [A]  time = 0.35, size = 17, normalized size = 0.94 \begin {gather*} -x - \frac {4 \, e^{4}}{x^{2} - x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-x - 4*e^4/(x^2 - x)

________________________________________________________________________________________

mupad [B]  time = 0.06, size = 16, normalized size = 0.89 \begin {gather*} -x-\frac {4\,{\mathrm {e}}^4}{x\,\left (x-1\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-(x^2 - 2*x^3 + x^4 - exp(4)*(8*x - 4))/(x^2 - 2*x^3 + x^4),x)

[Out]

- x - (4*exp(4))/(x*(x - 1))

________________________________________________________________________________________

sympy [A]  time = 0.14, size = 12, normalized size = 0.67 \begin {gather*} - x - \frac {4 e^{4}}{x^{2} - x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((8*x-4)*exp(4)-x**4+2*x**3-x**2)/(x**4-2*x**3+x**2),x)

[Out]

-x - 4*exp(4)/(x**2 - x)

________________________________________________________________________________________