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

Optimal. Leaf size=16 \[ -e^x+\frac {5}{x}+\frac {x}{e} \]

________________________________________________________________________________________

Rubi [A]  time = 0.02, antiderivative size = 16, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 3, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {12, 14, 2194} \begin {gather*} \frac {x}{e}-e^x+\frac {5}{x} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

-E^x + 5/x + x/E

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

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]

Rubi steps

\begin {gather*} \begin {aligned} \text {integral} &=\frac {\int \frac {-5 e+x^2-e^{1+x} x^2}{x^2} \, dx}{e}\\ &=\frac {\int \left (-e^{1+x}+\frac {-5 e+x^2}{x^2}\right ) \, dx}{e}\\ &=-\frac {\int e^{1+x} \, dx}{e}+\frac {\int \frac {-5 e+x^2}{x^2} \, dx}{e}\\ &=-e^x+\frac {\int \left (1-\frac {5 e}{x^2}\right ) \, dx}{e}\\ &=-e^x+\frac {5}{x}+\frac {x}{e}\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 16, normalized size = 1.00 \begin {gather*} -e^x+\frac {5}{x}+\frac {x}{e} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

-E^x + 5/x + x/E

________________________________________________________________________________________

fricas [A]  time = 0.43, size = 21, normalized size = 1.31 \begin {gather*} \frac {{\left (x^{2} - x e^{\left (x + 1\right )} + 5 \, e\right )} e^{\left (-1\right )}}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.24, size = 21, normalized size = 1.31 \begin {gather*} \frac {{\left (x^{2} - x e^{\left (x + 1\right )} + 5 \, e\right )} e^{\left (-1\right )}}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.04, size = 15, normalized size = 0.94




method result size



risch \({\mathrm e}^{-1} x +\frac {5}{x}-{\mathrm e}^{x}\) \(15\)
norman \(\frac {5+x^{2} {\mathrm e}^{-1}-{\mathrm e}^{x} x}{x}\) \(20\)
default \({\mathrm e}^{-1} \left (x +\frac {5 \,{\mathrm e}}{x}-{\mathrm e} \,{\mathrm e}^{x}\right )\) \(21\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

exp(-1)*x+5/x-exp(x)

________________________________________________________________________________________

maxima [A]  time = 0.35, size = 18, normalized size = 1.12 \begin {gather*} {\left (x + \frac {5 \, e}{x} - e^{\left (x + 1\right )}\right )} e^{\left (-1\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(x + 5*e/x - e^(x + 1))*e^(-1)

________________________________________________________________________________________

mupad [B]  time = 0.10, size = 14, normalized size = 0.88 \begin {gather*} x\,{\mathrm {e}}^{-1}-{\mathrm {e}}^x+\frac {5}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x*exp(-1) - exp(x) + 5/x

________________________________________________________________________________________

sympy [A]  time = 0.10, size = 14, normalized size = 0.88 \begin {gather*} \frac {x + \frac {5 e}{x}}{e} - e^{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(x + 5*E/x)*exp(-1) - exp(x)

________________________________________________________________________________________