\(\int \frac {e^{-x} (e^x (5+x)+(6+2 e^x) \log (x)-3 x \log ^2(x))}{x} \, dx\) [651]

   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 = 34, antiderivative size = 23 \[ \int \frac {e^{-x} \left (e^x (5+x)+\left (6+2 e^x\right ) \log (x)-3 x \log ^2(x)\right )}{x} \, dx=-5+x+\left (1+3 e^{-x}\right ) \log ^2(x)+5 \log (3 x) \]

[Out]

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

Rubi [A] (verified)

Time = 0.18 (sec) , antiderivative size = 21, normalized size of antiderivative = 0.91, number of steps used = 8, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.147, Rules used = {6874, 14, 45, 2338, 2233} \[ \int \frac {e^{-x} \left (e^x (5+x)+\left (6+2 e^x\right ) \log (x)-3 x \log ^2(x)\right )}{x} \, dx=x+3 e^{-x} \log ^2(x)+\log ^2(x)+5 \log (x) \]

[In]

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

[Out]

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

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 45

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 2233

Int[Log[(d_.)*(x_)]^(n_.)*(F_)^((c_.)*((a_.) + (b_.)*(x_)))*(x_)^(m_.)*((e_) + Log[(d_.)*(x_)]*(h_.)*((f_.) +
(g_.)*(x_))), x_Symbol] :> Simp[e*x^(m + 1)*F^(c*(a + b*x))*(Log[d*x]^(n + 1)/(n + 1)), x] /; FreeQ[{F, a, b,
c, d, e, f, g, h, m, n}, x] && EqQ[e*(m + 1) - f*h*(n + 1), 0] && EqQ[g*h*(n + 1) - b*c*e*Log[F], 0] && NeQ[n,
 -1]

Rule 2338

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))/(x_), x_Symbol] :> Simp[(a + b*Log[c*x^n])^2/(2*b*n), x] /; FreeQ[{a
, b, c, n}, x]

Rule 6874

Int[u_, x_Symbol] :> With[{v = ExpandIntegrand[u, x]}, Int[v, x] /; SumQ[v]]

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

Mathematica [A] (verified)

Time = 0.23 (sec) , antiderivative size = 23, normalized size of antiderivative = 1.00 \[ \int \frac {e^{-x} \left (e^x (5+x)+\left (6+2 e^x\right ) \log (x)-3 x \log ^2(x)\right )}{x} \, dx=\frac {25}{4}+x+5 \log (x)+\left (1+3 e^{-x}\right ) \log ^2(x) \]

[In]

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

[Out]

25/4 + x + 5*Log[x] + (1 + 3/E^x)*Log[x]^2

Maple [A] (verified)

Time = 0.04 (sec) , antiderivative size = 21, normalized size of antiderivative = 0.91

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

[In]

int((-3*x*ln(x)^2+(2*exp(x)+6)*ln(x)+(5+x)*exp(x))/exp(x)/x,x,method=_RETURNVERBOSE)

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 25, normalized size of antiderivative = 1.09 \[ \int \frac {e^{-x} \left (e^x (5+x)+\left (6+2 e^x\right ) \log (x)-3 x \log ^2(x)\right )}{x} \, dx={\left ({\left (e^{x} + 3\right )} \log \left (x\right )^{2} + x e^{x} + 5 \, e^{x} \log \left (x\right )\right )} e^{\left (-x\right )} \]

[In]

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

[Out]

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

Sympy [A] (verification not implemented)

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

[In]

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

[Out]

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

Maxima [A] (verification not implemented)

none

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

[In]

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

[Out]

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

Giac [A] (verification not implemented)

none

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

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 7.65 (sec) , antiderivative size = 20, normalized size of antiderivative = 0.87 \[ \int \frac {e^{-x} \left (e^x (5+x)+\left (6+2 e^x\right ) \log (x)-3 x \log ^2(x)\right )}{x} \, dx=x+5\,\ln \left (x\right )+{\ln \left (x\right )}^2+3\,{\mathrm {e}}^{-x}\,{\ln \left (x\right )}^2 \]

[In]

int((exp(-x)*(exp(x)*(x + 5) - 3*x*log(x)^2 + log(x)*(2*exp(x) + 6)))/x,x)

[Out]

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