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

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

________________________________________________________________________________________

Rubi [A]  time = 0.29, 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 = {6742, 14, 43, 2301, 2202} \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 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 2202

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 2301

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 6742

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.24, 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

________________________________________________________________________________________

fricas [A]  time = 0.67, size = 25, normalized size = 1.09 \begin {gather*} {\left ({\left (e^{x} + 3\right )} \log \relax (x)^{2} + x e^{x} + 5 \, e^{x} \log \relax (x)\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)

________________________________________________________________________________________

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

________________________________________________________________________________________

maple [A]  time = 0.06, size = 20, normalized size = 0.87




method result size



risch \(\left (3+{\mathrm e}^{x}\right ) {\mathrm e}^{-x} \ln \relax (x )^{2}+x +5 \ln \relax (x )\) \(20\)
default \(x +5 \ln \relax (x )+3 \ln \relax (x )^{2} {\mathrm e}^{-x}+\ln \relax (x )^{2}\) \(21\)
norman \(\left ({\mathrm e}^{x} x +{\mathrm e}^{x} \ln \relax (x )^{2}+5 \,{\mathrm e}^{x} \ln \relax (x )+3 \ln \relax (x )^{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]

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

________________________________________________________________________________________

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

________________________________________________________________________________________

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

________________________________________________________________________________________

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

________________________________________________________________________________________