3.16.42 \(\int \frac {e^{-x} (4 x^2-8 x^3+2 x^4+e^2 (3+3 x+3 x^4-x^5))}{x^2} \, dx\)

Optimal. Leaf size=27 \[ e^{-x} \left (-x (-4+2 x)+\frac {e^2 \left (-3+x^4\right )}{x}\right ) \]

________________________________________________________________________________________

Rubi [B]  time = 0.19, antiderivative size = 116, normalized size of antiderivative = 4.30, number of steps used = 15, number of rules used = 5, integrand size = 44, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.114, Rules used = {2199, 2194, 2177, 2178, 2176} \begin {gather*} e^{2-x} x^3+3 e^{2-x} x^2-\left (2+3 e^2\right ) e^{-x} x^2+6 e^{2-x} x+8 e^{-x} x-2 \left (2+3 e^2\right ) e^{-x} x+6 e^{2-x}+4 e^{-x}-2 \left (2+3 e^2\right ) e^{-x}-\frac {3 e^{2-x}}{x} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

6*E^(2 - x) + 4/E^x - (2*(2 + 3*E^2))/E^x - (3*E^(2 - x))/x + 6*E^(2 - x)*x + (8*x)/E^x - (2*(2 + 3*E^2)*x)/E^
x + 3*E^(2 - x)*x^2 - ((2 + 3*E^2)*x^2)/E^x + E^(2 - x)*x^3

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 2177

