\(\int (8+e^{\frac {5-4 x}{x}} (5 x^2-4 x^3)) \, dx\) [1968]

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

Optimal result

Integrand size = 25, antiderivative size = 21 \[ \int \left (8+e^{\frac {5-4 x}{x}} \left (5 x^2-4 x^3\right )\right ) \, dx=-5+8 x-e^{-5+\frac {5+x}{x}} x^4 \]

[Out]

8*x-5-exp(1/x*(5+x)-5)*x^4

Rubi [A] (verified)

Time = 0.03 (sec) , antiderivative size = 37, normalized size of antiderivative = 1.76, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.080, Rules used = {1607, 2326} \[ \int \left (8+e^{\frac {5-4 x}{x}} \left (5 x^2-4 x^3\right )\right ) \, dx=8 x-\frac {5 e^{\frac {5-4 x}{x}} x^2}{\frac {5-4 x}{x^2}+\frac {4}{x}} \]

[In]

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

[Out]

8*x - (5*E^((5 - 4*x)/x)*x^2)/((5 - 4*x)/x^2 + 4/x)

Rule 1607

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

Rule 2326

Int[(y_.)*(F_)^(u_)*((v_) + (w_)), x_Symbol] :> With[{z = v*(y/(Log[F]*D[u, x]))}, Simp[F^u*z, x] /; EqQ[D[z,
x], w*y]] /; FreeQ[F, x]

Rubi steps \begin{align*} \text {integral}& = 8 x+\int e^{\frac {5-4 x}{x}} \left (5 x^2-4 x^3\right ) \, dx \\ & = 8 x+\int e^{\frac {5-4 x}{x}} (5-4 x) x^2 \, dx \\ & = 8 x-\frac {5 e^{\frac {5-4 x}{x}} x^2}{\frac {5-4 x}{x^2}+\frac {4}{x}} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.04 (sec) , antiderivative size = 18, normalized size of antiderivative = 0.86 \[ \int \left (8+e^{\frac {5-4 x}{x}} \left (5 x^2-4 x^3\right )\right ) \, dx=8 x-e^{-4+\frac {5}{x}} x^4 \]

[In]

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

[Out]

8*x - E^(-4 + 5/x)*x^4

Maple [A] (verified)

Time = 0.17 (sec) , antiderivative size = 18, normalized size of antiderivative = 0.86

method result size
derivativedivides \(8 x -{\mathrm e}^{\frac {5}{x}-4} x^{4}\) \(18\)
default \(8 x -{\mathrm e}^{\frac {5}{x}-4} x^{4}\) \(18\)
parts \(8 x -{\mathrm e}^{\frac {5}{x}-4} x^{4}\) \(18\)
norman \(8 x -x^{4} {\mathrm e}^{\frac {-4 x +5}{x}}\) \(20\)
risch \(8 x -x^{4} {\mathrm e}^{-\frac {-5+4 x}{x}}\) \(21\)
parallelrisch \(8 x -x^{4} {\mathrm e}^{-\frac {-5+4 x}{x}}\) \(21\)

[In]

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

[Out]

8*x-exp(5/x-4)*x^4

Fricas [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 20, normalized size of antiderivative = 0.95 \[ \int \left (8+e^{\frac {5-4 x}{x}} \left (5 x^2-4 x^3\right )\right ) \, dx=-x^{4} e^{\left (-\frac {4 \, x - 5}{x}\right )} + 8 \, x \]

[In]

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

[Out]

-x^4*e^(-(4*x - 5)/x) + 8*x

Sympy [A] (verification not implemented)

Time = 0.05 (sec) , antiderivative size = 14, normalized size of antiderivative = 0.67 \[ \int \left (8+e^{\frac {5-4 x}{x}} \left (5 x^2-4 x^3\right )\right ) \, dx=- x^{4} e^{\frac {5 - 4 x}{x}} + 8 x \]

[In]

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

[Out]

-x**4*exp((5 - 4*x)/x) + 8*x

Maxima [C] (verification not implemented)

Result contains higher order function than in optimal. Order 4 vs. order 3.

Time = 0.23 (sec) , antiderivative size = 26, normalized size of antiderivative = 1.24 \[ \int \left (8+e^{\frac {5-4 x}{x}} \left (5 x^2-4 x^3\right )\right ) \, dx=-625 \, e^{\left (-4\right )} \Gamma \left (-3, -\frac {5}{x}\right ) - 2500 \, e^{\left (-4\right )} \Gamma \left (-4, -\frac {5}{x}\right ) + 8 \, x \]

[In]

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

[Out]

-625*e^(-4)*gamma(-3, -5/x) - 2500*e^(-4)*gamma(-4, -5/x) + 8*x

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 66 vs. \(2 (20) = 40\).

Time = 0.25 (sec) , antiderivative size = 66, normalized size of antiderivative = 3.14 \[ \int \left (8+e^{\frac {5-4 x}{x}} \left (5 x^2-4 x^3\right )\right ) \, dx=8 \, x - \frac {625 \, e^{\left (-\frac {4 \, x - 5}{x}\right )}}{\frac {{\left (4 \, x - 5\right )}^{4}}{x^{4}} - \frac {16 \, {\left (4 \, x - 5\right )}^{3}}{x^{3}} + \frac {96 \, {\left (4 \, x - 5\right )}^{2}}{x^{2}} - \frac {256 \, {\left (4 \, x - 5\right )}}{x} + 256} \]

[In]

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

[Out]

8*x - 625*e^(-(4*x - 5)/x)/((4*x - 5)^4/x^4 - 16*(4*x - 5)^3/x^3 + 96*(4*x - 5)^2/x^2 - 256*(4*x - 5)/x + 256)

Mupad [B] (verification not implemented)

Time = 8.94 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.81 \[ \int \left (8+e^{\frac {5-4 x}{x}} \left (5 x^2-4 x^3\right )\right ) \, dx=8\,x-x^4\,{\mathrm {e}}^{-4}\,{\mathrm {e}}^{5/x} \]

[In]

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

[Out]

8*x - x^4*exp(-4)*exp(5/x)