\(\int \frac {e^{x^2} (1+4 x^4)}{x^2} \, dx\) [735]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [C] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 16, antiderivative size = 19 \[ \int \frac {e^{x^2} \left (1+4 x^4\right )}{x^2} \, dx=-\frac {e^{x^2}}{x}+2 e^{x^2} x \]

[Out]

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

Rubi [A] (verified)

Time = 0.07 (sec) , antiderivative size = 19, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {6874, 2245, 2235, 2243} \[ \int \frac {e^{x^2} \left (1+4 x^4\right )}{x^2} \, dx=2 e^{x^2} x-\frac {e^{x^2}}{x} \]

[In]

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

[Out]

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

Rule 2235

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

Rule 2243

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 2245

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 6874

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

Rubi steps \begin{align*} \text {integral}& = \int \left (\frac {e^{x^2}}{x^2}+4 e^{x^2} x^2\right ) \, dx \\ & = 4 \int e^{x^2} x^2 \, dx+\int \frac {e^{x^2}}{x^2} \, dx \\ & = -\frac {e^{x^2}}{x}+2 e^{x^2} x \\ \end{align*}

Mathematica [A] (verified)

Time = 0.08 (sec) , antiderivative size = 16, normalized size of antiderivative = 0.84 \[ \int \frac {e^{x^2} \left (1+4 x^4\right )}{x^2} \, dx=\frac {e^{x^2} \left (-1+2 x^2\right )}{x} \]

[In]

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

[Out]

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

Maple [A] (verified)

Time = 0.04 (sec) , antiderivative size = 16, normalized size of antiderivative = 0.84

method result size
gosper \(\frac {{\mathrm e}^{x^{2}} \left (2 x^{2}-1\right )}{x}\) \(16\)
risch \(\frac {{\mathrm e}^{x^{2}} \left (2 x^{2}-1\right )}{x}\) \(16\)
default \(-\frac {{\mathrm e}^{x^{2}}}{x}+2 \,{\mathrm e}^{x^{2}} x\) \(18\)
norman \(\frac {2 \,{\mathrm e}^{x^{2}} x^{2}-{\mathrm e}^{x^{2}}}{x}\) \(21\)
parallelrisch \(\frac {2 \,{\mathrm e}^{x^{2}} x^{2}-{\mathrm e}^{x^{2}}}{x}\) \(21\)
meijerg \(2 i \left (-i x \,{\mathrm e}^{x^{2}}+\frac {i \operatorname {erfi}\left (x \right ) \sqrt {\pi }}{2}\right )+\frac {i \left (\frac {2 i {\mathrm e}^{x^{2}}}{x}-2 i \operatorname {erfi}\left (x \right ) \sqrt {\pi }\right )}{2}\) \(44\)

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 15, normalized size of antiderivative = 0.79 \[ \int \frac {e^{x^2} \left (1+4 x^4\right )}{x^2} \, dx=\frac {{\left (2 \, x^{2} - 1\right )} e^{\left (x^{2}\right )}}{x} \]

[In]

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

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.04 (sec) , antiderivative size = 12, normalized size of antiderivative = 0.63 \[ \int \frac {e^{x^2} \left (1+4 x^4\right )}{x^2} \, dx=\frac {\left (2 x^{2} - 1\right ) e^{x^{2}}}{x} \]

[In]

integrate(exp(x**2)*(4*x**4+1)/x**2,x)

[Out]

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

Maxima [C] (verification not implemented)

Result contains higher order function than in optimal. Order 4 vs. order 3.

Time = 0.22 (sec) , antiderivative size = 36, normalized size of antiderivative = 1.89 \[ \int \frac {e^{x^2} \left (1+4 x^4\right )}{x^2} \, dx=2 \, x e^{\left (x^{2}\right )} + i \, \sqrt {\pi } \operatorname {erf}\left (i \, x\right ) - \frac {\sqrt {-x^{2}} \Gamma \left (-\frac {1}{2}, -x^{2}\right )}{2 \, x} \]

[In]

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

[Out]

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

Giac [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 20, normalized size of antiderivative = 1.05 \[ \int \frac {e^{x^2} \left (1+4 x^4\right )}{x^2} \, dx=\frac {2 \, x^{2} e^{\left (x^{2}\right )} - e^{\left (x^{2}\right )}}{x} \]

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 0.25 (sec) , antiderivative size = 15, normalized size of antiderivative = 0.79 \[ \int \frac {e^{x^2} \left (1+4 x^4\right )}{x^2} \, dx=\frac {{\mathrm {e}}^{x^2}\,\left (2\,x^2-1\right )}{x} \]

[In]

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

[Out]

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