\(\int (e^x (-3-3 x)+3 x+6 e^3 x+6 x \log (x)) \, dx\) [4842]

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

Optimal result

Integrand size = 24, antiderivative size = 18 \[ \int \left (e^x (-3-3 x)+3 x+6 e^3 x+6 x \log (x)\right ) \, dx=3 x \left (-e^x+e^3 x+x \log (x)\right ) \]

[Out]

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

Rubi [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(42\) vs. \(2(18)=36\).

Time = 0.01 (sec) , antiderivative size = 42, normalized size of antiderivative = 2.33, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {6, 2207, 2225, 2341} \[ \int \left (e^x (-3-3 x)+3 x+6 e^3 x+6 x \log (x)\right ) \, dx=\frac {3}{2} \left (1+2 e^3\right ) x^2-\frac {3 x^2}{2}+3 x^2 \log (x)+3 e^x-3 e^x (x+1) \]

[In]

Int[E^x*(-3 - 3*x) + 3*x + 6*E^3*x + 6*x*Log[x],x]

[Out]

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

Rule 6

Int[(u_.)*((w_.) + (a_.)*(v_) + (b_.)*(v_))^(p_.), x_Symbol] :> Int[u*((a + b)*v + w)^p, x] /; FreeQ[{a, b}, x
] &&  !FreeQ[v, 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 2341

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[(d*x)^(m + 1)*((a + b*Log[c*x^
n])/(d*(m + 1))), x] - Simp[b*n*((d*x)^(m + 1)/(d*(m + 1)^2)), x] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[m, -1
]

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

Mathematica [A] (verified)

Time = 0.02 (sec) , antiderivative size = 22, normalized size of antiderivative = 1.22 \[ \int \left (e^x (-3-3 x)+3 x+6 e^3 x+6 x \log (x)\right ) \, dx=-3 e^x x+3 e^3 x^2+3 x^2 \log (x) \]

[In]

Integrate[E^x*(-3 - 3*x) + 3*x + 6*E^3*x + 6*x*Log[x],x]

[Out]

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

Maple [A] (verified)

Time = 0.05 (sec) , antiderivative size = 21, normalized size of antiderivative = 1.17

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

[In]

int(6*x*ln(x)+(-3*x-3)*exp(x)+6*x*exp(3)+3*x,x,method=_RETURNVERBOSE)

[Out]

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

Fricas [A] (verification not implemented)

none

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

[In]

integrate(6*x*log(x)+(-3*x-3)*exp(x)+6*x*exp(3)+3*x,x, algorithm="fricas")

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.07 (sec) , antiderivative size = 22, normalized size of antiderivative = 1.22 \[ \int \left (e^x (-3-3 x)+3 x+6 e^3 x+6 x \log (x)\right ) \, dx=3 x^{2} \log {\left (x \right )} + 3 x^{2} e^{3} - 3 x e^{x} \]

[In]

integrate(6*x*ln(x)+(-3*x-3)*exp(x)+6*x*exp(3)+3*x,x)

[Out]

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

Maxima [A] (verification not implemented)

none

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

[In]

integrate(6*x*log(x)+(-3*x-3)*exp(x)+6*x*exp(3)+3*x,x, algorithm="maxima")

[Out]

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

Giac [A] (verification not implemented)

none

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

[In]

integrate(6*x*log(x)+(-3*x-3)*exp(x)+6*x*exp(3)+3*x,x, algorithm="giac")

[Out]

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

Mupad [B] (verification not implemented)

Time = 10.83 (sec) , antiderivative size = 16, normalized size of antiderivative = 0.89 \[ \int \left (e^x (-3-3 x)+3 x+6 e^3 x+6 x \log (x)\right ) \, dx=3\,x\,\left (x\,{\mathrm {e}}^3-{\mathrm {e}}^x+x\,\ln \left (x\right )\right ) \]

[In]

int(3*x + 6*x*exp(3) - exp(x)*(3*x + 3) + 6*x*log(x),x)

[Out]

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