3.37.63 \(\int \frac {e^{-x} (-2+3 x-4 x^2+x^3+\frac {5}{2} e^2 (1-x+x^2)+(3 x-\frac {5 e^2 x}{2}-x^2) \log (x))}{x} \, dx\)

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

________________________________________________________________________________________

Rubi [B]  time = 0.56, antiderivative size = 104, normalized size of antiderivative = 4.73, number of steps used = 16, number of rules used = 6, integrand size = 57, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.105, Rules used = {6742, 2199, 2194, 2178, 2176, 2554} \begin {gather*} -e^{-x} x^2-2 e^{-x} x+\frac {1}{2} \left (8-5 e^2\right ) e^{-x} x-e^{-x}+\frac {1}{2} \left (8-5 e^2\right ) e^{-x}-\frac {1}{2} \left (6-5 e^2\right ) e^{-x}+e^{-x} \log (x)-\frac {1}{2} e^{-x} \left (-2 x-5 e^2+6\right ) \log (x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

-E^(-x) - (6 - 5*E^2)/(2*E^x) + (8 - 5*E^2)/(2*E^x) - (2*x)/E^x + ((8 - 5*E^2)*x)/(2*E^x) - x^2/E^x + Log[x]/E
^x - ((6 - 5*E^2 - 2*x)*Log[x])/(2*E^x)

Rule 2176

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] &&  !$UseGamma === True

Rule 2178

Int[(F_)^((g_.)*((e_.) + (f_.)*(x_)))/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[(F^(g*(e - (c*f)/d))*ExpIntegral
Ei[(f*g*(c + d*x)*Log[F])/d])/d, x] /; FreeQ[{F, c, d, e, f, g}, x] &&  !$UseGamma === True

Rule 2194

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 2199

Int[(F_)^((c_.)*(v_))*(u_)^(m_.)*(w_), x_Symbol] :> Int[ExpandIntegrand[F^(c*ExpandToSum[v, x]), w*NormalizePo
werOfLinear[u, x]^m, x], x] /; FreeQ[{F, c}, x] && PolynomialQ[w, x] && LinearQ[v, x] && PowerOfLinearQ[u, x]
&& IntegerQ[m] &&  !$UseGamma === True

Rule 2554

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]

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 {e^{-x} \left (-4+5 e^2+\left (6-5 e^2\right ) x-\left (8-5 e^2\right ) x^2+2 x^3\right )}{2 x}-\frac {1}{2} e^{-x} \left (-6+5 e^2+2 x\right ) \log (x)\right ) \, dx\\ &=\frac {1}{2} \int \frac {e^{-x} \left (-4+5 e^2+\left (6-5 e^2\right ) x-\left (8-5 e^2\right ) x^2+2 x^3\right )}{x} \, dx-\frac {1}{2} \int e^{-x} \left (-6+5 e^2+2 x\right ) \log (x) \, dx\\ &=e^{-x} \log (x)-\frac {1}{2} e^{-x} \left (6-5 e^2-2 x\right ) \log (x)+\frac {1}{2} \int \frac {e^{-x} \left (4-5 e^2-2 x\right )}{x} \, dx+\frac {1}{2} \int \left (e^{-x} \left (6-5 e^2\right )+\frac {e^{-x} \left (-4+5 e^2\right )}{x}-e^{-x} \left (8-5 e^2\right ) x+2 e^{-x} x^2\right ) \, dx\\ &=e^{-x} \log (x)-\frac {1}{2} e^{-x} \left (6-5 e^2-2 x\right ) \log (x)+\frac {1}{2} \int \left (-2 e^{-x}+\frac {e^{-x} \left (4-5 e^2\right )}{x}\right ) \, dx+\frac {1}{2} \left (6-5 e^2\right ) \int e^{-x} \, dx+\frac {1}{2} \left (-8+5 e^2\right ) \int e^{-x} x \, dx+\frac {1}{2} \left (-4+5 e^2\right ) \int \frac {e^{-x}}{x} \, dx+\int e^{-x} x^2 \, dx\\ &=-\frac {1}{2} e^{-x} \left (6-5 e^2\right )+\frac {1}{2} e^{-x} \left (8-5 e^2\right ) x-e^{-x} x^2-\frac {1}{2} \left (4-5 e^2\right ) \text {Ei}(-x)+e^{-x} \log (x)-\frac {1}{2} e^{-x} \left (6-5 e^2-2 x\right ) \log (x)+2 \int e^{-x} x \, dx+\frac {1}{2} \left (4-5 e^2\right ) \int \frac {e^{-x}}{x} \, dx+\frac {1}{2} \left (-8+5 e^2\right ) \int e^{-x} \, dx-\int e^{-x} \, dx\\ &=e^{-x}-\frac {1}{2} e^{-x} \left (6-5 e^2\right )+\frac {1}{2} e^{-x} \left (8-5 e^2\right )-2 e^{-x} x+\frac {1}{2} e^{-x} \left (8-5 e^2\right ) x-e^{-x} x^2+e^{-x} \log (x)-\frac {1}{2} e^{-x} \left (6-5 e^2-2 x\right ) \log (x)+2 \int e^{-x} \, dx\\ &=-e^{-x}-\frac {1}{2} e^{-x} \left (6-5 e^2\right )+\frac {1}{2} e^{-x} \left (8-5 e^2\right )-2 e^{-x} x+\frac {1}{2} e^{-x} \left (8-5 e^2\right ) x-e^{-x} x^2+e^{-x} \log (x)-\frac {1}{2} e^{-x} \left (6-5 e^2-2 x\right ) \log (x)\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

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

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [B]  time = 0.83, size = 45, normalized size = 2.05 \begin {gather*} -{\left (x^{2} - 2 \, x\right )} e^{\left (-x\right )} - x e^{\left (-x + \log \left (\frac {5}{2}\right ) + 2\right )} + {\left ({\left (x - 2\right )} e^{\left (-x\right )} + e^{\left (-x + \log \left (\frac {5}{2}\right ) + 2\right )}\right )} \log \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-x*exp(log(5/2)+2)-x^2+3*x)*log(x)+(x^2-x+1)*exp(log(5/2)+2)+x^3-4*x^2+3*x-2)/exp(x)/x,x, algorith
m="fricas")

