\(\int \frac {-20 x^2+e^{\frac {-4+x^2}{x}} (-40-10 x^2)}{e^{3+\frac {2 (-4+x^2)}{x}} x^2+e^{3+\frac {-4+x^2}{x}} (8 x^2+4 x^3)+e^3 (16 x^2+16 x^3+4 x^4)} \, dx\) [2981]

   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 = 92, antiderivative size = 21 \[ \int \frac {-20 x^2+e^{\frac {-4+x^2}{x}} \left (-40-10 x^2\right )}{e^{3+\frac {2 \left (-4+x^2\right )}{x}} x^2+e^{3+\frac {-4+x^2}{x}} \left (8 x^2+4 x^3\right )+e^3 \left (16 x^2+16 x^3+4 x^4\right )} \, dx=\frac {10}{e^3 \left (4+e^{-\frac {4}{x}+x}+2 x\right )} \]

[Out]

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

Rubi [F]

\[ \int \frac {-20 x^2+e^{\frac {-4+x^2}{x}} \left (-40-10 x^2\right )}{e^{3+\frac {2 \left (-4+x^2\right )}{x}} x^2+e^{3+\frac {-4+x^2}{x}} \left (8 x^2+4 x^3\right )+e^3 \left (16 x^2+16 x^3+4 x^4\right )} \, dx=\int \frac {-20 x^2+e^{\frac {-4+x^2}{x}} \left (-40-10 x^2\right )}{e^{3+\frac {2 \left (-4+x^2\right )}{x}} x^2+e^{3+\frac {-4+x^2}{x}} \left (8 x^2+4 x^3\right )+e^3 \left (16 x^2+16 x^3+4 x^4\right )} \, dx \]

[In]

Int[(-20*x^2 + E^((-4 + x^2)/x)*(-40 - 10*x^2))/(E^(3 + (2*(-4 + x^2))/x)*x^2 + E^(3 + (-4 + x^2)/x)*(8*x^2 +
4*x^3) + E^3*(16*x^2 + 16*x^3 + 4*x^4)),x]

[Out]

20*Defer[Int][E^(-3 + 8/x)/(E^x + 2*E^(4/x)*(2 + x))^2, x] + 160*Defer[Int][E^(-3 + 8/x)/(x^2*(E^x + 2*E^(4/x)
*(2 + x))^2), x] + 80*Defer[Int][E^(-3 + 8/x)/(x*(E^x + 2*E^(4/x)*(2 + x))^2), x] + 20*Defer[Int][(E^(-3 + 8/x
)*x)/(E^x + 2*E^(4/x)*(2 + x))^2, x] - (10*Defer[Int][E^(4/x)/(E^x + 2*E^(4/x)*(2 + x)), x])/E^3 - (40*Defer[I
nt][E^(4/x)/(x^2*(E^x + 2*E^(4/x)*(2 + x))), x])/E^3

