3.53.48 \(\int \frac {-1+4 x^2+e^{x^2} (-2 x-4 x^3)}{x} \, dx\)

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

________________________________________________________________________________________

Rubi [A]  time = 0.05, antiderivative size = 18, normalized size of antiderivative = 0.69, number of steps used = 9, number of rules used = 4, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {14, 2226, 2204, 2212} \begin {gather*} 2 x^2-2 e^{x^2} x-\log (x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

-2*E^x^2*x + 2*x^2 - Log[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 2204

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 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 2226

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^(n_))*(u_), x_Symbol] :> Int[ExpandLinearProduct[F^(a + b*(c + d*
x)^n), u, c, d, x], x] /; FreeQ[{F, a, b, c, d, n}, x] && PolynomialQ[u, x]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 18, normalized size = 0.69 \begin {gather*} -2 e^{x^2} x+2 x^2-\log (x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

-2*E^x^2*x + 2*x^2 - Log[x]

________________________________________________________________________________________

fricas [A]  time = 0.55, size = 17, normalized size = 0.65 \begin {gather*} 2 \, x^{2} - 2 \, x e^{\left (x^{2}\right )} - \log \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.14, size = 17, normalized size = 0.65 \begin {gather*} 2 \, x^{2} - 2 \, x e^{\left (x^{2}\right )} - \log \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.03, size = 18, normalized size = 0.69




method result size



default \(2 x^{2}-\ln \relax (x )-2 \,{\mathrm e}^{x^{2}} x\) \(18\)
norman \(2 x^{2}-\ln \relax (x )-2 \,{\mathrm e}^{x^{2}} x\) \(18\)
risch \(2 x^{2}-\ln \relax (x )-2 \,{\mathrm e}^{x^{2}} x\) \(18\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

2*x^2-ln(x)-2*exp(x^2)*x

________________________________________________________________________________________

maxima [A]  time = 0.37, size = 17, normalized size = 0.65 \begin {gather*} 2 \, x^{2} - 2 \, x e^{\left (x^{2}\right )} - \log \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 0.06, size = 17, normalized size = 0.65 \begin {gather*} 2\,x^2-2\,x\,{\mathrm {e}}^{x^2}-\ln \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

2*x^2 - 2*x*exp(x^2) - log(x)

________________________________________________________________________________________

sympy [A]  time = 0.11, size = 15, normalized size = 0.58 \begin {gather*} 2 x^{2} - 2 x e^{x^{2}} - \log {\relax (x )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

2*x**2 - 2*x*exp(x**2) - log(x)

________________________________________________________________________________________