3.58.77 \(\int \frac {e^{-2 x^2} (-2-8 x^2-e^{2 x^2} x^2+(x^2-4 x^4) \log (8))}{x^2} \, dx\)

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

________________________________________________________________________________________

Rubi [C]  time = 0.57, antiderivative size = 94, normalized size of antiderivative = 4.27, number of steps used = 9, number of rules used = 4, integrand size = 42, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.095, Rules used = {6742, 2214, 2205, 2212} \begin {gather*} 2 \sqrt {2 \pi } \text {erf}\left (\sqrt {2} x\right )-\frac {1}{2} \sqrt {\frac {\pi }{2}} \log (8) \text {erf}\left (\sqrt {2} x\right )-\frac {1}{2} \sqrt {\frac {\pi }{2}} (8-\log (8)) \text {erf}\left (\sqrt {2} x\right )+\frac {2 e^{-2 x^2}}{x}+e^{-2 x^2} x \log (8)-x \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

2/(E^(2*x^2)*x) - x + 2*Sqrt[2*Pi]*Erf[Sqrt[2]*x] - (Sqrt[Pi/2]*Erf[Sqrt[2]*x]*(8 - Log[8]))/2 + (x*Log[8])/E^
(2*x^2) - (Sqrt[Pi/2]*Erf[Sqrt[2]*x]*Log[8])/2

Rule 2205

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^2), x_Symbol] :> Simp[(F^a*Sqrt[Pi]*Erf[(c + d*x)*Rt[-(b*Log[F]),
 2]])/(2*d*Rt[-(b*Log[F]), 2]), x] /; FreeQ[{F, a, b, c, d}, x] && NegQ[b]

Rule 2212

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^(n_))*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[((c + d*x)^(m
 - n + 1)*F^(a + b*(c + d*x)^n))/(b*d*n*Log[F]), x] - Dist[(m - n + 1)/(b*n*Log[F]), Int[(c + d*x)^(m - n)*F^(
a + b*(c + d*x)^n), x], x] /; FreeQ[{F, a, b, c, d}, x] && IntegerQ[(2*(m + 1))/n] && LtQ[0, (m + 1)/n, 5] &&
IntegerQ[n] && (LtQ[0, n, m + 1] || LtQ[m, n, 0])

Rule 2214

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^(n_))*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[((c + d*x)^(m
 + 1)*F^(a + b*(c + d*x)^n))/(d*(m + 1)), x] - Dist[(b*n*Log[F])/(m + 1), Int[(c + d*x)^(m + n)*F^(a + b*(c +
d*x)^n), x], x] /; FreeQ[{F, a, b, c, d}, x] && IntegerQ[(2*(m + 1))/n] && LtQ[-4, (m + 1)/n, 5] && IntegerQ[n
] && ((GtQ[n, 0] && LtQ[m, -1]) || (GtQ[-n, 0] && LeQ[-n, m + 1]))

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

________________________________________________________________________________________

Mathematica [A]  time = 0.16, size = 22, normalized size = 1.00 \begin {gather*} -x+e^{-2 x^2} \left (\frac {2}{x}+x \log (8)\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

-x + (2/x + x*Log[8])/E^(2*x^2)

________________________________________________________________________________________

fricas [A]  time = 0.92, size = 30, normalized size = 1.36 \begin {gather*} -\frac {{\left (x^{2} e^{\left (2 \, x^{2}\right )} - 3 \, x^{2} \log \relax (2) - 2\right )} e^{\left (-2 \, x^{2}\right )}}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-(x^2*e^(2*x^2) - 3*x^2*log(2) - 2)*e^(-2*x^2)/x

________________________________________________________________________________________

giac [A]  time = 0.12, size = 31, normalized size = 1.41 \begin {gather*} \frac {3 \, x^{2} e^{\left (-2 \, x^{2}\right )} \log \relax (2) - x^{2} + 2 \, e^{\left (-2 \, x^{2}\right )}}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.06, size = 24, normalized size = 1.09




method result size



risch \(-x +\frac {\left (3 x^{2} \ln \relax (2)+2\right ) {\mathrm e}^{-2 x^{2}}}{x}\) \(24\)
default \(-x +\frac {2 \,{\mathrm e}^{-2 x^{2}}}{x}+3 \ln \relax (2) x \,{\mathrm e}^{-2 x^{2}}\) \(27\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [C]  time = 0.49, size = 80, normalized size = 3.64 \begin {gather*} \frac {3}{4} \, \sqrt {2} \sqrt {\pi } \operatorname {erf}\left (\sqrt {2} x\right ) \log \relax (2) - 2 \, \sqrt {2} \sqrt {\pi } \operatorname {erf}\left (\sqrt {2} x\right ) - \frac {3}{4} \, {\left (\sqrt {2} \sqrt {\pi } \operatorname {erf}\left (\sqrt {2} x\right ) - 4 \, x e^{\left (-2 \, x^{2}\right )}\right )} \log \relax (2) - x + \frac {\sqrt {2} \sqrt {x^{2}} \Gamma \left (-\frac {1}{2}, 2 \, x^{2}\right )}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

3/4*sqrt(2)*sqrt(pi)*erf(sqrt(2)*x)*log(2) - 2*sqrt(2)*sqrt(pi)*erf(sqrt(2)*x) - 3/4*(sqrt(2)*sqrt(pi)*erf(sqr
t(2)*x) - 4*x*e^(-2*x^2))*log(2) - x + sqrt(2)*sqrt(x^2)*gamma(-1/2, 2*x^2)/x

________________________________________________________________________________________

mupad [B]  time = 0.11, size = 26, normalized size = 1.18 \begin {gather*} x\,\left (3\,{\mathrm {e}}^{-2\,x^2}\,\ln \relax (2)-1\right )+\frac {2\,{\mathrm {e}}^{-2\,x^2}}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-(exp(-2*x^2)*(x^2*exp(2*x^2) - 3*log(2)*(x^2 - 4*x^4) + 8*x^2 + 2))/x^2,x)

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.12, size = 19, normalized size = 0.86 \begin {gather*} - x + \frac {\left (3 x^{2} \log {\relax (2 )} + 2\right ) e^{- 2 x^{2}}}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-x**2*exp(x**2)**2+3*(-4*x**4+x**2)*ln(2)-8*x**2-2)/x**2/exp(x**2)**2,x)

[Out]

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

________________________________________________________________________________________