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

Optimal. Leaf size=23 \[ -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]
time = 0.20, antiderivative size = 21, normalized size of antiderivative = 0.91, number of steps used = 8, number of rules used = 5, integrand size = 34, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.147, Rules used = {6874, 14, 45, 2338, 2233} \begin {gather*} x+3 e^{-x} \log ^2(x)+\log ^2(x)+5 \log (x) \end {gather*}

Antiderivative was successfully verified.

[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 {gather*} \begin {aligned} \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 {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]
time = 0.15, size = 23, normalized size = 1.00 \begin {gather*} \frac {25}{4}+x+5 \log (x)+\left (1+3 e^{-x}\right ) \log ^2(x) \end {gather*}

Antiderivative was successfully verified.

[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]
time = 0.08, size = 21, normalized size = 0.91

method result size
risch \(\left (3+{\mathrm e}^{x}\right ) {\mathrm e}^{-x} \ln \left (x \right )^{2}+x +5 \ln \left (x \right )\) \(20\)
default \(x +5 \ln \left (x \right )+3 \ln \left (x \right )^{2} {\mathrm e}^{-x}+\ln \left (x \right )^{2}\) \(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\)

Verification of antiderivative is not currently implemented for this CAS.

[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

________________________________________________________________________________________

Maxima [A]
time = 0.29, size = 20, normalized size = 0.87 \begin {gather*} 3 \, e^{\left (-x\right )} \log \left (x\right )^{2} + \log \left (x\right )^{2} + x + 5 \, \log \left (x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[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)

________________________________________________________________________________________

Fricas [A]
time = 0.34, size = 25, normalized size = 1.09 \begin {gather*} {\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 )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[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]
time = 0.11, size = 20, normalized size = 0.87 \begin {gather*} x + \log {\left (x \right )}^{2} + 5 \log {\left (x \right )} + 3 e^{- x} \log {\left (x \right )}^{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[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

________________________________________________________________________________________

Giac [A]
time = 0.41, size = 20, normalized size = 0.87 \begin {gather*} 3 \, e^{\left (-x\right )} \log \left (x\right )^{2} + \log \left (x\right )^{2} + x + 5 \, \log \left (x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[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]
time = 0.58, size = 20, normalized size = 0.87 \begin {gather*} x+5\,\ln \left (x\right )+{\ln \left (x\right )}^2+3\,{\mathrm {e}}^{-x}\,{\ln \left (x\right )}^2 \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[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

________________________________________________________________________________________