\(\int \frac {x-4 x^2+e^{\frac {-2+11 x-x^2}{x}} (2+x-x^2)}{x} \, dx\) [6699]

   Optimal result
   Rubi [F]
   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 = 36, antiderivative size = 19 \[ \int \frac {x-4 x^2+e^{\frac {-2+11 x-x^2}{x}} \left (2+x-x^2\right )}{x} \, dx=\left (1+e^{11-\frac {2}{x}-x}-2 x\right ) x \]

[Out]

x*(exp(11-2/x-x)-2*x+1)

Rubi [F]

\[ \int \frac {x-4 x^2+e^{\frac {-2+11 x-x^2}{x}} \left (2+x-x^2\right )}{x} \, dx=\int \frac {x-4 x^2+e^{\frac {-2+11 x-x^2}{x}} \left (2+x-x^2\right )}{x} \, dx \]

[In]

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

[Out]

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

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

Mathematica [A] (verified)

Time = 0.05 (sec) , antiderivative size = 19, normalized size of antiderivative = 1.00 \[ \int \frac {x-4 x^2+e^{\frac {-2+11 x-x^2}{x}} \left (2+x-x^2\right )}{x} \, dx=\left (1+e^{11-\frac {2}{x}-x}-2 x\right ) x \]

[In]

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

[Out]

(1 + E^(11 - 2/x - x) - 2*x)*x

Maple [A] (verified)

Time = 0.48 (sec) , antiderivative size = 24, normalized size of antiderivative = 1.26

method result size
risch \(x +{\mathrm e}^{-\frac {x^{2}-11 x +2}{x}} x -2 x^{2}\) \(24\)
parallelrisch \(x +{\mathrm e}^{-\frac {x^{2}-11 x +2}{x}} x -2 x^{2}\) \(24\)
norman \(x +x \,{\mathrm e}^{\frac {-x^{2}+11 x -2}{x}}-2 x^{2}\) \(25\)
parts \(x +x \,{\mathrm e}^{\frac {-x^{2}+11 x -2}{x}}-2 x^{2}\) \(25\)

[In]

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

[Out]

x+exp(-(x^2-11*x+2)/x)*x-2*x^2

Fricas [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 23, normalized size of antiderivative = 1.21 \[ \int \frac {x-4 x^2+e^{\frac {-2+11 x-x^2}{x}} \left (2+x-x^2\right )}{x} \, dx=-2 \, x^{2} + x e^{\left (-\frac {x^{2} - 11 \, x + 2}{x}\right )} + x \]

[In]

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

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.08 (sec) , antiderivative size = 19, normalized size of antiderivative = 1.00 \[ \int \frac {x-4 x^2+e^{\frac {-2+11 x-x^2}{x}} \left (2+x-x^2\right )}{x} \, dx=- 2 x^{2} + x e^{\frac {- x^{2} + 11 x - 2}{x}} + x \]

[In]

integrate(((-x**2+x+2)*exp((-x**2+11*x-2)/x)-4*x**2+x)/x,x)

[Out]

-2*x**2 + x*exp((-x**2 + 11*x - 2)/x) + x

Maxima [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 20, normalized size of antiderivative = 1.05 \[ \int \frac {x-4 x^2+e^{\frac {-2+11 x-x^2}{x}} \left (2+x-x^2\right )}{x} \, dx=-2 \, x^{2} + x e^{\left (-x - \frac {2}{x} + 11\right )} + x \]

[In]

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

[Out]

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

Giac [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 23, normalized size of antiderivative = 1.21 \[ \int \frac {x-4 x^2+e^{\frac {-2+11 x-x^2}{x}} \left (2+x-x^2\right )}{x} \, dx=-2 \, x^{2} + x e^{\left (-\frac {x^{2} - 11 \, x + 2}{x}\right )} + x \]

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 11.53 (sec) , antiderivative size = 21, normalized size of antiderivative = 1.11 \[ \int \frac {x-4 x^2+e^{\frac {-2+11 x-x^2}{x}} \left (2+x-x^2\right )}{x} \, dx=x-2\,x^2+x\,{\mathrm {e}}^{-x}\,{\mathrm {e}}^{11}\,{\mathrm {e}}^{-\frac {2}{x}} \]

[In]

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

[Out]

x - 2*x^2 + x*exp(-x)*exp(11)*exp(-2/x)