\(\int \frac {e^{-15-x} (e^{16+x}-2 e^5 x^2+2 x^3-x^4)}{x^2} \, dx\) [769]

   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 [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 35, antiderivative size = 26 \[ \int \frac {e^{-15-x} \left (e^{16+x}-2 e^5 x^2+2 x^3-x^4\right )}{x^2} \, dx=-\frac {e+x}{x}+e^{-10-x} \left (2+\frac {x^2}{e^5}\right ) \]

[Out]

(2+x^2/exp(5))/exp(x+10)-(x+exp(1))/x

Rubi [A] (verified)

Time = 0.17 (sec) , antiderivative size = 27, normalized size of antiderivative = 1.04, number of steps used = 8, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.086, Rules used = {6874, 2225, 2207} \[ \int \frac {e^{-15-x} \left (e^{16+x}-2 e^5 x^2+2 x^3-x^4\right )}{x^2} \, dx=e^{-x-15} x^2+2 e^{-x-10}-\frac {e}{x} \]

[In]

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

[Out]

2*E^(-10 - x) - E/x + E^(-15 - x)*x^2

Rule 2207

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] &&  !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 6874

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

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

Mathematica [A] (verified)

Time = 0.10 (sec) , antiderivative size = 27, normalized size of antiderivative = 1.04 \[ \int \frac {e^{-15-x} \left (e^{16+x}-2 e^5 x^2+2 x^3-x^4\right )}{x^2} \, dx=2 e^{-10-x}-\frac {e}{x}+e^{-15-x} x^2 \]

[In]

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

[Out]

2*E^(-10 - x) - E/x + E^(-15 - x)*x^2

Maple [A] (verified)

Time = 0.12 (sec) , antiderivative size = 24, normalized size of antiderivative = 0.92

method result size
risch \(-\frac {{\mathrm e}}{x}+\left (2 \,{\mathrm e}^{5}+x^{2}\right ) {\mathrm e}^{-x -15}\) \(24\)
norman \(\frac {\left ({\mathrm e}^{-5} x^{3}+2 x -{\mathrm e} \,{\mathrm e}^{x +10}\right ) {\mathrm e}^{-x -10}}{x}\) \(31\)
parallelrisch \(-\frac {{\mathrm e}^{-5} \left ({\mathrm e} \,{\mathrm e}^{5} {\mathrm e}^{x +10}-x^{3}-2 x \,{\mathrm e}^{5}\right ) {\mathrm e}^{-x -10}}{x}\) \(36\)
parts \(-\frac {{\mathrm e}}{x}-{\mathrm e}^{-5} \left (-{\mathrm e}^{-x -10} \left (x +10\right )^{2}+20 \left (x +10\right ) {\mathrm e}^{-x -10}-100 \,{\mathrm e}^{-x -10}-2 \,{\mathrm e}^{-x -10} {\mathrm e}^{5}\right )\) \(58\)
derivativedivides \({\mathrm e}^{-5} \left (-\frac {{\mathrm e} \,{\mathrm e}^{5}}{x}+660 \,{\mathrm e}^{-x -10}-42 \left (x +31\right ) {\mathrm e}^{-x -10}+\left (\left (x +10\right )^{2}+22 x +542\right ) {\mathrm e}^{-x -10}-200 \,{\mathrm e}^{5} \left (-\frac {{\mathrm e}^{-x -10}}{x}+{\mathrm e}^{-10} \operatorname {Ei}_{1}\left (x \right )\right )+40 \,{\mathrm e}^{5} \left (-\frac {10 \,{\mathrm e}^{-x -10}}{x}+9 \,{\mathrm e}^{-10} \operatorname {Ei}_{1}\left (x \right )\right )-2 \,{\mathrm e}^{5} \left (-{\mathrm e}^{-x -10}-\frac {100 \,{\mathrm e}^{-x -10}}{x}+80 \,{\mathrm e}^{-10} \operatorname {Ei}_{1}\left (x \right )\right )\right )\) \(128\)
default \({\mathrm e}^{-5} \left (-\frac {{\mathrm e} \,{\mathrm e}^{5}}{x}+660 \,{\mathrm e}^{-x -10}-42 \left (x +31\right ) {\mathrm e}^{-x -10}+\left (\left (x +10\right )^{2}+22 x +542\right ) {\mathrm e}^{-x -10}-200 \,{\mathrm e}^{5} \left (-\frac {{\mathrm e}^{-x -10}}{x}+{\mathrm e}^{-10} \operatorname {Ei}_{1}\left (x \right )\right )+40 \,{\mathrm e}^{5} \left (-\frac {10 \,{\mathrm e}^{-x -10}}{x}+9 \,{\mathrm e}^{-10} \operatorname {Ei}_{1}\left (x \right )\right )-2 \,{\mathrm e}^{5} \left (-{\mathrm e}^{-x -10}-\frac {100 \,{\mathrm e}^{-x -10}}{x}+80 \,{\mathrm e}^{-10} \operatorname {Ei}_{1}\left (x \right )\right )\right )\) \(128\)
meijerg \({\mathrm e}^{-x -9+x \,{\mathrm e}^{-10}} \left (-{\mathrm e}^{10}+1\right ) \left (-\frac {{\mathrm e}^{10}}{x \left (-{\mathrm e}^{10}+1\right )}+11-\ln \left (x \right )-\ln \left (-{\mathrm e}^{10}+1\right )+\frac {{\mathrm e}^{10} \left (2-2 x \,{\mathrm e}^{-10} \left (-{\mathrm e}^{10}+1\right )\right )}{2 x \left (-{\mathrm e}^{10}+1\right )}-\frac {{\mathrm e}^{10-x \,{\mathrm e}^{-10} \left (-{\mathrm e}^{10}+1\right )}}{x \left (-{\mathrm e}^{10}+1\right )}+\ln \left (x \,{\mathrm e}^{-10} \left (-{\mathrm e}^{10}+1\right )\right )+\operatorname {Ei}_{1}\left (x \,{\mathrm e}^{-10} \left (-{\mathrm e}^{10}+1\right )\right )\right )-2 \,{\mathrm e}^{-x +x \,{\mathrm e}^{-10}} \left (1-{\mathrm e}^{-x \,{\mathrm e}^{-10}}\right )-{\mathrm e}^{15-x +x \,{\mathrm e}^{-10}} \left (2-\frac {\left (3 x^{2} {\mathrm e}^{-20}+6 x \,{\mathrm e}^{-10}+6\right ) {\mathrm e}^{-x \,{\mathrm e}^{-10}}}{3}\right )+2 \,{\mathrm e}^{-x +5+x \,{\mathrm e}^{-10}} \left (1-\frac {\left (2+2 x \,{\mathrm e}^{-10}\right ) {\mathrm e}^{-x \,{\mathrm e}^{-10}}}{2}\right )\) \(213\)

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 28, normalized size of antiderivative = 1.08 \[ \int \frac {e^{-15-x} \left (e^{16+x}-2 e^5 x^2+2 x^3-x^4\right )}{x^2} \, dx=\frac {{\left (x^{3} e + 2 \, x e^{6} - e^{\left (x + 17\right )}\right )} e^{\left (-x - 16\right )}}{x} \]