[Out]

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

________________________________________________________________________________________

giac [B]  time = 1.00, size = 52, normalized size = 2.36 \begin {gather*} -x^{2} e^{\left (-x\right )} + x e^{\left (-x\right )} \log \relax (x) + 2 \, x e^{\left (-x\right )} - \frac {5}{2} \, x e^{\left (-x + 2\right )} - 2 \, e^{\left (-x\right )} \log \relax (x) + \frac {5}{2} \, e^{\left (-x + 2\right )} \log \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-x*exp(log(5/2)+2)-x^2+3*x)*log(x)+(x^2-x+1)*exp(log(5/2)+2)+x^3-4*x^2+3*x-2)/exp(x)/x,x, algorith
m="giac")

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.07, size = 33, normalized size = 1.50




method result size



norman \(\left (x \ln \relax (x )+\left (-\frac {5 \,{\mathrm e}^{2}}{2}+2\right ) x +\left (\frac {5 \,{\mathrm e}^{2}}{2}-2\right ) \ln \relax (x )-x^{2}\right ) {\mathrm e}^{-x}\) \(33\)
risch \(\frac {\left (5 \,{\mathrm e}^{2}-4+2 x \right ) {\mathrm e}^{-x} \ln \relax (x )}{2}-\frac {x \left (5 \,{\mathrm e}^{2}-4+2 x \right ) {\mathrm e}^{-x}}{2}\) \(35\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((-x*exp(ln(5/2)+2)-x^2+3*x)*ln(x)+(x^2-x+1)*exp(ln(5/2)+2)+x^3-4*x^2+3*x-2)/exp(x)/x,x,method=_RETURNVERB
OSE)

[Out]

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

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} {\left (x + 1\right )} e^{\left (-x\right )} \log \relax (x) - {\left (x^{2} + 2 \, x + 2\right )} e^{\left (-x\right )} - \frac {5}{2} \, {\left (x e^{2} + e^{2}\right )} e^{\left (-x\right )} + 4 \, {\left (x + 1\right )} e^{\left (-x\right )} - 3 \, e^{\left (-x\right )} \log \relax (x) + \frac {5}{2} \, e^{\left (-x + 2\right )} \log \relax (x) + {\rm Ei}\left (-x\right ) - 3 \, e^{\left (-x\right )} + \frac {5}{2} \, e^{\left (-x + 2\right )} - \int \frac {{\left (x + 1\right )} e^{\left (-x\right )}}{x}\,{d x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-x*exp(log(5/2)+2)-x^2+3*x)*log(x)+(x^2-x+1)*exp(log(5/2)+2)+x^3-4*x^2+3*x-2)/exp(x)/x,x, algorith
m="maxima")

[Out]

(x + 1)*e^(-x)*log(x) - (x^2 + 2*x + 2)*e^(-x) - 5/2*(x*e^2 + e^2)*e^(-x) + 4*(x + 1)*e^(-x) - 3*e^(-x)*log(x)
 + 5/2*e^(-x + 2)*log(x) + Ei(-x) - 3*e^(-x) + 5/2*e^(-x + 2) - integrate((x + 1)*e^(-x)/x, x)

________________________________________________________________________________________

mupad [B]  time = 2.55, size = 21, normalized size = 0.95 \begin {gather*} -\frac {{\mathrm {e}}^{-x}\,\left (x-\ln \relax (x)\right )\,\left (2\,x+5\,{\mathrm {e}}^2-4\right )}{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-(exp(-x)*(x - log(x))*(2*x + 5*exp(2) - 4))/2

________________________________________________________________________________________

sympy [B]  time = 0.45, size = 39, normalized size = 1.77 \begin {gather*} \frac {\left (- 2 x^{2} + 2 x \log {\relax (x )} - 5 x e^{2} + 4 x - 4 \log {\relax (x )} + 5 e^{2} \log {\relax (x )}\right ) e^{- x}}{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(-2*x**2 + 2*x*log(x) - 5*x*exp(2) + 4*x - 4*log(x) + 5*exp(2)*log(x))*exp(-x)/2

________________________________________________________________________________________