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

Optimal. Leaf size=27 \[ \left (5+e^{-x+x^2}\right ) x+(10-x-\log (4))^2+\log (x) \]

________________________________________________________________________________________

Rubi [A]  time = 0.05, antiderivative size = 39, normalized size of antiderivative = 1.44, number of steps used = 6, number of rules used = 3, integrand size = 41, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.073, Rules used = {6, 14, 2288} \begin {gather*} x^2+\frac {e^{x^2-x} \left (x-2 x^2\right )}{1-2 x}-x (15-\log (16))+\log (x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

x^2 + (E^(-x + x^2)*(x - 2*x^2))/(1 - 2*x) - x*(15 - Log[16]) + Log[x]

Rule 6

Int[(u_.)*((w_.) + (a_.)*(v_) + (b_.)*(v_))^(p_.), x_Symbol] :> Int[u*((a + b)*v + w)^p, x] /; FreeQ[{a, b}, x
] &&  !FreeQ[v, 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 2288

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]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.05, size = 17, normalized size = 0.63 \begin {gather*} x \left (-15+e^{(-1+x) x}+x+\log (16)\right )+\log (x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

x*(-15 + E^((-1 + x)*x) + x + Log[16]) + Log[x]

________________________________________________________________________________________

fricas [A]  time = 0.82, size = 24, normalized size = 0.89 \begin {gather*} x^{2} + x e^{\left (x^{2} - x\right )} + 4 \, x \log \relax (2) - 15 \, x + \log \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x^2 + x*e^(x^2 - x) + 4*x*log(2) - 15*x + log(x)

________________________________________________________________________________________

giac [A]  time = 0.13, size = 24, normalized size = 0.89 \begin {gather*} x^{2} + x e^{\left (x^{2} - x\right )} + 4 \, x \log \relax (2) - 15 \, x + \log \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x^2 + x*e^(x^2 - x) + 4*x*log(2) - 15*x + log(x)

________________________________________________________________________________________

maple [A]  time = 0.04, size = 23, normalized size = 0.85




method result size



risch \(-15 x +\ln \relax (x )+x^{2}+x \,{\mathrm e}^{x \left (x -1\right )}+4 x \ln \relax (2)\) \(23\)
default \(-15 x +\ln \relax (x )+x^{2}+x \,{\mathrm e}^{x^{2}-x}+4 x \ln \relax (2)\) \(25\)
norman \(x^{2}+x \,{\mathrm e}^{x^{2}-x}+\left (4 \ln \relax (2)-15\right ) x +\ln \relax (x )\) \(25\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-15*x+ln(x)+x^2+x*exp(x*(x-1))+4*x*ln(2)

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 0.08, size = 22, normalized size = 0.81 \begin {gather*} \ln \relax (x)+x\,{\mathrm {e}}^{x^2-x}+x\,\left (\ln \left (16\right )-15\right )+x^2 \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

log(x) + x*exp(x^2 - x) + x*(log(16) - 15) + x^2

________________________________________________________________________________________

sympy [A]  time = 0.15, size = 22, normalized size = 0.81 \begin {gather*} x^{2} + x e^{x^{2} - x} + x \left (-15 + 4 \log {\relax (2 )}\right ) + \log {\relax (x )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________