\(\int (-5+e^x (1+x)+(-5+e^x (1+3 x+x^2)) \log (x)) \, dx\) [4129]

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

Optimal result

Integrand size = 26, antiderivative size = 13 \[ \int \left (-5+e^x (1+x)+\left (-5+e^x \left (1+3 x+x^2\right )\right ) \log (x)\right ) \, dx=x \left (-5+e^x (1+x)\right ) \log (x) \]

[Out]

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

Rubi [A] (verified)

Time = 0.04 (sec) , antiderivative size = 22, normalized size of antiderivative = 1.69, number of steps used = 7, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {2207, 2225, 2227, 2634} \[ \int \left (-5+e^x (1+x)+\left (-5+e^x \left (1+3 x+x^2\right )\right ) \log (x)\right ) \, dx=e^x x^2 \log (x)+e^x x \log (x)-5 x \log (x) \]

[In]

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

[Out]

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

Rule 2207

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] &&  !TrueQ[$UseGamma]

Rule 2225

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 2227

Int[(F_)^((c_.)*(v_))*(u_), x_Symbol] :> Int[ExpandIntegrand[F^(c*ExpandToSum[v, x]), u, x], x] /; FreeQ[{F, c
}, x] && PolynomialQ[u, x] && LinearQ[v, x] &&  !TrueQ[$UseGamma]

Rule 2634

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]

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

Mathematica [A] (verified)

Time = 0.07 (sec) , antiderivative size = 14, normalized size of antiderivative = 1.08 \[ \int \left (-5+e^x (1+x)+\left (-5+e^x \left (1+3 x+x^2\right )\right ) \log (x)\right ) \, dx=x \left (-5+e^x+e^x x\right ) \log (x) \]

[In]

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

[Out]

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

Maple [A] (verified)

Time = 0.73 (sec) , antiderivative size = 13, normalized size of antiderivative = 1.00

method result size
risch \(x \left ({\mathrm e}^{x}-5+{\mathrm e}^{x} x \right ) \ln \left (x \right )\) \(13\)
default \(x \,{\mathrm e}^{x} \ln \left (x \right )+x^{2} {\mathrm e}^{x} \ln \left (x \right )-5 x \ln \left (x \right )\) \(21\)
norman \(x \,{\mathrm e}^{x} \ln \left (x \right )+x^{2} {\mathrm e}^{x} \ln \left (x \right )-5 x \ln \left (x \right )\) \(21\)
parallelrisch \(x \,{\mathrm e}^{x} \ln \left (x \right )+x^{2} {\mathrm e}^{x} \ln \left (x \right )-5 x \ln \left (x \right )\) \(21\)
parts \(x \,{\mathrm e}^{x} \ln \left (x \right )+x^{2} {\mathrm e}^{x} \ln \left (x \right )-5 x \ln \left (x \right )\) \(21\)

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 15, normalized size of antiderivative = 1.15 \[ \int \left (-5+e^x (1+x)+\left (-5+e^x \left (1+3 x+x^2\right )\right ) \log (x)\right ) \, dx={\left ({\left (x^{2} + x\right )} e^{x} - 5 \, x\right )} \log \left (x\right ) \]

[In]

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

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.10 (sec) , antiderivative size = 20, normalized size of antiderivative = 1.54 \[ \int \left (-5+e^x (1+x)+\left (-5+e^x \left (1+3 x+x^2\right )\right ) \log (x)\right ) \, dx=- 5 x \log {\left (x \right )} + \left (x^{2} \log {\left (x \right )} + x \log {\left (x \right )}\right ) e^{x} \]

[In]

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

[Out]

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

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 29 vs. \(2 (12) = 24\).

Time = 0.18 (sec) , antiderivative size = 29, normalized size of antiderivative = 2.23 \[ \int \left (-5+e^x (1+x)+\left (-5+e^x \left (1+3 x+x^2\right )\right ) \log (x)\right ) \, dx={\left (x - 1\right )} e^{x} - x e^{x} + {\left ({\left (x^{2} + x\right )} e^{x} - 5 \, x\right )} \log \left (x\right ) + e^{x} \]

[In]

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

[Out]

(x - 1)*e^x - x*e^x + ((x^2 + x)*e^x - 5*x)*log(x) + e^x

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 31 vs. \(2 (12) = 24\).

Time = 0.26 (sec) , antiderivative size = 31, normalized size of antiderivative = 2.38 \[ \int \left (-5+e^x (1+x)+\left (-5+e^x \left (1+3 x+x^2\right )\right ) \log (x)\right ) \, dx=-{\left (x - 1\right )} e^{x} + x e^{x} + {\left ({\left (x^{2} + x\right )} e^{x} - 5 \, x\right )} \log \left (x\right ) - e^{x} \]

[In]

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

[Out]

-(x - 1)*e^x + x*e^x + ((x^2 + x)*e^x - 5*x)*log(x) - e^x

Mupad [B] (verification not implemented)

Time = 9.79 (sec) , antiderivative size = 12, normalized size of antiderivative = 0.92 \[ \int \left (-5+e^x (1+x)+\left (-5+e^x \left (1+3 x+x^2\right )\right ) \log (x)\right ) \, dx=x\,\ln \left (x\right )\,\left ({\mathrm {e}}^x+x\,{\mathrm {e}}^x-5\right ) \]

[In]

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

[Out]

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