3.53.75 \(\int \frac {-64+64 x-16 x^2+e^x (-32+64 x-16 x^2)}{4 x^2-4 x^3+x^4} \, dx\) [5275]

Optimal. Leaf size=20 \[ \frac {16}{x}-\frac {16 e^x}{x+(-3+x) x} \]

[Out]

16/x-16*exp(x)/(x*(-3+x)+x)

________________________________________________________________________________________

Rubi [A]
time = 0.50, antiderivative size = 26, normalized size of antiderivative = 1.30, number of steps used = 12, number of rules used = 5, integrand size = 41, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.122, Rules used = {1608, 27, 6874, 2208, 2209} \begin {gather*} \frac {8 e^x}{x}+\frac {16}{x}+\frac {8 e^x}{2-x} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

(8*E^x)/(2 - x) + 16/x + (8*E^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 1608

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 2208

Int[((b_.)*(F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((c_.) + (d_.)*(x_))^(m_), x_Symbol] :> Simp[(c + d*x)^(m
+ 1)*((b*F^(g*(e + f*x)))^n/(d*(m + 1))), x] - Dist[f*g*n*(Log[F]/(d*(m + 1))), Int[(c + d*x)^(m + 1)*(b*F^(g*
(e + f*x)))^n, x], x] /; FreeQ[{F, b, c, d, e, f, g, n}, x] && LtQ[m, -1] && IntegerQ[2*m] &&  !TrueQ[$UseGamm
a]

Rule 2209

Int[(F_)^((g_.)*((e_.) + (f_.)*(x_)))/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[(F^(g*(e - c*(f/d)))/d)*ExpInteg
ralEi[f*g*(c + d*x)*(Log[F]/d)], x] /; FreeQ[{F, c, d, e, f, g}, x] &&  !TrueQ[$UseGamma]

Rule 6874

Int[u_, x_Symbol] :> With[{v = ExpandIntegrand[u, x]}, Int[v, x] /; SumQ[v]]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]
time = 0.17, size = 18, normalized size = 0.90 \begin {gather*} -\frac {16 \left (2+e^x-x\right )}{(-2+x) x} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

(-16*(2 + E^x - x))/((-2 + x)*x)

________________________________________________________________________________________

Maple [A]
time = 0.12, size = 23, normalized size = 1.15

method result size
norman \(\frac {-32+16 x -16 \,{\mathrm e}^{x}}{\left (x -2\right ) x}\) \(19\)
risch \(\frac {16}{x}-\frac {16 \,{\mathrm e}^{x}}{\left (x -2\right ) x}\) \(19\)
default \(\frac {16}{x}-\frac {8 \,{\mathrm e}^{x}}{x -2}+\frac {8 \,{\mathrm e}^{x}}{x}\) \(23\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

16/x-8*exp(x)/(x-2)+8*exp(x)/x

________________________________________________________________________________________

Maxima [A]
time = 0.33, size = 35, normalized size = 1.75 \begin {gather*} \frac {32 \, {\left (x - 1\right )}}{x^{2} - 2 \, x} - \frac {16 \, e^{x}}{x^{2} - 2 \, x} - \frac {16}{x - 2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

32*(x - 1)/(x^2 - 2*x) - 16*e^x/(x^2 - 2*x) - 16/(x - 2)

________________________________________________________________________________________

Fricas [A]
time = 0.39, size = 18, normalized size = 0.90 \begin {gather*} \frac {16 \, {\left (x - e^{x} - 2\right )}}{x^{2} - 2 \, x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [A]
time = 0.05, size = 14, normalized size = 0.70 \begin {gather*} - \frac {16 e^{x}}{x^{2} - 2 x} + \frac {16}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-16*x**2+64*x-32)*exp(x)-16*x**2+64*x-64)/(x**4-4*x**3+4*x**2),x)

[Out]

-16*exp(x)/(x**2 - 2*x) + 16/x

________________________________________________________________________________________

Giac [A]
time = 0.39, size = 18, normalized size = 0.90 \begin {gather*} \frac {16 \, {\left (x - e^{x} - 2\right )}}{x^{2} - 2 \, x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Mupad [B]
time = 3.49, size = 21, normalized size = 1.05 \begin {gather*} -\frac {8\,\left (2\,{\mathrm {e}}^x-x^2+4\right )}{x\,\left (x-2\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-(exp(x)*(16*x^2 - 64*x + 32) - 64*x + 16*x^2 + 64)/(4*x^2 - 4*x^3 + x^4),x)

[Out]

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

________________________________________________________________________________________