3.29.76 \(\int (-4 x+12 x^2+e^x (4-5 x-5 x^2)+e^x (2 x+x^2) \log (x)) \, dx\)

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

________________________________________________________________________________________

Rubi [A]  time = 0.13, antiderivative size = 34, normalized size of antiderivative = 1.55, number of steps used = 13, number of rules used = 5, integrand size = 36, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.139, Rules used = {2196, 2194, 2176, 1593, 2554} \begin {gather*} 4 x^3-5 e^x x^2-2 x^2+e^x x^2 \log (x)+4 e^x x \end {gather*}

Antiderivative was successfully verified.

[In]

Int[-4*x + 12*x^2 + E^x*(4 - 5*x - 5*x^2) + E^x*(2*x + x^2)*Log[x],x]

[Out]

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

Rule 1593

Int[(u_.)*((a_.)*(x_)^(p_.) + (b_.)*(x_)^(q_.))^(n_.), x_Symbol] :> Int[u*x^(n*p)*(a + b*x^(q - p))^n, x] /; F
reeQ[{a, b, p, q}, x] && IntegerQ[n] && PosQ[q - p]

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 2196

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

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.06, size = 27, normalized size = 1.23 \begin {gather*} x \left (e^x (4-5 x)+2 x (-1+2 x)+e^x x \log (x)\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[-4*x + 12*x^2 + E^x*(4 - 5*x - 5*x^2) + E^x*(2*x + x^2)*Log[x],x]

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.51, size = 32, normalized size = 1.45 \begin {gather*} x^{2} e^{x} \log \relax (x) + 4 \, x^{3} - 2 \, x^{2} - {\left (5 \, x^{2} - 4 \, x\right )} e^{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.25, size = 40, normalized size = 1.82 \begin {gather*} x^{2} e^{x} \log \relax (x) + 4 \, x^{3} - 2 \, x^{2} - {\left (5 \, x^{2} - 5 \, x + 1\right )} e^{x} - {\left (x - 1\right )} e^{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.04, size = 32, normalized size = 1.45




method result size



default \(4 \,{\mathrm e}^{x} x -5 \,{\mathrm e}^{x} x^{2}+x^{2} {\mathrm e}^{x} \ln \relax (x )-2 x^{2}+4 x^{3}\) \(32\)
norman \(4 \,{\mathrm e}^{x} x -5 \,{\mathrm e}^{x} x^{2}+x^{2} {\mathrm e}^{x} \ln \relax (x )-2 x^{2}+4 x^{3}\) \(32\)
risch \(4 \,{\mathrm e}^{x} x -5 \,{\mathrm e}^{x} x^{2}+x^{2} {\mathrm e}^{x} \ln \relax (x )-2 x^{2}+4 x^{3}\) \(32\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

4*exp(x)*x-5*exp(x)*x^2+x^2*exp(x)*ln(x)-2*x^2+4*x^3

________________________________________________________________________________________

maxima [A]  time = 0.45, size = 40, normalized size = 1.82 \begin {gather*} x^{2} e^{x} \log \relax (x) + 4 \, x^{3} - 2 \, x^{2} - {\left (5 \, x^{2} - 5 \, x + 1\right )} e^{x} - {\left (x - 1\right )} e^{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 1.73, size = 31, normalized size = 1.41 \begin {gather*} 4\,x\,{\mathrm {e}}^x-5\,x^2\,{\mathrm {e}}^x-2\,x^2+4\,x^3+x^2\,{\mathrm {e}}^x\,\ln \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(12*x^2 - exp(x)*(5*x + 5*x^2 - 4) - 4*x + exp(x)*log(x)*(2*x + x^2),x)

[Out]

4*x*exp(x) - 5*x^2*exp(x) - 2*x^2 + 4*x^3 + x^2*exp(x)*log(x)

________________________________________________________________________________________

sympy [A]  time = 0.28, size = 27, normalized size = 1.23 \begin {gather*} 4 x^{3} - 2 x^{2} + \left (x^{2} \log {\relax (x )} - 5 x^{2} + 4 x\right ) e^{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x**2+2*x)*exp(x)*ln(x)+(-5*x**2-5*x+4)*exp(x)+12*x**2-4*x,x)

[Out]

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

________________________________________________________________________________________