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

Optimal. Leaf size=18 \[ \frac {4 e^{1-e+x-x^2}}{x} \]

________________________________________________________________________________________

Rubi [A]  time = 0.06, antiderivative size = 32, normalized size of antiderivative = 1.78, number of steps used = 2, number of rules used = 2, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.077, Rules used = {12, 2288} \begin {gather*} \frac {4 e^{-x^2+x-e+1} \left (x-2 x^2\right )}{(1-2 x) x^2} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

(4*E^(1 - E + x - x^2)*(x - 2*x^2))/((1 - 2*x)*x^2)

Rule 12

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

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

________________________________________________________________________________________

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

Antiderivative was successfully verified.

[In]

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

[Out]

(4*E^(1 - E + x - x^2))/x

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.14, size = 18, normalized size = 1.00 \begin {gather*} \frac {4 \, e^{\left (-x^{2} + x - e + 1\right )}}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.07, size = 19, normalized size = 1.06




method result size



risch \(\frac {4 \,{\mathrm e}^{1-{\mathrm e}-x^{2}+x}}{x}\) \(19\)
gosper \(\frac {{\mathrm e}^{2 \ln \relax (2)-{\mathrm e}-x^{2}+x +1}}{x}\) \(22\)
norman \(\frac {{\mathrm e}^{2 \ln \relax (2)-{\mathrm e}-x^{2}+x +1}}{x}\) \(22\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

4*exp(1-exp(1)-x^2+x)/x

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-4*sqrt(pi)*erf(x - 1/2)*e^(-e + 5/4) + 4*integrate((x*e - e)*e^(-x^2 + x - e)/x^2, x)

________________________________________________________________________________________

mupad [B]  time = 0.15, size = 20, normalized size = 1.11 \begin {gather*} \frac {4\,{\mathrm {e}}^{-\mathrm {e}}\,\mathrm {e}\,{\mathrm {e}}^{-x^2}\,{\mathrm {e}}^x}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(4*exp(-exp(1))*exp(1)*exp(-x^2)*exp(x))/x

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

4*exp(-x**2 + x - E + 1)/x

________________________________________________________________________________________