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

Optimal. Leaf size=35 \[ -x+e^{-x} x^2 \log \left (\frac {e^{-2+e^3-\frac {4}{x}-x^4}}{x}\right ) \]

[Out]

x^2/exp(x)*ln(exp(exp(3)-2-x^4-4/x)/x)-x

________________________________________________________________________________________

Rubi [A]
time = 0.44, antiderivative size = 35, normalized size of antiderivative = 1.00, number of steps used = 23, number of rules used = 5, integrand size = 57, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.088, Rules used = {6874, 2225, 2207, 2227, 2634} \begin {gather*} e^{-x} x^2 \log \left (\frac {e^{-x^4-\frac {4}{x}+e^3-2}}{x}\right )-x \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

-x + (x^2*Log[E^(-2 + E^3 - 4/x - x^4)/x])/E^x

Rule 2207

Int[((b_.)*(F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[(c + d*x)^m*
((b*F^(g*(e + f*x)))^n/(f*g*n*Log[F])), x] - Dist[d*(m/(f*g*n*Log[F])), 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] && GtQ[m, 0] && IntegerQ[2*m] &&  !TrueQ[$UseGamma]

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 2227

Int[(F_)^((c_.)*(v_))*(u_), x_Symbol] :> Int[ExpandIntegrand[F^(c*ExpandToSum[v, x]), u, x], x] /; FreeQ[{F, c
}, x] && PolynomialQ[u, x] && LinearQ[v, x] &&  !TrueQ[$UseGamma]

Rule 2634

Int[Log[u_]*(v_), x_Symbol] :> With[{w = IntHide[v, x]}, Dist[Log[u], w, x] - Int[SimplifyIntegrand[w*(D[u, x]
/u), x], x] /; InverseFunctionFreeQ[w, x]] /; InverseFunctionFreeQ[u, x]

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 \left (-1+4 e^{-x}-e^{-x} x-4 e^{-x} x^5+e^{-x} (2-x) x \log \left (\frac {e^{-2 \left (1-\frac {e^3}{2}\right )-\frac {4}{x}-x^4}}{x}\right )\right ) \, dx\\ &=-x+4 \int e^{-x} \, dx-4 \int e^{-x} x^5 \, dx-\int e^{-x} x \, dx+\int e^{-x} (2-x) x \log \left (\frac {e^{-2 \left (1-\frac {e^3}{2}\right )-\frac {4}{x}-x^4}}{x}\right ) \, dx\\ &=-4 e^{-x}-x+e^{-x} x+4 e^{-x} x^5+e^{-x} x^2 \log \left (\frac {e^{-2+e^3-\frac {4}{x}-x^4}}{x}\right )-20 \int e^{-x} x^4 \, dx-\int e^{-x} \, dx-\int e^{-x} \left (4-x-4 x^5\right ) \, dx\\ &=-3 e^{-x}-x+e^{-x} x+20 e^{-x} x^4+4 e^{-x} x^5+e^{-x} x^2 \log \left (\frac {e^{-2+e^3-\frac {4}{x}-x^4}}{x}\right )-80 \int e^{-x} x^3 \, dx-\int \left (4 e^{-x}-e^{-x} x-4 e^{-x} x^5\right ) \, dx\\ &=-3 e^{-x}-x+e^{-x} x+80 e^{-x} x^3+20 e^{-x} x^4+4 e^{-x} x^5+e^{-x} x^2 \log \left (\frac {e^{-2+e^3-\frac {4}{x}-x^4}}{x}\right )-4 \int e^{-x} \, dx+4 \int e^{-x} x^5 \, dx-240 \int e^{-x} x^2 \, dx+\int e^{-x} x \, dx\\ &=e^{-x}-x+240 e^{-x} x^2+80 e^{-x} x^3+20 e^{-x} x^4+e^{-x} x^2 \log \left (\frac {e^{-2+e^3-\frac {4}{x}-x^4}}{x}\right )+20 \int e^{-x} x^4 \, dx-480 \int e^{-x} x \, dx+\int e^{-x} \, dx\\ &=-x+480 e^{-x} x+240 e^{-x} x^2+80 e^{-x} x^3+e^{-x} x^2 \log \left (\frac {e^{-2+e^3-\frac {4}{x}-x^4}}{x}\right )+80 \int e^{-x} x^3 \, dx-480 \int e^{-x} \, dx\\ &=480 e^{-x}-x+480 e^{-x} x+240 e^{-x} x^2+e^{-x} x^2 \log \left (\frac {e^{-2+e^3-\frac {4}{x}-x^4}}{x}\right )+240 \int e^{-x} x^2 \, dx\\ &=480 e^{-x}-x+480 e^{-x} x+e^{-x} x^2 \log \left (\frac {e^{-2+e^3-\frac {4}{x}-x^4}}{x}\right )+480 \int e^{-x} x \, dx\\ &=480 e^{-x}-x+e^{-x} x^2 \log \left (\frac {e^{-2+e^3-\frac {4}{x}-x^4}}{x}\right )+480 \int e^{-x} \, dx\\ &=-x+e^{-x} x^2 \log \left (\frac {e^{-2+e^3-\frac {4}{x}-x^4}}{x}\right )\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]
time = 0.17, size = 33, normalized size = 0.94 \begin {gather*} x \left (-1+e^{-x} x \log \left (\frac {e^{-2+e^3-\frac {4}{x}-x^4}}{x}\right )\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

x*(-1 + (x*Log[E^(-2 + E^3 - 4/x - x^4)/x])/E^x)

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 9 vs. order 3.
time = 1.69, size = 237, normalized size = 6.77

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x^2*exp(-x)*ln(exp((x*exp(3)-x^5-2*x-4)/x))-1/2*x*(-I*Pi*x*csgn(I*exp((x*exp(3)-x^5-2*x-4)/x))*csgn(I/x*exp((x
*exp(3)-x^5-2*x-4)/x))^2+I*Pi*x*csgn(I*exp((x*exp(3)-x^5-2*x-4)/x))*csgn(I/x*exp((x*exp(3)-x^5-2*x-4)/x))*csgn
(I/x)+I*Pi*x*csgn(I/x*exp((x*exp(3)-x^5-2*x-4)/x))^3-I*Pi*x*csgn(I/x*exp((x*exp(3)-x^5-2*x-4)/x))^2*csgn(I/x)+
2*x*ln(x)+2*exp(x))*exp(-x)

________________________________________________________________________________________

Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 91 vs. \(2 (32) = 64\).
time = 0.30, size = 91, normalized size = 2.60 \begin {gather*} -{\left (x^{6} + 4 \, x^{5} + 20 \, x^{4} + 80 \, x^{3} - x^{2} {\left (e^{3} - 242\right )} + x^{2} \log \left (x\right ) + 485 \, x + 477\right )} e^{\left (-x\right )} + 4 \, {\left (x^{5} + 5 \, x^{4} + 20 \, x^{3} + 60 \, x^{2} + 120 \, x + 120\right )} e^{\left (-x\right )} + {\left (x + 1\right )} e^{\left (-x\right )} - x - 4 \, e^{\left (-x\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-(x^6 + 4*x^5 + 20*x^4 + 80*x^3 - x^2*(e^3 - 242) + x^2*log(x) + 485*x + 477)*e^(-x) + 4*(x^5 + 5*x^4 + 20*x^3
 + 60*x^2 + 120*x + 120)*e^(-x) + (x + 1)*e^(-x) - x - 4*e^(-x)

________________________________________________________________________________________

Fricas [A]
time = 0.42, size = 39, normalized size = 1.11 \begin {gather*} {\left (x^{2} \log \left (\frac {e^{\left (-\frac {x^{5} - x e^{3} + 2 \, x + 4}{x}\right )}}{x}\right ) - x e^{x}\right )} e^{\left (-x\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Timed out

________________________________________________________________________________________

Giac [A]
time = 0.44, size = 50, normalized size = 1.43 \begin {gather*} -x^{6} e^{\left (-x\right )} - x^{2} e^{\left (-x\right )} \log \left (x\right ) - 2 \, x^{2} e^{\left (-x\right )} + x^{2} e^{\left (-x + 3\right )} - 4 \, x e^{\left (-x\right )} - x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Mupad [B]
time = 5.58, size = 121, normalized size = 3.46 \begin {gather*} 4\,{\mathrm {e}}^{-x}\,\left (x^5+5\,x^4+20\,x^3+60\,x^2+120\,x+120\right )-481\,{\mathrm {e}}^{-x}-485\,x\,{\mathrm {e}}^{-x}-x+{\mathrm {e}}^{-x}\,\left (x+1\right )-242\,x^2\,{\mathrm {e}}^{-x}-80\,x^3\,{\mathrm {e}}^{-x}-20\,x^4\,{\mathrm {e}}^{-x}-4\,x^5\,{\mathrm {e}}^{-x}-x^6\,{\mathrm {e}}^{-x}+x^2\,{\mathrm {e}}^{3-x}+x^2\,\ln \left (\frac {1}{x}\right )\,{\mathrm {e}}^{-x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

4*exp(-x)*(120*x + 60*x^2 + 20*x^3 + 5*x^4 + x^5 + 120) - 481*exp(-x) - 485*x*exp(-x) - x + exp(-x)*(x + 1) -
242*x^2*exp(-x) - 80*x^3*exp(-x) - 20*x^4*exp(-x) - 4*x^5*exp(-x) - x^6*exp(-x) + x^2*exp(3 - x) + x^2*log(1/x
)*exp(-x)

________________________________________________________________________________________