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\)

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

________________________________________________________________________________________

Rubi [A]  time = 0.46, 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 = {1594, 27, 6742, 2177, 2178} \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 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 2177

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] &&  !$UseGamma ===
True

Rule 2178

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

Rule 6742

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.08, 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)

________________________________________________________________________________________

fricas [A]  time = 0.85, 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)

________________________________________________________________________________________

giac [A]  time = 0.14, 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)

________________________________________________________________________________________

maple [A]  time = 0.06, size = 19, normalized size = 0.95




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]

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

________________________________________________________________________________________

maxima [A]  time = 0.42, 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)

________________________________________________________________________________________

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))

________________________________________________________________________________________

sympy [A]  time = 0.15, 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

________________________________________________________________________________________