3.62.49 \(\int \frac {3+e^{-9 \pi ^2 x^2} (-1-18 \pi ^2 x^2)-\log (x)}{x^2} \, dx\) [6149]

Optimal. Leaf size=18 \[ \frac {-2+e^{-9 \pi ^2 x^2}+\log (x)}{x} \]

[Out]

(ln(x)+exp(-9*Pi^2*x^2)-2)/x

________________________________________________________________________________________

Rubi [A]
time = 0.05, antiderivative size = 29, normalized size of antiderivative = 1.61, number of steps used = 4, number of rules used = 3, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.097, Rules used = {14, 2326, 2341} \begin {gather*} \frac {e^{-9 \pi ^2 x^2}}{x}+\frac {1}{x}-\frac {3-\log (x)}{x} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(3 + (-1 - 18*Pi^2*x^2)/E^(9*Pi^2*x^2) - Log[x])/x^2,x]

[Out]

x^(-1) + 1/(E^(9*Pi^2*x^2)*x) - (3 - Log[x])/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 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 2341

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

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]
time = 0.03, size = 18, normalized size = 1.00 \begin {gather*} \frac {-2+e^{-9 \pi ^2 x^2}+\log (x)}{x} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(3 + (-1 - 18*Pi^2*x^2)/E^(9*Pi^2*x^2) - Log[x])/x^2,x]

[Out]

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

________________________________________________________________________________________

Maple [A]
time = 0.04, size = 26, normalized size = 1.44

method result size
norman \(\frac {\ln \left (x \right )+{\mathrm e}^{-9 \pi ^{2} x^{2}}-2}{x}\) \(18\)
risch \(\frac {\ln \left (x \right )}{x}+\frac {{\mathrm e}^{-9 \pi ^{2} x^{2}}-2}{x}\) \(23\)
default \(-\frac {2}{x}+\frac {\ln \left (x \right )}{x}+\frac {{\mathrm e}^{-9 \pi ^{2} x^{2}}}{x}\) \(26\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-2/x+ln(x)/x+1/x*exp(-9*Pi^2*x^2)

________________________________________________________________________________________

Maxima [C] Result contains higher order function than in optimal. Order 4 vs. order 3.
time = 0.62, size = 43, normalized size = 2.39 \begin {gather*} -3 \, \pi ^{\frac {3}{2}} \operatorname {erf}\left (3 \, \pi x\right ) + \frac {3 \, \pi \sqrt {x^{2}} \Gamma \left (-\frac {1}{2}, 9 \, \pi ^{2} x^{2}\right )}{2 \, x} + \frac {\log \left (x\right )}{x} - \frac {2}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-3*pi^(3/2)*erf(3*pi*x) + 3/2*pi*sqrt(x^2)*gamma(-1/2, 9*pi^2*x^2)/x + log(x)/x - 2/x

________________________________________________________________________________________

Fricas [A]
time = 0.46, size = 17, normalized size = 0.94 \begin {gather*} \frac {e^{\left (-9 \, \pi ^{2} x^{2}\right )} + \log \left (x\right ) - 2}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(e^(-9*pi^2*x^2) + log(x) - 2)/x

________________________________________________________________________________________

Sympy [A]
time = 0.08, size = 20, normalized size = 1.11 \begin {gather*} \frac {\log {\left (x \right )}}{x} - \frac {2}{x} + \frac {e^{- 9 \pi ^{2} x^{2}}}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-ln(x)+(-18*pi**2*x**2-1)*exp(-9*pi**2*x**2)+3)/x**2,x)

[Out]

log(x)/x - 2/x + exp(-9*pi**2*x**2)/x

________________________________________________________________________________________

Giac [A]
time = 0.41, size = 17, normalized size = 0.94 \begin {gather*} \frac {e^{\left (-9 \, \pi ^{2} x^{2}\right )} + \log \left (x\right ) - 2}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(e^(-9*pi^2*x^2) + log(x) - 2)/x

________________________________________________________________________________________

Mupad [B]
time = 4.04, size = 17, normalized size = 0.94 \begin {gather*} \frac {{\mathrm {e}}^{-9\,\Pi ^2\,x^2}+\ln \left (x\right )-2}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-(log(x) + exp(-9*Pi^2*x^2)*(18*Pi^2*x^2 + 1) - 3)/x^2,x)

[Out]

(exp(-9*Pi^2*x^2) + log(x) - 2)/x

________________________________________________________________________________________