\(\int \frac {-9 e^{\frac {9-3 x}{x}}+x^2-e^{\frac {1}{5} (2+5 x)} x^2}{x^2} \, dx\) [6517]

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

Optimal result

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

[Out]

x-3-exp(x+2/5)+exp(9/x-3)

Rubi [A] (verified)

Time = 0.03 (sec) , antiderivative size = 20, normalized size of antiderivative = 0.95, number of steps used = 6, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.081, Rules used = {14, 2225, 2240} \[ \int \frac {-9 e^{\frac {9-3 x}{x}}+x^2-e^{\frac {1}{5} (2+5 x)} x^2}{x^2} \, dx=x+e^{\frac {9}{x}-3}-e^{x+\frac {2}{5}} \]

[In]

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

[Out]

E^(-3 + 9/x) - E^(2/5 + x) + 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 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 2240

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^(n_))*((e_.) + (f_.)*(x_))^(m_.), x_Symbol] :> Simp[(e + f*x)^n*(
F^(a + b*(c + d*x)^n)/(b*f*n*(c + d*x)^n*Log[F])), x] /; FreeQ[{F, a, b, c, d, e, f, n}, x] && EqQ[m, n - 1] &
& EqQ[d*e - c*f, 0]

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

Mathematica [A] (verified)

Time = 0.04 (sec) , antiderivative size = 20, normalized size of antiderivative = 0.95 \[ \int \frac {-9 e^{\frac {9-3 x}{x}}+x^2-e^{\frac {1}{5} (2+5 x)} x^2}{x^2} \, dx=e^{-3+\frac {9}{x}}-e^{\frac {2}{5}+x}+x \]

[In]

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

[Out]

E^(-3 + 9/x) - E^(2/5 + x) + x

Maple [A] (verified)

Time = 0.08 (sec) , antiderivative size = 18, normalized size of antiderivative = 0.86

method result size
default \(x -{\mathrm e}^{x} {\mathrm e}^{\frac {2}{5}}+{\mathrm e}^{\frac {9}{x}} {\mathrm e}^{-3}\) \(18\)
risch \(x -{\mathrm e}^{x +\frac {2}{5}}+{\mathrm e}^{-\frac {3 \left (-3+x \right )}{x}}\) \(18\)
parallelrisch \(x -{\mathrm e}^{x +\frac {2}{5}}+{\mathrm e}^{-\frac {3 \left (-3+x \right )}{x}}\) \(18\)
parts \(x -{\mathrm e}^{x +\frac {2}{5}}+{\mathrm e}^{\frac {-3 x +9}{x}}\) \(19\)
norman \(\frac {x^{2}+x \,{\mathrm e}^{\frac {-3 x +9}{x}}-x \,{\mathrm e}^{x +\frac {2}{5}}}{x}\) \(28\)

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.81 \[ \int \frac {-9 e^{\frac {9-3 x}{x}}+x^2-e^{\frac {1}{5} (2+5 x)} x^2}{x^2} \, dx=x - e^{\left (x + \frac {2}{5}\right )} + e^{\left (-\frac {3 \, {\left (x - 3\right )}}{x}\right )} \]

[In]

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

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.10 (sec) , antiderivative size = 15, normalized size of antiderivative = 0.71 \[ \int \frac {-9 e^{\frac {9-3 x}{x}}+x^2-e^{\frac {1}{5} (2+5 x)} x^2}{x^2} \, dx=x + e^{\frac {9 - 3 x}{x}} - e^{x + \frac {2}{5}} \]

[In]

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

[Out]

x + exp((9 - 3*x)/x) - exp(x + 2/5)

Maxima [A] (verification not implemented)

none

Time = 0.20 (sec) , antiderivative size = 16, normalized size of antiderivative = 0.76 \[ \int \frac {-9 e^{\frac {9-3 x}{x}}+x^2-e^{\frac {1}{5} (2+5 x)} x^2}{x^2} \, dx=x - e^{\left (x + \frac {2}{5}\right )} + e^{\left (\frac {9}{x} - 3\right )} \]

[In]

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

[Out]

x - e^(x + 2/5) + e^(9/x - 3)

Giac [A] (verification not implemented)

none

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

[In]

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

[Out]

x - e^(x + 2/5) + e^(9/x - 3)

Mupad [B] (verification not implemented)

Time = 12.34 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.81 \[ \int \frac {-9 e^{\frac {9-3 x}{x}}+x^2-e^{\frac {1}{5} (2+5 x)} x^2}{x^2} \, dx=x+{\mathrm {e}}^{-3}\,{\mathrm {e}}^{9/x}-{\mathrm {e}}^{2/5}\,{\mathrm {e}}^x \]

[In]

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

[Out]

x + exp(-3)*exp(9/x) - exp(2/5)*exp(x)