Int[((b_.)*(F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((c_.) + (d_.)*(x_))^(m_), x_Symbol] :> Simp[((c + d*x)^(m
 + 1)*(b*F^(g*(e + f*x)))^n)/(d*(m + 1)), x] - Dist[(f*g*n*Log[F])/(d*(m + 1)), 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] && LtQ[m, -1] && 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

Rubi steps

\begin {gather*} \begin {aligned} \text {integral} &=\int \left (4 e^{-x}+\frac {3 e^{2-x}}{x^2}+\frac {3 e^{2-x}}{x}-8 e^{-x} x+e^{-x} \left (2+3 e^2\right ) x^2-e^{2-x} x^3\right ) \, dx\\ &=3 \int \frac {e^{2-x}}{x^2} \, dx+3 \int \frac {e^{2-x}}{x} \, dx+4 \int e^{-x} \, dx-8 \int e^{-x} x \, dx+\left (2+3 e^2\right ) \int e^{-x} x^2 \, dx-\int e^{2-x} x^3 \, dx\\ &=-4 e^{-x}-\frac {3 e^{2-x}}{x}+8 e^{-x} x-e^{-x} \left (2+3 e^2\right ) x^2+e^{2-x} x^3+3 e^2 \text {Ei}(-x)-3 \int \frac {e^{2-x}}{x} \, dx-3 \int e^{2-x} x^2 \, dx-8 \int e^{-x} \, dx+\left (2 \left (2+3 e^2\right )\right ) \int e^{-x} x \, dx\\ &=4 e^{-x}-\frac {3 e^{2-x}}{x}+8 e^{-x} x-2 e^{-x} \left (2+3 e^2\right ) x+3 e^{2-x} x^2-e^{-x} \left (2+3 e^2\right ) x^2+e^{2-x} x^3-6 \int e^{2-x} x \, dx+\left (2 \left (2+3 e^2\right )\right ) \int e^{-x} \, dx\\ &=4 e^{-x}-2 e^{-x} \left (2+3 e^2\right )-\frac {3 e^{2-x}}{x}+6 e^{2-x} x+8 e^{-x} x-2 e^{-x} \left (2+3 e^2\right ) x+3 e^{2-x} x^2-e^{-x} \left (2+3 e^2\right ) x^2+e^{2-x} x^3-6 \int e^{2-x} \, dx\\ &=6 e^{2-x}+4 e^{-x}-2 e^{-x} \left (2+3 e^2\right )-\frac {3 e^{2-x}}{x}+6 e^{2-x} x+8 e^{-x} x-2 e^{-x} \left (2+3 e^2\right ) x+3 e^{2-x} x^2-e^{-x} \left (2+3 e^2\right ) x^2+e^{2-x} x^3\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.10, size = 27, normalized size = 1.00 \begin {gather*} \frac {e^{-x} \left (-2 (-2+x) x^2+e^2 \left (-3+x^4\right )\right )}{x} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

(-2*(-2 + x)*x^2 + E^2*(-3 + x^4))/(E^x*x)

________________________________________________________________________________________

fricas [A]  time = 0.65, size = 29, normalized size = 1.07 \begin {gather*} -\frac {{\left (2 \, x^{3} - 4 \, x^{2} - {\left (x^{4} - 3\right )} e^{2}\right )} e^{\left (-x\right )}}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-(2*x^3 - 4*x^2 - (x^4 - 3)*e^2)*e^(-x)/x

________________________________________________________________________________________

giac [A]  time = 0.15, size = 41, normalized size = 1.52 \begin {gather*} \frac {x^{4} e^{\left (-x + 2\right )} - 2 \, x^{3} e^{\left (-x\right )} + 4 \, x^{2} e^{\left (-x\right )} - 3 \, e^{\left (-x + 2\right )}}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(x^4*e^(-x + 2) - 2*x^3*e^(-x) + 4*x^2*e^(-x) - 3*e^(-x + 2))/x

________________________________________________________________________________________

maple [A]  time = 0.06, size = 30, normalized size = 1.11




method result size



gosper \(\frac {\left (x^{4} {\mathrm e}^{2}-2 x^{3}+4 x^{2}-3 \,{\mathrm e}^{2}\right ) {\mathrm e}^{-x}}{x}\) \(30\)
norman \(\frac {\left (x^{4} {\mathrm e}^{2}-2 x^{3}+4 x^{2}-3 \,{\mathrm e}^{2}\right ) {\mathrm e}^{-x}}{x}\) \(30\)
risch \(\frac {\left (x^{4} {\mathrm e}^{2}-2 x^{3}+4 x^{2}-3 \,{\mathrm e}^{2}\right ) {\mathrm e}^{-x}}{x}\) \(30\)
default \(4 x \,{\mathrm e}^{-x}-2 x^{2} {\mathrm e}^{-x}+3 \,{\mathrm e}^{2} \left (-\frac {{\mathrm e}^{-x}}{x}+\expIntegralEi \left (1, x\right )\right )-3 \,{\mathrm e}^{2} \expIntegralEi \left (1, x\right )+3 \,{\mathrm e}^{2} \left (-x^{2} {\mathrm e}^{-x}-2 x \,{\mathrm e}^{-x}-2 \,{\mathrm e}^{-x}\right )-{\mathrm e}^{2} \left (-x^{3} {\mathrm e}^{-x}-3 x^{2} {\mathrm e}^{-x}-6 x \,{\mathrm e}^{-x}-6 \,{\mathrm e}^{-x}\right )\) \(105\)
meijerg \(-4+4 \left (2 x +2\right ) {\mathrm e}^{-x}-4 \,{\mathrm e}^{-x}-{\mathrm e}^{2} \left (6-\frac {\left (4 x^{3}+12 x^{2}+24 x +24\right ) {\mathrm e}^{-x}}{4}\right )+\left (3 \,{\mathrm e}^{2}+2\right ) \left (2-\frac {\left (3 x^{2}+6 x +6\right ) {\mathrm e}^{-x}}{3}\right )-3 \,{\mathrm e}^{2} \expIntegralEi \left (1, x\right )+3 \,{\mathrm e}^{2} \left (\frac {-2 x +2}{2 x}-\frac {{\mathrm e}^{-x}}{x}+\expIntegralEi \left (1, x\right )+1-\frac {1}{x}\right )\) \(112\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(x^4*exp(2)-2*x^3+4*x^2-3*exp(2))/exp(x)/x

________________________________________________________________________________________

maxima [C]  time = 0.47, size = 95, normalized size = 3.52 \begin {gather*} 3 \, {\rm Ei}\left (-x\right ) e^{2} + {\left (x^{3} e^{2} + 3 \, x^{2} e^{2} + 6 \, x e^{2} + 6 \, e^{2}\right )} e^{\left (-x\right )} - 3 \, {\left (x^{2} e^{2} + 2 \, x e^{2} + 2 \, e^{2}\right )} e^{\left (-x\right )} - 2 \, {\left (x^{2} + 2 \, x + 2\right )} e^{\left (-x\right )} + 8 \, {\left (x + 1\right )} e^{\left (-x\right )} - 3 \, e^{2} \Gamma \left (-1, x\right ) - 4 \, e^{\left (-x\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

3*Ei(-x)*e^2 + (x^3*e^2 + 3*x^2*e^2 + 6*x*e^2 + 6*e^2)*e^(-x) - 3*(x^2*e^2 + 2*x*e^2 + 2*e^2)*e^(-x) - 2*(x^2
+ 2*x + 2)*e^(-x) + 8*(x + 1)*e^(-x) - 3*e^2*gamma(-1, x) - 4*e^(-x)

________________________________________________________________________________________

mupad [B]  time = 1.02, size = 31, normalized size = 1.15 \begin {gather*} -\frac {{\mathrm {e}}^{-x}\,\left (-{\mathrm {e}}^2\,x^4+2\,x^3-4\,x^2+3\,{\mathrm {e}}^2\right )}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-(exp(-x)*(3*exp(2) - x^4*exp(2) - 4*x^2 + 2*x^3))/x

________________________________________________________________________________________

sympy [A]  time = 0.13, size = 26, normalized size = 0.96 \begin {gather*} \frac {\left (x^{4} e^{2} - 2 x^{3} + 4 x^{2} - 3 e^{2}\right ) e^{- x}}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(x**4*exp(2) - 2*x**3 + 4*x**2 - 3*exp(2))*exp(-x)/x

________________________________________________________________________________________