3.20.36 \(\int \frac {e^{-2 x^2} (40+160 x^2+2 e^{2 x^2} x^2-60 e x^3)}{x^2} \, dx\) [1936]

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

[Out]

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

________________________________________________________________________________________

Rubi [A]
time = 0.35, antiderivative size = 28, normalized size of antiderivative = 1.27, number of steps used = 5, number of rules used = 4, integrand size = 36, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.111, Rules used = {6873, 12, 6874, 2326} \begin {gather*} 2 x-\frac {5 e^{-2 x^2} \left (8 x^2-3 e x^3\right )}{x^3} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(40 + 160*x^2 + 2*E^(2*x^2)*x^2 - 60*E*x^3)/(E^(2*x^2)*x^2),x]

[Out]

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

Rule 12

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

Rule 2326

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 6873

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

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

________________________________________________________________________________________

Mathematica [A]
time = 0.75, size = 27, normalized size = 1.23 \begin {gather*} 15 e^{1-2 x^2}-\frac {40 e^{-2 x^2}}{x}+2 x \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(40 + 160*x^2 + 2*E^(2*x^2)*x^2 - 60*E*x^3)/(E^(2*x^2)*x^2),x]

[Out]

15*E^(1 - 2*x^2) - 40/(E^(2*x^2)*x) + 2*x

________________________________________________________________________________________

Maple [A]
time = 0.07, size = 26, normalized size = 1.18

method result size
risch \(\frac {5 \left (3 x \,{\mathrm e}-8\right ) {\mathrm e}^{-2 x^{2}}}{x}+2 x\) \(23\)
default \(2 x -\frac {40 \,{\mathrm e}^{-2 x^{2}}}{x}+15 \,{\mathrm e} \,{\mathrm e}^{-2 x^{2}}\) \(26\)
norman \(\frac {\left (-40+15 x \,{\mathrm e}+2 x^{2} {\mathrm e}^{2 x^{2}}\right ) {\mathrm e}^{-2 x^{2}}}{x}\) \(29\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((2*x^2*exp(x^2)^2-60*x^3*exp(1)+160*x^2+40)/x^2/exp(x^2)^2,x,method=_RETURNVERBOSE)

[Out]

2*x-40/exp(x^2)^2/x+15*exp(1)/exp(x^2)^2

________________________________________________________________________________________

Maxima [C] Result contains higher order function than in optimal. Order 4 vs. order 3.
time = 0.49, size = 48, normalized size = 2.18 \begin {gather*} 40 \, \sqrt {2} \sqrt {\pi } \operatorname {erf}\left (\sqrt {2} x\right ) + 2 \, x - \frac {20 \, \sqrt {2} \sqrt {x^{2}} \Gamma \left (-\frac {1}{2}, 2 \, x^{2}\right )}{x} + 15 \, e^{\left (-2 \, x^{2} + 1\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2*x^2*exp(x^2)^2-60*x^3*exp(1)+160*x^2+40)/x^2/exp(x^2)^2,x, algorithm="maxima")

[Out]

40*sqrt(2)*sqrt(pi)*erf(sqrt(2)*x) + 2*x - 20*sqrt(2)*sqrt(x^2)*gamma(-1/2, 2*x^2)/x + 15*e^(-2*x^2 + 1)

________________________________________________________________________________________

Fricas [A]
time = 0.35, size = 28, normalized size = 1.27 \begin {gather*} \frac {{\left (2 \, x^{2} e^{\left (2 \, x^{2}\right )} + 15 \, x e - 40\right )} e^{\left (-2 \, x^{2}\right )}}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2*x^2*exp(x^2)^2-60*x^3*exp(1)+160*x^2+40)/x^2/exp(x^2)^2,x, algorithm="fricas")

[Out]

(2*x^2*e^(2*x^2) + 15*x*e - 40)*e^(-2*x^2)/x

________________________________________________________________________________________

Sympy [A]
time = 0.05, size = 19, normalized size = 0.86 \begin {gather*} 2 x + \frac {\left (15 e x - 40\right ) e^{- 2 x^{2}}}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2*x**2*exp(x**2)**2-60*x**3*exp(1)+160*x**2+40)/x**2/exp(x**2)**2,x)

[Out]

2*x + (15*E*x - 40)*exp(-2*x**2)/x

________________________________________________________________________________________

Giac [A]
time = 0.39, size = 29, normalized size = 1.32 \begin {gather*} \frac {2 \, x^{2} + 15 \, x e^{\left (-2 \, x^{2} + 1\right )} - 40 \, e^{\left (-2 \, x^{2}\right )}}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2*x^2*exp(x^2)^2-60*x^3*exp(1)+160*x^2+40)/x^2/exp(x^2)^2,x, algorithm="giac")

[Out]

(2*x^2 + 15*x*e^(-2*x^2 + 1) - 40*e^(-2*x^2))/x

________________________________________________________________________________________

Mupad [B]
time = 1.16, size = 25, normalized size = 1.14 \begin {gather*} 2\,x+15\,\mathrm {e}\,{\mathrm {e}}^{-2\,x^2}-\frac {40\,{\mathrm {e}}^{-2\,x^2}}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((exp(-2*x^2)*(2*x^2*exp(2*x^2) - 60*x^3*exp(1) + 160*x^2 + 40))/x^2,x)

[Out]

2*x + 15*exp(1)*exp(-2*x^2) - (40*exp(-2*x^2))/x

________________________________________________________________________________________