3.37.43 \(\int (-1+4 e^x-3 x+x^2+(-2 x+3 x^2) \log (x)) \, dx\)

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

________________________________________________________________________________________

Rubi [A]  time = 0.03, antiderivative size = 27, normalized size of antiderivative = 1.17, number of steps used = 6, number of rules used = 4, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.160, Rules used = {2194, 1593, 43, 2334} \begin {gather*} -x^2-\left (x^2-x^3\right ) \log (x)-x+4 e^x \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

4*E^x - x - x^2 - (x^2 - x^3)*Log[x]

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

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

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*(x_)^(m_.)*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol] :> With[{u = I
ntHide[x^m*(d + e*x^r)^q, x]}, Simp[u*(a + b*Log[c*x^n]), x] - Dist[b*n, Int[SimplifyIntegrand[u/x, x], x], x]
] /; FreeQ[{a, b, c, d, e, n, r}, x] && IGtQ[q, 0] && IntegerQ[m] &&  !(EqQ[q, 1] && EqQ[m, -1])

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 27, normalized size = 1.17 \begin {gather*} 4 e^x-x-x^2-x^2 \log (x)+x^3 \log (x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.13, size = 26, normalized size = 1.13 \begin {gather*} x^{3} \log \relax (x) - x^{2} \log \relax (x) - x^{2} - x + 4 \, e^{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.03, size = 26, normalized size = 1.13




method result size



risch \(\left (x^{3}-x^{2}\right ) \ln \relax (x )-x^{2}+4 \,{\mathrm e}^{x}-x\) \(26\)
default \(-x +x^{3} \ln \relax (x )-x^{2} \ln \relax (x )-x^{2}+4 \,{\mathrm e}^{x}\) \(27\)
norman \(-x +x^{3} \ln \relax (x )-x^{2} \ln \relax (x )-x^{2}+4 \,{\mathrm e}^{x}\) \(27\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.36, size = 25, normalized size = 1.09 \begin {gather*} -x^{2} + {\left (x^{3} - x^{2}\right )} \log \relax (x) - x + 4 \, e^{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________