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

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

________________________________________________________________________________________

Rubi [B]  time = 3.11, antiderivative size = 72, normalized size of antiderivative = 2.32, number of steps used = 8, number of rules used = 3, integrand size = 67, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.045, Rules used = {6742, 2209, 2288} \begin {gather*} \frac {5 e^{x^2-x} \left (x-2 x^2\right )}{(1-2 x) x^2}+e^{4 x^2}-\frac {e^{x^2+x} \left (2 x^2+x\right )}{x^2 (2 x+1)}-\frac {e^{x^2}}{x} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 2209

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^(n_))*((e_.) + (f_.)*(x_))^(m_.), x_Symbol] :> Simp[((e + f*x)^n*
F^(a + b*(c + d*x)^n))/(b*f*n*(c + d*x)^n*Log[F]), x] /; FreeQ[{F, a, b, c, d, e, f, n}, x] && EqQ[m, n - 1] &
& EqQ[d*e - c*f, 0]

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]

Rule 6742

Int[u_, x_Symbol] :> With[{v = ExpandIntegrand[u, x]}, Int[v, x] /; SumQ[v]]

Rubi steps

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

________________________________________________________________________________________

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

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [B]  time = 0.81, size = 61, normalized size = 1.97 \begin {gather*} \frac {{\left ({\left (x e^{\left (7 \, x^{2}\right )} - e^{\left (4 \, x^{2}\right )}\right )} e^{\left (4 \, x^{2} + x\right )} + 5 \, e^{\left (8 \, x^{2}\right )} - e^{\left (8 \, x^{2} + 2 \, x\right )}\right )} e^{\left (-7 \, x^{2} - x\right )}}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

((x*e^(7*x^2) - e^(4*x^2))*e^(4*x^2 + x) + 5*e^(8*x^2) - e^(8*x^2 + 2*x))*e^(-7*x^2 - x)/x

________________________________________________________________________________________

giac [A]  time = 0.20, size = 37, normalized size = 1.19 \begin {gather*} \frac {x e^{\left (4 \, x^{2}\right )} - e^{\left (x^{2} + x\right )} + 5 \, e^{\left (x^{2} - x\right )} - e^{\left (x^{2}\right )}}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.08, size = 27, normalized size = 0.87




method result size



risch \({\mathrm e}^{4 x^{2}}-\frac {\left ({\mathrm e}^{2 x}+{\mathrm e}^{x}-5\right ) {\mathrm e}^{x \left (x -1\right )}}{x}\) \(27\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int((8*x^3*exp(x)*exp(4*x^2)+((-2*x^2-x+1)*exp(x)^2+(-2*x^2+1)*exp(x)+10*x^2-5*x-5)*exp(x^2))/exp(x)/x^2,x,met
hod=_RETURNVERBOSE)

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 0.19, size = 28, normalized size = 0.90 \begin {gather*} {\mathrm {e}}^{4\,x^2}-\frac {{\mathrm {e}}^{x^2-x}\,\left ({\mathrm {e}}^{2\,x}+{\mathrm {e}}^x-5\right )}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.26, size = 31, normalized size = 1.00 \begin {gather*} \frac {\left (x e^{x} e^{4 x^{2}} + \left (- e^{2 x} - e^{x} + 5\right ) e^{x^{2}}\right ) e^{- x}}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________