\(\int \frac {e^{\frac {1}{x}+x} (-1-x^2+x^4+x^6)}{x^4} \, dx\) [298]

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

Optimal result

Integrand size = 24, antiderivative size = 24 \[ \int \frac {e^{\frac {1}{x}+x} \left (-1-x^2+x^4+x^6\right )}{x^4} \, dx=e^{\frac {1}{x}+x} \left (4+\frac {1}{x^2}-\frac {2}{x}-2 x+x^2\right ) \]

[Out]

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

Rubi [F]

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

[In]

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

[Out]

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

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

Mathematica [A] (verified)

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

[In]

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

[Out]

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

Maple [A] (verified)

Time = 0.12 (sec) , antiderivative size = 33, normalized size of antiderivative = 1.38

method result size
gosper \(\frac {{\mathrm e}^{\frac {x^{2}+1}{x}} \left (x^{4}-2 x^{3}+4 x^{2}-2 x +1\right )}{x^{2}}\) \(33\)
risch \(\frac {{\mathrm e}^{\frac {x^{2}+1}{x}} \left (x^{4}-2 x^{3}+4 x^{2}-2 x +1\right )}{x^{2}}\) \(33\)
norman \(\frac {x \,{\mathrm e}^{x +\frac {1}{x}}+x^{5} {\mathrm e}^{x +\frac {1}{x}}+4 x^{3} {\mathrm e}^{x +\frac {1}{x}}-2 x^{4} {\mathrm e}^{x +\frac {1}{x}}-2 \,{\mathrm e}^{x +\frac {1}{x}} x^{2}}{x^{3}}\) \(57\)
parallelrisch \(\frac {{\mathrm e}^{\frac {x^{2}+1}{x}} x^{4}-2 \,{\mathrm e}^{\frac {x^{2}+1}{x}} x^{3}+4 \,{\mathrm e}^{\frac {x^{2}+1}{x}} x^{2}-2 \,{\mathrm e}^{\frac {x^{2}+1}{x}} x +{\mathrm e}^{\frac {x^{2}+1}{x}}}{x^{2}}\) \(73\)

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 32, normalized size of antiderivative = 1.33 \[ \int \frac {e^{\frac {1}{x}+x} \left (-1-x^2+x^4+x^6\right )}{x^4} \, dx=\frac {{\left (x^{4} - 2 \, x^{3} + 4 \, x^{2} - 2 \, x + 1\right )} e^{\left (\frac {x^{2} + 1}{x}\right )}}{x^{2}} \]

[In]

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

[Out]

(x^4 - 2*x^3 + 4*x^2 - 2*x + 1)*e^((x^2 + 1)/x)/x^2

Sympy [A] (verification not implemented)

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

[In]

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

[Out]

(x**4 - 2*x**3 + 4*x**2 - 2*x + 1)*exp(x + 1/x)/x**2

Maxima [A] (verification not implemented)

none

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

[In]

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

[Out]

(x^4 - 2*x^3 + 4*x^2 - 2*x + 1)*e^(x + 1/x)/x^2

Giac [B] (verification not implemented)

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

Time = 0.28 (sec) , antiderivative size = 72, normalized size of antiderivative = 3.00 \[ \int \frac {e^{\frac {1}{x}+x} \left (-1-x^2+x^4+x^6\right )}{x^4} \, dx=\frac {x^{4} e^{\left (\frac {x^{2} + 1}{x}\right )} - 2 \, x^{3} e^{\left (\frac {x^{2} + 1}{x}\right )} + 4 \, x^{2} e^{\left (\frac {x^{2} + 1}{x}\right )} - 2 \, x e^{\left (\frac {x^{2} + 1}{x}\right )} + e^{\left (\frac {x^{2} + 1}{x}\right )}}{x^{2}} \]

[In]

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

[Out]

(x^4*e^((x^2 + 1)/x) - 2*x^3*e^((x^2 + 1)/x) + 4*x^2*e^((x^2 + 1)/x) - 2*x*e^((x^2 + 1)/x) + e^((x^2 + 1)/x))/
x^2

Mupad [B] (verification not implemented)

Time = 18.19 (sec) , antiderivative size = 28, normalized size of antiderivative = 1.17 \[ \int \frac {e^{\frac {1}{x}+x} \left (-1-x^2+x^4+x^6\right )}{x^4} \, dx=\frac {{\mathrm {e}}^{x+\frac {1}{x}}\,\left (x^4-2\,x^3+4\,x^2-2\,x+1\right )}{x^2} \]

[In]

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

[Out]

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