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

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

Optimal result

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

[Out]

exp(ln((-x^2-4*x+20)*x)-exp(exp(5)-x-5))

Rubi [A] (verified)

Time = 0.06 (sec) , antiderivative size = 29, normalized size of antiderivative = 0.97, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.026, Rules used = {1600, 2326} \[ \int \frac {e^{-e^{-5+e^5-x}} \left (20 x-4 x^2-x^3\right ) \left (-20+8 x+3 x^2+e^{-5+e^5-x} \left (-20 x+4 x^2+x^3\right )\right )}{-20 x+4 x^2+x^3} \, dx=e^{-e^{-x+e^5-5}} \left (-x^3-4 x^2+20 x\right ) \]

[In]

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

[Out]

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

Rule 1600

Int[(u_.)*(Px_)^(p_.)*(Qx_)^(q_.), x_Symbol] :> Int[u*PolynomialQuotient[Px, Qx, x]^p*Qx^(p + q), x] /; FreeQ[
q, x] && PolyQ[Px, x] && PolyQ[Qx, x] && EqQ[PolynomialRemainder[Px, Qx, x], 0] && IntegerQ[p] && LtQ[p*q, 0]

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}& = -\int e^{-e^{-5+e^5-x}} \left (-20+8 x+3 x^2+e^{-5+e^5-x} \left (-20 x+4 x^2+x^3\right )\right ) \, dx \\ & = e^{-e^{-5+e^5-x}} \left (20 x-4 x^2-x^3\right ) \\ \end{align*}

Mathematica [A] (verified)

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

[In]

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

[Out]

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

Maple [A] (verified)

Time = 0.83 (sec) , antiderivative size = 28, normalized size of antiderivative = 0.93

method result size
parallelrisch \({\mathrm e}^{\ln \left (-x^{3}-4 x^{2}+20 x \right )-{\mathrm e}^{{\mathrm e}^{5}-x -5}}\) \(28\)
risch \(-x \left (x^{2}+4 x -20\right ) {\mathrm e}^{\frac {i \pi {\operatorname {csgn}\left (i x \left (x^{2}+4 x -20\right )\right )}^{3}}{2}+\frac {i \pi {\operatorname {csgn}\left (i x \left (x^{2}+4 x -20\right )\right )}^{2} \operatorname {csgn}\left (i x \right )}{2}+\frac {i \pi {\operatorname {csgn}\left (i x \left (x^{2}+4 x -20\right )\right )}^{2} \operatorname {csgn}\left (i \left (x^{2}+4 x -20\right )\right )}{2}-\frac {i \pi \,\operatorname {csgn}\left (i x \left (x^{2}+4 x -20\right )\right ) \operatorname {csgn}\left (i x \right ) \operatorname {csgn}\left (i \left (x^{2}+4 x -20\right )\right )}{2}-i \pi {\operatorname {csgn}\left (i x \left (x^{2}+4 x -20\right )\right )}^{2}-{\mathrm e}^{{\mathrm e}^{5}-x -5}}\) \(151\)

[In]

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

[Out]

exp(ln(-x^3-4*x^2+20*x)-exp(exp(5)-x-5))

Fricas [A] (verification not implemented)

none

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

[In]

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

[Out]

e^(-e^(-x + e^5 - 5) + log(-x^3 - 4*x^2 + 20*x))

Sympy [A] (verification not implemented)

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

[In]

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

[Out]

(-x**3 - 4*x**2 + 20*x)*exp(-exp(-x - 5 + exp(5)))

Maxima [F]

\[ \int \frac {e^{-e^{-5+e^5-x}} \left (20 x-4 x^2-x^3\right ) \left (-20+8 x+3 x^2+e^{-5+e^5-x} \left (-20 x+4 x^2+x^3\right )\right )}{-20 x+4 x^2+x^3} \, dx=\int { \frac {{\left (3 \, x^{2} + {\left (x^{3} + 4 \, x^{2} - 20 \, x\right )} e^{\left (-x + e^{5} - 5\right )} + 8 \, x - 20\right )} e^{\left (-e^{\left (-x + e^{5} - 5\right )} + \log \left (-x^{3} - 4 \, x^{2} + 20 \, x\right )\right )}}{x^{3} + 4 \, x^{2} - 20 \, x} \,d x } \]

[In]

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

[Out]

integrate(-(3*x^2 + (x^3 + 4*x^2 - 20*x)*e^(-x + e^5 - 5) + 8*x - 20)*e^(-e^(-x + e^5 - 5)), x)

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 77 vs. \(2 (24) = 48\).

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

[In]

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

[Out]

-(x^3*e^(-x + e^5 - e^(-x + e^5 - 5) - 5) + 4*x^2*e^(-x + e^5 - e^(-x + e^5 - 5) - 5) - 20*x*e^(-x + e^5 - e^(
-x + e^5 - 5) - 5))*e^(x - e^5 + 5)

Mupad [B] (verification not implemented)

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

[In]

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

[Out]

-x*exp(-exp(-x)*exp(-5)*exp(exp(5)))*(4*x + x^2 - 20)