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

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [F]
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 57, antiderivative size = 29 \[ \int \frac {e^{-x} \left (e^x \left (-4+2 x+17 x^2\right )+e \left (-64 x^2+32 x^3-4 x^4\right )\right )}{64 x^2-32 x^3+4 x^4} \, dx=e^{1-x}-\frac {-25-\frac {1}{x}+2 x}{4 (4-x)} \]

[Out]

exp(1)/exp(x)-(2*x-1/x-25)/(-4*x+16)

Rubi [A] (verified)

Time = 0.21 (sec) , antiderivative size = 26, normalized size of antiderivative = 0.90, number of steps used = 8, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.105, Rules used = {1608, 27, 12, 6820, 2225, 907} \[ \int \frac {e^{-x} \left (e^x \left (-4+2 x+17 x^2\right )+e \left (-64 x^2+32 x^3-4 x^4\right )\right )}{64 x^2-32 x^3+4 x^4} \, dx=e^{1-x}+\frac {1}{16 x}+\frac {69}{16 (4-x)} \]

[In]

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

[Out]

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

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, 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 907

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))^(n_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :
> Int[ExpandIntegrand[(d + e*x)^m*(f + g*x)^n*(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, f, g}, x] &
& NeQ[e*f - d*g, 0] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0] && IntegerQ[p] && ((EqQ[p, 1] && I
ntegersQ[m, n]) || (ILtQ[m, 0] && ILtQ[n, 0]))

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 2225

Int[((F_)^((c_.)*((a_.) + (b_.)*(x_))))^(n_.), x_Symbol] :> Simp[(F^(c*(a + b*x)))^n/(b*c*n*Log[F]), x] /; Fre
eQ[{F, a, b, c, n}, x]

Rule 6820

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

Rubi steps \begin{align*} \text {integral}& = \int \frac {e^{-x} \left (e^x \left (-4+2 x+17 x^2\right )+e \left (-64 x^2+32 x^3-4 x^4\right )\right )}{x^2 \left (64-32 x+4 x^2\right )} \, dx \\ & = \int \frac {e^{-x} \left (e^x \left (-4+2 x+17 x^2\right )+e \left (-64 x^2+32 x^3-4 x^4\right )\right )}{4 (-4+x)^2 x^2} \, dx \\ & = \frac {1}{4} \int \frac {e^{-x} \left (e^x \left (-4+2 x+17 x^2\right )+e \left (-64 x^2+32 x^3-4 x^4\right )\right )}{(-4+x)^2 x^2} \, dx \\ & = \frac {1}{4} \int \left (-4 e^{1-x}+\frac {-4+2 x+17 x^2}{(-4+x)^2 x^2}\right ) \, dx \\ & = \frac {1}{4} \int \frac {-4+2 x+17 x^2}{(-4+x)^2 x^2} \, dx-\int e^{1-x} \, dx \\ & = e^{1-x}+\frac {1}{4} \int \left (\frac {69}{4 (-4+x)^2}-\frac {1}{4 x^2}\right ) \, dx \\ & = e^{1-x}+\frac {69}{16 (4-x)}+\frac {1}{16 x} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.05 (sec) , antiderivative size = 24, normalized size of antiderivative = 0.83 \[ \int \frac {e^{-x} \left (e^x \left (-4+2 x+17 x^2\right )+e \left (-64 x^2+32 x^3-4 x^4\right )\right )}{64 x^2-32 x^3+4 x^4} \, dx=e^{1-x}-\frac {69}{16 (-4+x)}+\frac {1}{16 x} \]

[In]

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

[Out]

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

Maple [A] (verified)

Time = 0.18 (sec) , antiderivative size = 21, normalized size of antiderivative = 0.72

method result size
parts \({\mathrm e} \,{\mathrm e}^{-x}+\frac {1}{16 x}-\frac {69}{16 \left (x -4\right )}\) \(21\)
risch \(\frac {-\frac {17 x}{4}-\frac {1}{4}}{\left (x -4\right ) x}+{\mathrm e}^{1-x}\) \(22\)
norman \(\frac {\left (x^{2} {\mathrm e}-\frac {17 \,{\mathrm e}^{x} x}{4}-4 x \,{\mathrm e}-\frac {{\mathrm e}^{x}}{4}\right ) {\mathrm e}^{-x}}{x \left (x -4\right )}\) \(35\)
parallelrisch \(\frac {\left (4 x^{2} {\mathrm e}-16 x \,{\mathrm e}-17 \,{\mathrm e}^{x} x -{\mathrm e}^{x}\right ) {\mathrm e}^{-x}}{4 x \left (x -4\right )}\) \(37\)
default \(\frac {1}{16 x}-\frac {69}{16 \left (x -4\right )}-16 \,{\mathrm e} \left (-\frac {{\mathrm e}^{-x}}{x -4}+{\mathrm e}^{-4} \operatorname {Ei}_{1}\left (x -4\right )\right )+8 \,{\mathrm e} \left (-\frac {4 \,{\mathrm e}^{-x}}{x -4}+3 \,{\mathrm e}^{-4} \operatorname {Ei}_{1}\left (x -4\right )\right )-{\mathrm e} \left (-{\mathrm e}^{-x}-\frac {16 \,{\mathrm e}^{-x}}{x -4}+8 \,{\mathrm e}^{-4} \operatorname {Ei}_{1}\left (x -4\right )\right )\) \(94\)

[In]

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

[Out]

exp(1)/exp(x)+1/16/x-69/16/(x-4)

Fricas [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 36, normalized size of antiderivative = 1.24 \[ \int \frac {e^{-x} \left (e^x \left (-4+2 x+17 x^2\right )+e \left (-64 x^2+32 x^3-4 x^4\right )\right )}{64 x^2-32 x^3+4 x^4} \, dx=\frac {{\left (4 \, {\left (x^{2} - 4 \, x\right )} e - {\left (17 \, x + 1\right )} e^{x}\right )} e^{\left (-x\right )}}{4 \, {\left (x^{2} - 4 \, x\right )}} \]

[In]

integrate(((17*x^2+2*x-4)*exp(x)+(-4*x^4+32*x^3-64*x^2)*exp(1))/(4*x^4-32*x^3+64*x^2)/exp(x),x, algorithm="fri
cas")

[Out]

1/4*(4*(x^2 - 4*x)*e - (17*x + 1)*e^x)*e^(-x)/(x^2 - 4*x)

Sympy [A] (verification not implemented)

Time = 0.10 (sec) , antiderivative size = 20, normalized size of antiderivative = 0.69 \[ \int \frac {e^{-x} \left (e^x \left (-4+2 x+17 x^2\right )+e \left (-64 x^2+32 x^3-4 x^4\right )\right )}{64 x^2-32 x^3+4 x^4} \, dx=\frac {- 17 x - 1}{4 x^{2} - 16 x} + e e^{- x} \]

[In]

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

[Out]

(-17*x - 1)/(4*x**2 - 16*x) + E*exp(-x)

Maxima [F]

\[ \int \frac {e^{-x} \left (e^x \left (-4+2 x+17 x^2\right )+e \left (-64 x^2+32 x^3-4 x^4\right )\right )}{64 x^2-32 x^3+4 x^4} \, dx=\int { -\frac {{\left (4 \, {\left (x^{4} - 8 \, x^{3} + 16 \, x^{2}\right )} e - {\left (17 \, x^{2} + 2 \, x - 4\right )} e^{x}\right )} e^{\left (-x\right )}}{4 \, {\left (x^{4} - 8 \, x^{3} + 16 \, x^{2}\right )}} \,d x } \]

[In]

integrate(((17*x^2+2*x-4)*exp(x)+(-4*x^4+32*x^3-64*x^2)*exp(1))/(4*x^4-32*x^3+64*x^2)/exp(x),x, algorithm="max
ima")

[Out]

16*e^(-3)*exp_integral_e(2, x - 4)/(x - 4) - 1/4*(17*x^2 - 4*(x^3*e - 8*x^2*e)*e^(-x) - 67*x - 4)/(x^3 - 8*x^2
 + 16*x) - 32*integrate(e^(-x + 1)/(x^3 - 12*x^2 + 48*x - 64), x)

Giac [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 36, normalized size of antiderivative = 1.24 \[ \int \frac {e^{-x} \left (e^x \left (-4+2 x+17 x^2\right )+e \left (-64 x^2+32 x^3-4 x^4\right )\right )}{64 x^2-32 x^3+4 x^4} \, dx=\frac {4 \, x^{2} e^{\left (-x + 1\right )} - 16 \, x e^{\left (-x + 1\right )} - 17 \, x - 1}{4 \, {\left (x^{2} - 4 \, x\right )}} \]

[In]

integrate(((17*x^2+2*x-4)*exp(x)+(-4*x^4+32*x^3-64*x^2)*exp(1))/(4*x^4-32*x^3+64*x^2)/exp(x),x, algorithm="gia
c")

[Out]

1/4*(4*x^2*e^(-x + 1) - 16*x*e^(-x + 1) - 17*x - 1)/(x^2 - 4*x)

Mupad [B] (verification not implemented)

Time = 0.18 (sec) , antiderivative size = 33, normalized size of antiderivative = 1.14 \[ \int \frac {e^{-x} \left (e^x \left (-4+2 x+17 x^2\right )+e \left (-64 x^2+32 x^3-4 x^4\right )\right )}{64 x^2-32 x^3+4 x^4} \, dx={\mathrm {e}}^{-x}\,\mathrm {e}+\frac {17\,x}{4\,\left (4\,x-x^2\right )}+\frac {1}{4\,\left (4\,x-x^2\right )} \]

[In]

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

[Out]

exp(-x)*exp(1) + (17*x)/(4*(4*x - x^2)) + 1/(4*(4*x - x^2))