\(\int \frac {x+2 x^2+e^{\frac {-5+e x}{x}} (5+x)}{x} \, dx\) [6508]

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

Optimal result

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

[Out]

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

Rubi [A] (verified)

Time = 0.03 (sec) , antiderivative size = 16, normalized size of antiderivative = 0.73, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.077, Rules used = {14, 2326} \[ \int \frac {x+2 x^2+e^{\frac {-5+e x}{x}} (5+x)}{x} \, dx=x^2+e^{e-\frac {5}{x}} x+x \]

[In]

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

[Out]

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

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 2326

Int[(y_.)*(F_)^(u_)*((v_) + (w_)), x_Symbol] :> With[{z = v*(y/(Log[F]*D[u, x]))}, Simp[F^u*z, x] /; EqQ[D[z,
x], w*y]] /; FreeQ[F, x]

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

Mathematica [A] (verified)

Time = 0.02 (sec) , antiderivative size = 16, normalized size of antiderivative = 0.73 \[ \int \frac {x+2 x^2+e^{\frac {-5+e x}{x}} (5+x)}{x} \, dx=x+e^{e-\frac {5}{x}} x+x^2 \]

[In]

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

[Out]

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

Maple [A] (verified)

Time = 0.40 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.77

method result size
derivativedivides \(x +{\mathrm e}^{-\frac {5}{x}+{\mathrm e}} x +x^{2}\) \(17\)
default \(x +{\mathrm e}^{-\frac {5}{x}+{\mathrm e}} x +x^{2}\) \(17\)
parts \(x +{\mathrm e}^{-\frac {5}{x}+{\mathrm e}} x +x^{2}\) \(17\)
norman \(x +x^{2}+{\mathrm e}^{\frac {x \,{\mathrm e}-5}{x}} x\) \(19\)
risch \(x +x^{2}+{\mathrm e}^{\frac {x \,{\mathrm e}-5}{x}} x\) \(19\)
parallelrisch \(x +x^{2}+{\mathrm e}^{\frac {x \,{\mathrm e}-5}{x}} x\) \(19\)

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 18, normalized size of antiderivative = 0.82 \[ \int \frac {x+2 x^2+e^{\frac {-5+e x}{x}} (5+x)}{x} \, dx=x^{2} + x e^{\left (\frac {x e - 5}{x}\right )} + x \]

[In]

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

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.08 (sec) , antiderivative size = 15, normalized size of antiderivative = 0.68 \[ \int \frac {x+2 x^2+e^{\frac {-5+e x}{x}} (5+x)}{x} \, dx=x^{2} + x e^{\frac {e x - 5}{x}} + x \]

[In]

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

[Out]

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

Maxima [C] (verification not implemented)

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

Time = 0.21 (sec) , antiderivative size = 28, normalized size of antiderivative = 1.27 \[ \int \frac {x+2 x^2+e^{\frac {-5+e x}{x}} (5+x)}{x} \, dx=x^{2} - 5 \, {\rm Ei}\left (-\frac {5}{x}\right ) e^{e} + 5 \, e^{e} \Gamma \left (-1, \frac {5}{x}\right ) + x \]

[In]

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

[Out]

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

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 87 vs. \(2 (19) = 38\).

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

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 13.19 (sec) , antiderivative size = 16, normalized size of antiderivative = 0.73 \[ \int \frac {x+2 x^2+e^{\frac {-5+e x}{x}} (5+x)}{x} \, dx=x+x^2+x\,{\mathrm {e}}^{-\frac {5}{x}}\,{\mathrm {e}}^{\mathrm {e}} \]

[In]

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

[Out]

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