3.82.57 \(\int \frac {e^{-x} (4+4 x-2 x^2+9 e^x x^2)}{45 x^2} \, dx\) [8157]

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

[Out]

1/45/x*(2*x-4)/exp(x)+1/5*x

________________________________________________________________________________________

Rubi [A]
time = 0.18, antiderivative size = 27, normalized size of antiderivative = 1.17, number of steps used = 9, number of rules used = 6, integrand size = 30, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {12, 6874, 2230, 2225, 2208, 2209} \begin {gather*} \frac {x}{5}+\frac {2 e^{-x}}{45}-\frac {4 e^{-x}}{45 x} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(4 + 4*x - 2*x^2 + 9*E^x*x^2)/(45*E^x*x^2),x]

[Out]

2/(45*E^x) - 4/(45*E^x*x) + x/5

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 2208

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] &&  !TrueQ[$UseGamm
a]

Rule 2209

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

Rule 2225

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 2230

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] &&  !TrueQ[$UseGamma]

Rule 6874

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

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]
time = 0.24, size = 25, normalized size = 1.09 \begin {gather*} \frac {1}{45} \left (2 e^{-x}-\frac {4 e^{-x}}{x}+9 x\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(4 + 4*x - 2*x^2 + 9*E^x*x^2)/(45*E^x*x^2),x]

[Out]

(2/E^x - 4/(E^x*x) + 9*x)/45

________________________________________________________________________________________

Maple [A]
time = 0.42, size = 20, normalized size = 0.87

method result size
risch \(\frac {x}{5}+\frac {2 \left (x -2\right ) {\mathrm e}^{-x}}{45 x}\) \(17\)
default \(\frac {x}{5}+\frac {2 \,{\mathrm e}^{-x}}{45}-\frac {4 \,{\mathrm e}^{-x}}{45 x}\) \(20\)
norman \(\frac {\left (-\frac {4}{45}+\frac {2 x}{45}+\frac {{\mathrm e}^{x} x^{2}}{5}\right ) {\mathrm e}^{-x}}{x}\) \(21\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/45*(9*exp(x)*x^2-2*x^2+4*x+4)/exp(x)/x^2,x,method=_RETURNVERBOSE)

[Out]

1/5*x+2/45/exp(x)-4/45/exp(x)/x

________________________________________________________________________________________

Maxima [C] Result contains higher order function than in optimal. Order 4 vs. order 3.
time = 0.30, size = 21, normalized size = 0.91 \begin {gather*} \frac {1}{5} \, x + \frac {4}{45} \, {\rm Ei}\left (-x\right ) + \frac {2}{45} \, e^{\left (-x\right )} - \frac {4}{45} \, \Gamma \left (-1, x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/45*(9*exp(x)*x^2-2*x^2+4*x+4)/exp(x)/x^2,x, algorithm="maxima")

[Out]

1/5*x + 4/45*Ei(-x) + 2/45*e^(-x) - 4/45*gamma(-1, x)

________________________________________________________________________________________

Fricas [A]
time = 0.38, size = 21, normalized size = 0.91 \begin {gather*} \frac {{\left (9 \, x^{2} e^{x} + 2 \, x - 4\right )} e^{\left (-x\right )}}{45 \, x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/45*(9*exp(x)*x^2-2*x^2+4*x+4)/exp(x)/x^2,x, algorithm="fricas")

[Out]

1/45*(9*x^2*e^x + 2*x - 4)*e^(-x)/x

________________________________________________________________________________________

Sympy [A]
time = 0.04, size = 14, normalized size = 0.61 \begin {gather*} \frac {x}{5} + \frac {\left (2 x - 4\right ) e^{- x}}{45 x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/45*(9*exp(x)*x**2-2*x**2+4*x+4)/exp(x)/x**2,x)

[Out]

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

________________________________________________________________________________________

Giac [A]
time = 0.41, size = 24, normalized size = 1.04 \begin {gather*} \frac {9 \, x^{2} + 2 \, x e^{\left (-x\right )} - 4 \, e^{\left (-x\right )}}{45 \, x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/45*(9*exp(x)*x^2-2*x^2+4*x+4)/exp(x)/x^2,x, algorithm="giac")

[Out]

1/45*(9*x^2 + 2*x*e^(-x) - 4*e^(-x))/x

________________________________________________________________________________________

Mupad [B]
time = 0.13, size = 19, normalized size = 0.83 \begin {gather*} \frac {x}{5}+\frac {2\,{\mathrm {e}}^{-x}}{45}-\frac {4\,{\mathrm {e}}^{-x}}{45\,x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________