\(\int (e^x (8+4 x)+e^x (-2-2 x) \log (x)) \, dx\) [1131]

   Optimal result
   Rubi [A] (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 = 21, antiderivative size = 25 \[ \int \left (e^x (8+4 x)+e^x (-2-2 x) \log (x)\right ) \, dx=2 e^x \left (5-x \left (\frac {2 \left (x-x^2\right )}{x^2}+\log (x)\right )\right ) \]

[Out]

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

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 31, normalized size of antiderivative = 1.24, number of steps used = 6, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {2207, 2225, 2634, 12} \[ \int \left (e^x (8+4 x)+e^x (-2-2 x) \log (x)\right ) \, dx=4 e^x (x+2)-2 e^x+2 e^x \log (x)-2 e^x (x+1) \log (x) \]

[In]

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

[Out]

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

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, 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 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}& = \int e^x (8+4 x) \, dx+\int e^x (-2-2 x) \log (x) \, dx \\ & = 4 e^x (2+x)+2 e^x \log (x)-2 e^x (1+x) \log (x)-4 \int e^x \, dx-\int -2 e^x \, dx \\ & = -4 e^x+4 e^x (2+x)+2 e^x \log (x)-2 e^x (1+x) \log (x)+2 \int e^x \, dx \\ & = -2 e^x+4 e^x (2+x)+2 e^x \log (x)-2 e^x (1+x) \log (x) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.05 (sec) , antiderivative size = 14, normalized size of antiderivative = 0.56 \[ \int \left (e^x (8+4 x)+e^x (-2-2 x) \log (x)\right ) \, dx=-2 e^x (-3-2 x+x \log (x)) \]

[In]

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

[Out]

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

Maple [A] (verified)

Time = 0.03 (sec) , antiderivative size = 18, normalized size of antiderivative = 0.72

method result size
default \(4 \,{\mathrm e}^{x} x +6 \,{\mathrm e}^{x}-2 x \,{\mathrm e}^{x} \ln \left (x \right )\) \(18\)
norman \(4 \,{\mathrm e}^{x} x +6 \,{\mathrm e}^{x}-2 x \,{\mathrm e}^{x} \ln \left (x \right )\) \(18\)
risch \(4 \,{\mathrm e}^{x} x +6 \,{\mathrm e}^{x}-2 x \,{\mathrm e}^{x} \ln \left (x \right )\) \(18\)
parallelrisch \(4 \,{\mathrm e}^{x} x +6 \,{\mathrm e}^{x}-2 x \,{\mathrm e}^{x} \ln \left (x \right )\) \(18\)

[In]

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

[Out]

4*exp(x)*x+6*exp(x)-2*x*exp(x)*ln(x)

Fricas [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.68 \[ \int \left (e^x (8+4 x)+e^x (-2-2 x) \log (x)\right ) \, dx=-2 \, x e^{x} \log \left (x\right ) + 2 \, {\left (2 \, x + 3\right )} e^{x} \]

[In]

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

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.08 (sec) , antiderivative size = 14, normalized size of antiderivative = 0.56 \[ \int \left (e^x (8+4 x)+e^x (-2-2 x) \log (x)\right ) \, dx=\left (- 2 x \log {\left (x \right )} + 4 x + 6\right ) e^{x} \]

[In]

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

[Out]

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

Maxima [A] (verification not implemented)

none

Time = 0.18 (sec) , antiderivative size = 19, normalized size of antiderivative = 0.76 \[ \int \left (e^x (8+4 x)+e^x (-2-2 x) \log (x)\right ) \, dx=-2 \, x e^{x} \log \left (x\right ) + 4 \, {\left (x - 1\right )} e^{x} + 10 \, e^{x} \]

[In]

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

[Out]

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

Giac [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 19, normalized size of antiderivative = 0.76 \[ \int \left (e^x (8+4 x)+e^x (-2-2 x) \log (x)\right ) \, dx=-2 \, x e^{x} \log \left (x\right ) + 4 \, {\left (x + 1\right )} e^{x} + 2 \, e^{x} \]

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 8.22 (sec) , antiderivative size = 14, normalized size of antiderivative = 0.56 \[ \int \left (e^x (8+4 x)+e^x (-2-2 x) \log (x)\right ) \, dx=2\,{\mathrm {e}}^x\,\left (2\,x-x\,\ln \left (x\right )+3\right ) \]

[In]

int(exp(x)*(4*x + 8) - exp(x)*log(x)*(2*x + 2),x)

[Out]

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