3.19.79 \(\int (2 x+e^x x+e^x (1+x) \log (-e^x)) \, dx\)

Optimal. Leaf size=15 \[ x^2+e^x x \log \left (-e^x\right ) \]

________________________________________________________________________________________

Rubi [A]  time = 0.05, antiderivative size = 28, normalized size of antiderivative = 1.87, number of steps used = 6, number of rules used = 3, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.136, Rules used = {2176, 2194, 2554} \begin {gather*} x^2-e^x \log \left (-e^x\right )+e^x (x+1) \log \left (-e^x\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

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

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.03, size = 14, normalized size = 0.93 \begin {gather*} x \left (x+e^x \log \left (-e^x\right )\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [C]  time = 0.57, size = 15, normalized size = 1.00 \begin {gather*} x^{2} + {\left (i \, \pi x + x^{2}\right )} e^{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x^2 + (I*pi*x + x^2)*e^x

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [B]  time = 0.05, size = 28, normalized size = 1.87




method result size



norman \(-\ln \left (-{\mathrm e}^{x}\right )^{2}+2 x \ln \left (-{\mathrm e}^{x}\right )+\ln \left (-{\mathrm e}^{x}\right ) x \,{\mathrm e}^{x}\) \(28\)
default \({\mathrm e}^{x} x^{2}+{\mathrm e}^{x} \left (\ln \left (-{\mathrm e}^{x}\right )-x \right )+\left (\ln \left (-{\mathrm e}^{x}\right )-x \right ) \left ({\mathrm e}^{x} x -{\mathrm e}^{x}\right )+x^{2}\) \(42\)
risch \(i \pi \,{\mathrm e}^{x} \mathrm {csgn}\left (i {\mathrm e}^{x}\right )^{3} x -i \pi \,{\mathrm e}^{x} \mathrm {csgn}\left (i {\mathrm e}^{x}\right )^{2} x +i \pi \,{\mathrm e}^{x} x +x \,{\mathrm e}^{x} \ln \left ({\mathrm e}^{x}\right )+x^{2}\) \(49\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.44, size = 13, normalized size = 0.87 \begin {gather*} x e^{x} \log \left (-e^{x}\right ) + x^{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 0.07, size = 17, normalized size = 1.13 \begin {gather*} x^2\,{\mathrm {e}}^x+x^2+\pi \,x\,{\mathrm {e}}^x\,1{}\mathrm {i} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x^2*exp(x) + x^2 + x*pi*exp(x)*1i

________________________________________________________________________________________

sympy [C]  time = 0.13, size = 15, normalized size = 1.00 \begin {gather*} x^{2} - \left (- x^{2} - i \pi x\right ) e^{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x**2 - (-x**2 - I*pi*x)*exp(x)

________________________________________________________________________________________