\(\int \frac {-2+e^{27+x} (x-x^2)}{9 x^3} \, dx\) [7782]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [C] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 22, antiderivative size = 21 \[ \int \frac {-2+e^{27+x} \left (x-x^2\right )}{9 x^3} \, dx=\frac {-e^{27+x}+\frac {1}{x}-x}{9 x} \]

[Out]

1/9*(1/x-x-exp(x+27))/x

Rubi [A] (verified)

Time = 0.03 (sec) , antiderivative size = 20, normalized size of antiderivative = 0.95, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.136, Rules used = {12, 14, 2228} \[ \int \frac {-2+e^{27+x} \left (x-x^2\right )}{9 x^3} \, dx=\frac {1}{9 x^2}-\frac {e^{x+27}}{9 x} \]

[In]

Int[(-2 + E^(27 + x)*(x - x^2))/(9*x^3),x]

[Out]

1/(9*x^2) - E^(27 + x)/(9*x)

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, 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 2228

Int[(F_)^((c_.)*(v_))*(u_)^(m_.)*(w_), x_Symbol] :> With[{b = Coefficient[v, x, 1], d = Coefficient[u, x, 0],
e = Coefficient[u, x, 1], f = Coefficient[w, x, 0], g = Coefficient[w, x, 1]}, Simp[g*u^(m + 1)*(F^(c*v)/(b*c*
e*Log[F])), x] /; EqQ[e*g*(m + 1) - b*c*(e*f - d*g)*Log[F], 0]] /; FreeQ[{F, c, m}, x] && LinearQ[{u, v, w}, x
]

Rubi steps \begin{align*} \text {integral}& = \frac {1}{9} \int \frac {-2+e^{27+x} \left (x-x^2\right )}{x^3} \, dx \\ & = \frac {1}{9} \int \left (-\frac {2}{x^3}-\frac {e^{27+x} (-1+x)}{x^2}\right ) \, dx \\ & = \frac {1}{9 x^2}-\frac {1}{9} \int \frac {e^{27+x} (-1+x)}{x^2} \, dx \\ & = \frac {1}{9 x^2}-\frac {e^{27+x}}{9 x} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.12 (sec) , antiderivative size = 18, normalized size of antiderivative = 0.86 \[ \int \frac {-2+e^{27+x} \left (x-x^2\right )}{9 x^3} \, dx=\frac {1}{9} \left (\frac {1}{x^2}-\frac {e^{27+x}}{x}\right ) \]

[In]

Integrate[(-2 + E^(27 + x)*(x - x^2))/(9*x^3),x]

[Out]

(x^(-2) - E^(27 + x)/x)/9

Maple [A] (verified)

Time = 0.10 (sec) , antiderivative size = 14, normalized size of antiderivative = 0.67

method result size
norman \(\frac {\frac {1}{9}-\frac {{\mathrm e}^{x +27} x}{9}}{x^{2}}\) \(14\)
parallelrisch \(\frac {1-{\mathrm e}^{x +27} x}{9 x^{2}}\) \(15\)
derivativedivides \(\frac {1}{9 x^{2}}-\frac {{\mathrm e}^{x +27}}{9 x}\) \(16\)
default \(\frac {1}{9 x^{2}}-\frac {{\mathrm e}^{x +27}}{9 x}\) \(16\)
risch \(\frac {1}{9 x^{2}}-\frac {{\mathrm e}^{x +27}}{9 x}\) \(16\)
parts \(\frac {1}{9 x^{2}}-\frac {{\mathrm e}^{x +27}}{9 x}\) \(16\)

[In]

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

[Out]

(1/9-1/9*exp(x+27)*x)/x^2

Fricas [A] (verification not implemented)

none

Time = 0.23 (sec) , antiderivative size = 13, normalized size of antiderivative = 0.62 \[ \int \frac {-2+e^{27+x} \left (x-x^2\right )}{9 x^3} \, dx=-\frac {x e^{\left (x + 27\right )} - 1}{9 \, x^{2}} \]

[In]

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

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.04 (sec) , antiderivative size = 14, normalized size of antiderivative = 0.67 \[ \int \frac {-2+e^{27+x} \left (x-x^2\right )}{9 x^3} \, dx=- \frac {e^{x + 27}}{9 x} + \frac {1}{9 x^{2}} \]

[In]

integrate(1/9*((-x**2+x)*exp(x+27)-2)/x**3,x)

[Out]

-exp(x + 27)/(9*x) + 1/(9*x**2)

Maxima [C] (verification not implemented)

Result contains higher order function than in optimal. Order 4 vs. order 3.

Time = 0.24 (sec) , antiderivative size = 21, normalized size of antiderivative = 1.00 \[ \int \frac {-2+e^{27+x} \left (x-x^2\right )}{9 x^3} \, dx=-\frac {1}{9} \, {\rm Ei}\left (x\right ) e^{27} + \frac {1}{9} \, e^{27} \Gamma \left (-1, -x\right ) + \frac {1}{9 \, x^{2}} \]

[In]

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

[Out]

-1/9*Ei(x)*e^27 + 1/9*e^27*gamma(-1, -x) + 1/9/x^2

Giac [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 13, normalized size of antiderivative = 0.62 \[ \int \frac {-2+e^{27+x} \left (x-x^2\right )}{9 x^3} \, dx=-\frac {x e^{\left (x + 27\right )} - 1}{9 \, x^{2}} \]

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 12.41 (sec) , antiderivative size = 13, normalized size of antiderivative = 0.62 \[ \int \frac {-2+e^{27+x} \left (x-x^2\right )}{9 x^3} \, dx=-\frac {x\,{\mathrm {e}}^{x+27}-1}{9\,x^2} \]

[In]

int(((exp(x + 27)*(x - x^2))/9 - 2/9)/x^3,x)

[Out]

-(x*exp(x + 27) - 1)/(9*x^2)