3.104.26 \(\int \frac {-1+x+2 e^{x^2} x^2}{x} \, dx\) [10326]

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

[Out]

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

________________________________________________________________________________________

Rubi [A]
time = 0.02, antiderivative size = 11, normalized size of antiderivative = 0.38, number of steps used = 5, number of rules used = 3, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.176, Rules used = {14, 45, 2240} \begin {gather*} e^{x^2}+x-\log (x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

E^x^2 + x - 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 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 2240

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^(n_))*((e_.) + (f_.)*(x_))^(m_.), x_Symbol] :> Simp[(e + f*x)^n*(
F^(a + b*(c + d*x)^n)/(b*f*n*(c + d*x)^n*Log[F])), x] /; FreeQ[{F, a, b, c, d, e, f, n}, x] && EqQ[m, n - 1] &
& EqQ[d*e - c*f, 0]

Rubi steps

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

________________________________________________________________________________________

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

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [A]
time = 0.02, size = 11, normalized size = 0.38

method result size
default \({\mathrm e}^{x^{2}}-\ln \left (x \right )+x\) \(11\)
norman \({\mathrm e}^{x^{2}}-\ln \left (x \right )+x\) \(11\)
risch \({\mathrm e}^{x^{2}}-\ln \left (x \right )+x\) \(11\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]
time = 0.26, size = 10, normalized size = 0.34 \begin {gather*} x + e^{\left (x^{2}\right )} - \log \left (x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [A]
time = 0.38, size = 10, normalized size = 0.34 \begin {gather*} x + e^{\left (x^{2}\right )} - \log \left (x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [A]
time = 0.03, size = 8, normalized size = 0.28 \begin {gather*} x + e^{x^{2}} - \log {\left (x \right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Mupad [B]
time = 0.09, size = 10, normalized size = 0.34 \begin {gather*} x+{\mathrm {e}}^{x^2}-\ln \left (x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________