3.83.40 \(\int (1-4 x+e^{e^{\frac {-5+3 x}{x}}} (-5 e^{\frac {-5+3 x}{x}} x-3 x^2)+e^x (2 x+x^2)) \, dx\)

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

________________________________________________________________________________________

Rubi [A]  time = 0.08, antiderivative size = 48, normalized size of antiderivative = 1.85, number of steps used = 10, number of rules used = 5, integrand size = 50, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.100, Rules used = {2288, 1593, 2196, 2176, 2194} \begin {gather*} e^x x^2-2 x^2-\frac {5 e^{e^{-\frac {5-3 x}{x}}} x}{\frac {5-3 x}{x^2}+\frac {3}{x}}+x \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 1593

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 2176

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

Rule 2194

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 2196

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

Rule 2288

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 {gather*} \begin {aligned} \text {integral} &=x-2 x^2+\int e^{e^{\frac {-5+3 x}{x}}} \left (-5 e^{\frac {-5+3 x}{x}} x-3 x^2\right ) \, dx+\int e^x \left (2 x+x^2\right ) \, dx\\ &=x-\frac {5 e^{e^{-\frac {5-3 x}{x}}} x}{\frac {5-3 x}{x^2}+\frac {3}{x}}-2 x^2+\int e^x x (2+x) \, dx\\ &=x-\frac {5 e^{e^{-\frac {5-3 x}{x}}} x}{\frac {5-3 x}{x^2}+\frac {3}{x}}-2 x^2+\int \left (2 e^x x+e^x x^2\right ) \, dx\\ &=x-\frac {5 e^{e^{-\frac {5-3 x}{x}}} x}{\frac {5-3 x}{x^2}+\frac {3}{x}}-2 x^2+2 \int e^x x \, dx+\int e^x x^2 \, dx\\ &=x+2 e^x x-\frac {5 e^{e^{-\frac {5-3 x}{x}}} x}{\frac {5-3 x}{x^2}+\frac {3}{x}}-2 x^2+e^x x^2-2 \int e^x \, dx-2 \int e^x x \, dx\\ &=-2 e^x+x-\frac {5 e^{e^{-\frac {5-3 x}{x}}} x}{\frac {5-3 x}{x^2}+\frac {3}{x}}-2 x^2+e^x x^2+2 \int e^x \, dx\\ &=x-\frac {5 e^{e^{-\frac {5-3 x}{x}}} x}{\frac {5-3 x}{x^2}+\frac {3}{x}}-2 x^2+e^x x^2\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.17, size = 27, normalized size = 1.04 \begin {gather*} x+\left (-2+e^x\right ) x^2-e^{e^{3-\frac {5}{x}}} x^3 \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 1.30, size = 29, normalized size = 1.12 \begin {gather*} -x^{3} e^{\left (e^{\left (\frac {3 \, x - 5}{x}\right )}\right )} + x^{2} e^{x} - 2 \, x^{2} + x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [B]  time = 0.15, size = 51, normalized size = 1.96 \begin {gather*} -x^{3} e^{\left (\frac {x e^{\left (\frac {3 \, x - 5}{x}\right )} + 3 \, x - 5}{x} - \frac {3 \, x - 5}{x}\right )} + x^{2} e^{x} - 2 \, x^{2} + x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.10, size = 30, normalized size = 1.15




method result size



default \(x -x^{3} {\mathrm e}^{{\mathrm e}^{\frac {3 x -5}{x}}}+{\mathrm e}^{x} x^{2}-2 x^{2}\) \(30\)
norman \(x -x^{3} {\mathrm e}^{{\mathrm e}^{\frac {3 x -5}{x}}}+{\mathrm e}^{x} x^{2}-2 x^{2}\) \(30\)
risch \(x -x^{3} {\mathrm e}^{{\mathrm e}^{\frac {3 x -5}{x}}}+{\mathrm e}^{x} x^{2}-2 x^{2}\) \(30\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x-x^3*exp(exp((3*x-5)/x))+exp(x)*x^2-2*x^2

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} x^{2} e^{x} - 2 \, x^{2} + x - \int {\left (3 \, x^{2} e^{\frac {5}{x}} + 5 \, x e^{3}\right )} e^{\left (-\frac {5}{x} + e^{\left (-\frac {5}{x} + 3\right )}\right )}\,{d x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x^2*e^x - 2*x^2 + x - integrate((3*x^2*e^(5/x) + 5*x*e^3)*e^(-5/x + e^(-5/x + 3)), x)

________________________________________________________________________________________

mupad [B]  time = 4.96, size = 28, normalized size = 1.08 \begin {gather*} x+x^2\,{\mathrm {e}}^x-2\,x^2-x^3\,{\mathrm {e}}^{{\mathrm {e}}^3\,{\mathrm {e}}^{-\frac {5}{x}}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x + x^2*exp(x) - 2*x^2 - x^3*exp(exp(3)*exp(-5/x))

________________________________________________________________________________________

sympy [A]  time = 2.63, size = 26, normalized size = 1.00 \begin {gather*} - x^{3} e^{e^{\frac {3 x - 5}{x}}} + x^{2} e^{x} - 2 x^{2} + x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-x**3*exp(exp((3*x - 5)/x)) + x**2*exp(x) - 2*x**2 + x

________________________________________________________________________________________