Rubi steps \begin{align*} \text {integral}& = \int \frac {10 e^{-3+\frac {4}{x}} \left (-2 e^{4/x} x^2-e^x \left (4+x^2\right )\right )}{x^2 \left (e^x+2 e^{4/x} (2+x)\right )^2} \, dx \\ & = 10 \int \frac {e^{-3+\frac {4}{x}} \left (-2 e^{4/x} x^2-e^x \left (4+x^2\right )\right )}{x^2 \left (e^x+2 e^{4/x} (2+x)\right )^2} \, dx \\ & = 10 \int \left (-\frac {e^{-3+\frac {4}{x}} \left (4+x^2\right )}{x^2 \left (4 e^{4/x}+e^x+2 e^{4/x} x\right )}+\frac {2 e^{-3+\frac {8}{x}} \left (8+4 x+x^2+x^3\right )}{x^2 \left (4 e^{4/x}+e^x+2 e^{4/x} x\right )^2}\right ) \, dx \\ & = -\left (10 \int \frac {e^{-3+\frac {4}{x}} \left (4+x^2\right )}{x^2 \left (4 e^{4/x}+e^x+2 e^{4/x} x\right )} \, dx\right )+20 \int \frac {e^{-3+\frac {8}{x}} \left (8+4 x+x^2+x^3\right )}{x^2 \left (4 e^{4/x}+e^x+2 e^{4/x} x\right )^2} \, dx \\ & = -\left (10 \int \frac {4+x^2}{e^3 x^2 \left (4+e^{-\frac {4}{x}+x}+2 x\right )} \, dx\right )+20 \int \frac {e^{-3+\frac {8}{x}} \left (8+4 x+x^2+x^3\right )}{x^2 \left (e^x+2 e^{4/x} (2+x)\right )^2} \, dx \\ & = 20 \int \left (\frac {e^{-3+\frac {8}{x}}}{\left (4 e^{4/x}+e^x+2 e^{4/x} x\right )^2}+\frac {8 e^{-3+\frac {8}{x}}}{x^2 \left (4 e^{4/x}+e^x+2 e^{4/x} x\right )^2}+\frac {4 e^{-3+\frac {8}{x}}}{x \left (4 e^{4/x}+e^x+2 e^{4/x} x\right )^2}+\frac {e^{-3+\frac {8}{x}} x}{\left (4 e^{4/x}+e^x+2 e^{4/x} x\right )^2}\right ) \, dx-\frac {10 \int \frac {4+x^2}{x^2 \left (4+e^{-\frac {4}{x}+x}+2 x\right )} \, dx}{e^3} \\ & = 20 \int \frac {e^{-3+\frac {8}{x}}}{\left (4 e^{4/x}+e^x+2 e^{4/x} x\right )^2} \, dx+20 \int \frac {e^{-3+\frac {8}{x}} x}{\left (4 e^{4/x}+e^x+2 e^{4/x} x\right )^2} \, dx+80 \int \frac {e^{-3+\frac {8}{x}}}{x \left (4 e^{4/x}+e^x+2 e^{4/x} x\right )^2} \, dx+160 \int \frac {e^{-3+\frac {8}{x}}}{x^2 \left (4 e^{4/x}+e^x+2 e^{4/x} x\right )^2} \, dx-\frac {10 \int \left (\frac {e^{4/x}}{4 e^{4/x}+e^x+2 e^{4/x} x}+\frac {4 e^{4/x}}{x^2 \left (4 e^{4/x}+e^x+2 e^{4/x} x\right )}\right ) \, dx}{e^3} \\ & = 20 \int \frac {e^{-3+\frac {8}{x}}}{\left (e^x+2 e^{4/x} (2+x)\right )^2} \, dx+20 \int \frac {e^{-3+\frac {8}{x}} x}{\left (e^x+2 e^{4/x} (2+x)\right )^2} \, dx+80 \int \frac {e^{-3+\frac {8}{x}}}{x \left (e^x+2 e^{4/x} (2+x)\right )^2} \, dx+160 \int \frac {e^{-3+\frac {8}{x}}}{x^2 \left (e^x+2 e^{4/x} (2+x)\right )^2} \, dx-\frac {10 \int \frac {e^{4/x}}{4 e^{4/x}+e^x+2 e^{4/x} x} \, dx}{e^3}-\frac {40 \int \frac {e^{4/x}}{x^2 \left (4 e^{4/x}+e^x+2 e^{4/x} x\right )} \, dx}{e^3} \\ & = 20 \int \frac {e^{-3+\frac {8}{x}}}{\left (e^x+2 e^{4/x} (2+x)\right )^2} \, dx+20 \int \frac {e^{-3+\frac {8}{x}} x}{\left (e^x+2 e^{4/x} (2+x)\right )^2} \, dx+80 \int \frac {e^{-3+\frac {8}{x}}}{x \left (e^x+2 e^{4/x} (2+x)\right )^2} \, dx+160 \int \frac {e^{-3+\frac {8}{x}}}{x^2 \left (e^x+2 e^{4/x} (2+x)\right )^2} \, dx-\frac {10 \int \frac {e^{4/x}}{e^x+2 e^{4/x} (2+x)} \, dx}{e^3}-\frac {40 \int \frac {e^{4/x}}{x^2 \left (e^x+2 e^{4/x} (2+x)\right )} \, dx}{e^3} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.65 (sec) , antiderivative size = 21, normalized size of antiderivative = 1.00 \[ \int \frac {-20 x^2+e^{\frac {-4+x^2}{x}} \left (-40-10 x^2\right )}{e^{3+\frac {2 \left (-4+x^2\right )}{x}} x^2+e^{3+\frac {-4+x^2}{x}} \left (8 x^2+4 x^3\right )+e^3 \left (16 x^2+16 x^3+4 x^4\right )} \, dx=\frac {10}{e^3 \left (4+e^{-\frac {4}{x}+x}+2 x\right )} \]

