3.35.62 \(\int \frac {1+e^x (1-x)-e^x x^2 \log (x)}{x} \, dx\)

Optimal. Leaf size=19 \[ 2-5 e^3+\log (x)-e^x (-1+x) \log (x) \]

________________________________________________________________________________________

Rubi [A]  time = 0.18, antiderivative size = 17, normalized size of antiderivative = 0.89, number of steps used = 13, number of rules used = 7, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.280, Rules used = {14, 6742, 2199, 2194, 2178, 2176, 2554} \begin {gather*} e^x \log (x)-e^x x \log (x)+\log (x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

Log[x] + E^x*Log[x] - E^x*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 2176

Int[((b_.)*(F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[((c + d*x)^m
*(b*F^(g*(e + f*x)))^n)/(f*g*n*Log[F]), x] - Dist[(d*m)/(f*g*n*Log[F]), Int[(c + d*x)^(m - 1)*(b*F^(g*(e + f*x
)))^n, x], x] /; FreeQ[{F, b, c, d, e, f, g, n}, x] && GtQ[m, 0] && IntegerQ[2*m] &&  !$UseGamma === True

Rule 2178

Int[(F_)^((g_.)*((e_.) + (f_.)*(x_)))/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[(F^(g*(e - (c*f)/d))*ExpIntegral
Ei[(f*g*(c + d*x)*Log[F])/d])/d, x] /; FreeQ[{F, c, d, e, f, g}, x] &&  !$UseGamma === True

Rule 2194

Int[((F_)^((c_.)*((a_.) + (b_.)*(x_))))^(n_.), x_Symbol] :> Simp[(F^(c*(a + b*x)))^n/(b*c*n*Log[F]), x] /; Fre
eQ[{F, a, b, c, n}, x]

Rule 2199

Int[(F_)^((c_.)*(v_))*(u_)^(m_.)*(w_), x_Symbol] :> Int[ExpandIntegrand[F^(c*ExpandToSum[v, x]), w*NormalizePo
werOfLinear[u, x]^m, x], x] /; FreeQ[{F, c}, x] && PolynomialQ[w, x] && LinearQ[v, x] && PowerOfLinearQ[u, x]
&& IntegerQ[m] &&  !$UseGamma === True

Rule 2554

Int[Log[u_]*(v_), x_Symbol] :> With[{w = IntHide[v, x]}, Dist[Log[u], w, x] - Int[SimplifyIntegrand[(w*D[u, x]
)/u, x], x] /; InverseFunctionFreeQ[w, x]] /; InverseFunctionFreeQ[u, x]

Rule 6742

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

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.09, size = 13, normalized size = 0.68 \begin {gather*} \log (x)-e^x (-1+x) \log (x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.63, size = 12, normalized size = 0.63 \begin {gather*} -{\left ({\left (x - 1\right )} e^{x} - 1\right )} \log \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.15, size = 15, normalized size = 0.79 \begin {gather*} -x e^{x} \log \relax (x) + e^{x} \log \relax (x) + \log \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.03, size = 13, normalized size = 0.68




method result size



risch \(-\left (x -1\right ) {\mathrm e}^{x} \ln \relax (x )+\ln \relax (x )\) \(13\)
default \(\ln \relax (x )+{\mathrm e}^{x} \ln \relax (x )-x \,{\mathrm e}^{x} \ln \relax (x )\) \(16\)
norman \(\ln \relax (x )+{\mathrm e}^{x} \ln \relax (x )-x \,{\mathrm e}^{x} \ln \relax (x )\) \(16\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-(x-1)*exp(x)*ln(x)+ln(x)

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} -{\left (x - 1\right )} e^{x} \log \relax (x) + {\rm Ei}\relax (x) - e^{x} + \int \frac {{\left (x - 1\right )} e^{x}}{x}\,{d x} + \log \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-(x - 1)*e^x*log(x) + Ei(x) - e^x + integrate((x - 1)*e^x/x, x) + log(x)

________________________________________________________________________________________

mupad [B]  time = 2.18, size = 12, normalized size = 0.63 \begin {gather*} \ln \relax (x)\,\left ({\mathrm {e}}^x-x\,{\mathrm {e}}^x+1\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.30, size = 14, normalized size = 0.74 \begin {gather*} \left (- x \log {\relax (x )} + \log {\relax (x )}\right ) e^{x} + \log {\relax (x )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________