[In]

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

[Out]

(x^3*e + 2*x*e^6 - e^(x + 17))*e^(-x - 16)/x

Sympy [A] (verification not implemented)

Time = 0.06 (sec) , antiderivative size = 22, normalized size of antiderivative = 0.85 \[ \int \frac {e^{-15-x} \left (e^{16+x}-2 e^5 x^2+2 x^3-x^4\right )}{x^2} \, dx=\frac {\left (x^{2} + 2 e^{5}\right ) e^{- x - 10}}{e^{5}} - \frac {e}{x} \]

[In]

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

[Out]

(x**2 + 2*exp(5))*exp(-5)*exp(-x - 10) - E/x

Maxima [A] (verification not implemented)

none

Time = 0.19 (sec) , antiderivative size = 42, normalized size of antiderivative = 1.62 \[ \int \frac {e^{-15-x} \left (e^{16+x}-2 e^5 x^2+2 x^3-x^4\right )}{x^2} \, dx={\left (x^{2} + 2 \, x + 2\right )} e^{\left (-x - 15\right )} - 2 \, {\left (x + 1\right )} e^{\left (-x - 15\right )} - \frac {e}{x} + 2 \, e^{\left (-x - 10\right )} \]

[In]

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

[Out]

(x^2 + 2*x + 2)*e^(-x - 15) - 2*(x + 1)*e^(-x - 15) - e/x + 2*e^(-x - 10)

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 72 vs. \(2 (25) = 50\).

Time = 0.29 (sec) , antiderivative size = 72, normalized size of antiderivative = 2.77 \[ \int \frac {e^{-15-x} \left (e^{16+x}-2 e^5 x^2+2 x^3-x^4\right )}{x^2} \, dx=\frac {{\left (x + 16\right )}^{3} e^{\left (-x - 15\right )} - 48 \, {\left (x + 16\right )}^{2} e^{\left (-x - 15\right )} + 2 \, {\left (x + 16\right )} e^{\left (-x - 10\right )} + 768 \, {\left (x + 16\right )} e^{\left (-x - 15\right )} - e - 32 \, e^{\left (-x - 10\right )} - 4096 \, e^{\left (-x - 15\right )}}{x} \]

[In]

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

[Out]

((x + 16)^3*e^(-x - 15) - 48*(x + 16)^2*e^(-x - 15) + 2*(x + 16)*e^(-x - 10) + 768*(x + 16)*e^(-x - 15) - e -
32*e^(-x - 10) - 4096*e^(-x - 15))/x

Mupad [B] (verification not implemented)

Time = 0.12 (sec) , antiderivative size = 26, normalized size of antiderivative = 1.00 \[ \int \frac {e^{-15-x} \left (e^{16+x}-2 e^5 x^2+2 x^3-x^4\right )}{x^2} \, dx=2\,{\mathrm {e}}^{-x}\,{\mathrm {e}}^{-10}-\frac {\mathrm {e}}{x}+x^2\,{\mathrm {e}}^{-x}\,{\mathrm {e}}^{-15} \]

[In]

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

[Out]

2*exp(-x)*exp(-10) - exp(1)/x + x^2*exp(-x)*exp(-15)