[In]

Integrate[(-20*x^2 + E^((-4 + x^2)/x)*(-40 - 10*x^2))/(E^(3 + (2*(-4 + x^2))/x)*x^2 + E^(3 + (-4 + x^2)/x)*(8*
x^2 + 4*x^3) + E^3*(16*x^2 + 16*x^3 + 4*x^4)),x]

[Out]

10/(E^3*(4 + E^(-4/x + x) + 2*x))

Maple [A] (verified)

Time = 0.75 (sec) , antiderivative size = 23, normalized size of antiderivative = 1.10

method result size
risch \(\frac {10 \,{\mathrm e}^{-3}}{4+{\mathrm e}^{\frac {\left (-2+x \right ) \left (2+x \right )}{x}}+2 x}\) \(23\)
norman \(\frac {10 \,{\mathrm e}^{-3}}{4+{\mathrm e}^{\frac {x^{2}-4}{x}}+2 x}\) \(24\)
parallelrisch \(\frac {10 \,{\mathrm e}^{-3}}{4+{\mathrm e}^{\frac {x^{2}-4}{x}}+2 x}\) \(24\)

[In]

int(((-10*x^2-40)*exp((x^2-4)/x)-20*x^2)/(x^2*exp(3)*exp((x^2-4)/x)^2+(4*x^3+8*x^2)*exp(3)*exp((x^2-4)/x)+(4*x
^4+16*x^3+16*x^2)*exp(3)),x,method=_RETURNVERBOSE)

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 25, normalized size of antiderivative = 1.19 \[ \int \frac {-20 x^2+e^{\frac {-4+x^2}{x}} \left (-40-10 x^2\right )}{e^{3+\frac {2 \left (-4+x^2\right )}{x}} x^2+e^{3+\frac {-4+x^2}{x}} \left (8 x^2+4 x^3\right )+e^3 \left (16 x^2+16 x^3+4 x^4\right )} \, dx=\frac {10}{2 \, {\left (x + 2\right )} e^{3} + e^{\left (\frac {x^{2} + 3 \, x - 4}{x}\right )}} \]

[In]

integrate(((-10*x^2-40)*exp((x^2-4)/x)-20*x^2)/(x^2*exp(3)*exp((x^2-4)/x)^2+(4*x^3+8*x^2)*exp(3)*exp((x^2-4)/x
)+(4*x^4+16*x^3+16*x^2)*exp(3)),x, algorithm="fricas")

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.08 (sec) , antiderivative size = 24, normalized size of antiderivative = 1.14 \[ \int \frac {-20 x^2+e^{\frac {-4+x^2}{x}} \left (-40-10 x^2\right )}{e^{3+\frac {2 \left (-4+x^2\right )}{x}} x^2+e^{3+\frac {-4+x^2}{x}} \left (8 x^2+4 x^3\right )+e^3 \left (16 x^2+16 x^3+4 x^4\right )} \, dx=\frac {10}{2 x e^{3} + e^{3} e^{\frac {x^{2} - 4}{x}} + 4 e^{3}} \]

[In]

integrate(((-10*x**2-40)*exp((x**2-4)/x)-20*x**2)/(x**2*exp(3)*exp((x**2-4)/x)**2+(4*x**3+8*x**2)*exp(3)*exp((
x**2-4)/x)+(4*x**4+16*x**3+16*x**2)*exp(3)),x)

[Out]

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

Maxima [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 32, normalized size of antiderivative = 1.52 \[ \int \frac {-20 x^2+e^{\frac {-4+x^2}{x}} \left (-40-10 x^2\right )}{e^{3+\frac {2 \left (-4+x^2\right )}{x}} x^2+e^{3+\frac {-4+x^2}{x}} \left (8 x^2+4 x^3\right )+e^3 \left (16 x^2+16 x^3+4 x^4\right )} \, dx=\frac {10 \, e^{\frac {4}{x}}}{2 \, {\left (x e^{3} + 2 \, e^{3}\right )} e^{\frac {4}{x}} + e^{\left (x + 3\right )}} \]

[In]

integrate(((-10*x^2-40)*exp((x^2-4)/x)-20*x^2)/(x^2*exp(3)*exp((x^2-4)/x)^2+(4*x^3+8*x^2)*exp(3)*exp((x^2-4)/x
)+(4*x^4+16*x^3+16*x^2)*exp(3)),x, algorithm="maxima")

[Out]

10*e^(4/x)/(2*(x*e^3 + 2*e^3)*e^(4/x) + e^(x + 3))

Giac [B] (verification not implemented)

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

Time = 0.27 (sec) , antiderivative size = 555, normalized size of antiderivative = 26.43 \[ \int \frac {-20 x^2+e^{\frac {-4+x^2}{x}} \left (-40-10 x^2\right )}{e^{3+\frac {2 \left (-4+x^2\right )}{x}} x^2+e^{3+\frac {-4+x^2}{x}} \left (8 x^2+4 x^3\right )+e^3 \left (16 x^2+16 x^3+4 x^4\right )} \, dx=\frac {10 \, {\left (2 \, x^{4} e^{\left (\frac {3 \, x + 4}{x} + 3\right )} + x^{3} e^{\left (\frac {x^{2} + 3 \, x - 4}{x} + \frac {3 \, x + 4}{x}\right )} + 6 \, x^{3} e^{\left (\frac {3 \, x + 4}{x} + 3\right )} - x^{2} e^{\left (x + 6\right )} + 2 \, x^{2} e^{\left (\frac {x^{2} + 3 \, x - 4}{x} + \frac {3 \, x + 4}{x}\right )} + 12 \, x^{2} e^{\left (\frac {3 \, x + 4}{x} + 3\right )} + 4 \, x e^{\left (\frac {x^{2} + 3 \, x - 4}{x} + \frac {3 \, x + 4}{x}\right )} + 32 \, x e^{\left (\frac {3 \, x + 4}{x} + 3\right )} + 8 \, e^{\left (\frac {x^{2} + 3 \, x - 4}{x} + \frac {3 \, x + 4}{x}\right )} + 32 \, e^{\left (\frac {3 \, x + 4}{x} + 3\right )}\right )}}{4 \, x^{5} e^{\left (\frac {3 \, x + 4}{x} + 6\right )} + 2 \, x^{4} e^{\left (x + 9\right )} + 2 \, x^{4} e^{\left (\frac {x^{2} + 3 \, x - 4}{x} + \frac {3 \, x + 4}{x} + 3\right )} + 20 \, x^{4} e^{\left (\frac {3 \, x + 4}{x} + 6\right )} + x^{3} e^{\left (x + \frac {x^{2} + 3 \, x - 4}{x} + 6\right )} + 6 \, x^{3} e^{\left (x + 9\right )} + 6 \, x^{3} e^{\left (\frac {x^{2} + 3 \, x - 4}{x} + \frac {3 \, x + 4}{x} + 3\right )} + 48 \, x^{3} e^{\left (\frac {3 \, x + 4}{x} + 6\right )} + x^{2} e^{\left (x + \frac {x^{2} + 3 \, x - 4}{x} + 6\right )} + 12 \, x^{2} e^{\left (x + 9\right )} + 12 \, x^{2} e^{\left (\frac {x^{2} + 3 \, x - 4}{x} + \frac {3 \, x + 4}{x} + 3\right )} + 112 \, x^{2} e^{\left (\frac {3 \, x + 4}{x} + 6\right )} + 4 \, x e^{\left (x + \frac {x^{2} + 3 \, x - 4}{x} + 6\right )} + 32 \, x e^{\left (x + 9\right )} + 32 \, x e^{\left (\frac {x^{2} + 3 \, x - 4}{x} + \frac {3 \, x + 4}{x} + 3\right )} + 192 \, x e^{\left (\frac {3 \, x + 4}{x} + 6\right )} + 8 \, e^{\left (x + \frac {x^{2} + 3 \, x - 4}{x} + 6\right )} + 32 \, e^{\left (x + 9\right )} + 32 \, e^{\left (\frac {x^{2} + 3 \, x - 4}{x} + \frac {3 \, x + 4}{x} + 3\right )} + 128 \, e^{\left (\frac {3 \, x + 4}{x} + 6\right )}} \]

[In]

integrate(((-10*x^2-40)*exp((x^2-4)/x)-20*x^2)/(x^2*exp(3)*exp((x^2-4)/x)^2+(4*x^3+8*x^2)*exp(3)*exp((x^2-4)/x
)+(4*x^4+16*x^3+16*x^2)*exp(3)),x, algorithm="giac")

[Out]

10*(2*x^4*e^((3*x + 4)/x + 3) + x^3*e^((x^2 + 3*x - 4)/x + (3*x + 4)/x) + 6*x^3*e^((3*x + 4)/x + 3) - x^2*e^(x
 + 6) + 2*x^2*e^((x^2 + 3*x - 4)/x + (3*x + 4)/x) + 12*x^2*e^((3*x + 4)/x + 3) + 4*x*e^((x^2 + 3*x - 4)/x + (3
*x + 4)/x) + 32*x*e^((3*x + 4)/x + 3) + 8*e^((x^2 + 3*x - 4)/x + (3*x + 4)/x) + 32*e^((3*x + 4)/x + 3))/(4*x^5
*e^((3*x + 4)/x + 6) + 2*x^4*e^(x + 9) + 2*x^4*e^((x^2 + 3*x - 4)/x + (3*x + 4)/x + 3) + 20*x^4*e^((3*x + 4)/x
 + 6) + x^3*e^(x + (x^2 + 3*x - 4)/x + 6) + 6*x^3*e^(x + 9) + 6*x^3*e^((x^2 + 3*x - 4)/x + (3*x + 4)/x + 3) +
48*x^3*e^((3*x + 4)/x + 6) + x^2*e^(x + (x^2 + 3*x - 4)/x + 6) + 12*x^2*e^(x + 9) + 12*x^2*e^((x^2 + 3*x - 4)/
x + (3*x + 4)/x + 3) + 112*x^2*e^((3*x + 4)/x + 6) + 4*x*e^(x + (x^2 + 3*x - 4)/x + 6) + 32*x*e^(x + 9) + 32*x
*e^((x^2 + 3*x - 4)/x + (3*x + 4)/x + 3) + 192*x*e^((3*x + 4)/x + 6) + 8*e^(x + (x^2 + 3*x - 4)/x + 6) + 32*e^
(x + 9) + 32*e^((x^2 + 3*x - 4)/x + (3*x + 4)/x + 3) + 128*e^((3*x + 4)/x + 6))

Mupad [B] (verification not implemented)

Time = 10.84 (sec) , antiderivative size = 25, normalized size of antiderivative = 1.19 \[ \int \frac {-20 x^2+e^{\frac {-4+x^2}{x}} \left (-40-10 x^2\right )}{e^{3+\frac {2 \left (-4+x^2\right )}{x}} x^2+e^{3+\frac {-4+x^2}{x}} \left (8 x^2+4 x^3\right )+e^3 \left (16 x^2+16 x^3+4 x^4\right )} \, dx=\frac {10}{4\,{\mathrm {e}}^3+2\,x\,{\mathrm {e}}^3+{\mathrm {e}}^3\,{\mathrm {e}}^{-\frac {4}{x}}\,{\mathrm {e}}^x} \]

[In]

int(-(exp((x^2 - 4)/x)*(10*x^2 + 40) + 20*x^2)/(exp(3)*(16*x^2 + 16*x^3 + 4*x^4) + exp(3)*exp((x^2 - 4)/x)*(8*
x^2 + 4*x^3) + x^2*exp(3)*exp((2*(x^2 - 4))/x)),x)

[Out]

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