\(\int \frac {e^x (e^4 (-5-5 x)-5 x^3)+e^{2 x} (-x^2+e^4 (1+x))}{e^{x+\frac {e^4-x \log (4)}{x}} (-10 x^2-20 x^3-10 x^4)+e^{2 x+\frac {e^4-x \log (4)}{x}} (x^2+2 x^3+x^4)+e^{\frac {e^4-x \log (4)}{x}} (25 x^2+50 x^3+25 x^4)} \, dx\) [6585]

   Optimal result
   Rubi [F]
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [B] (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 = 141, antiderivative size = 26 \[ \int \frac {e^x \left (e^4 (-5-5 x)-5 x^3\right )+e^{2 x} \left (-x^2+e^4 (1+x)\right )}{e^{x+\frac {e^4-x \log (4)}{x}} \left (-10 x^2-20 x^3-10 x^4\right )+e^{2 x+\frac {e^4-x \log (4)}{x}} \left (x^2+2 x^3+x^4\right )+e^{\frac {e^4-x \log (4)}{x}} \left (25 x^2+50 x^3+25 x^4\right )} \, dx=\frac {4 e^{-\frac {e^4}{x}+x}}{\left (-5+e^x\right ) (1+x)} \]

[Out]

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

Rubi [F]

\[ \int \frac {e^x \left (e^4 (-5-5 x)-5 x^3\right )+e^{2 x} \left (-x^2+e^4 (1+x)\right )}{e^{x+\frac {e^4-x \log (4)}{x}} \left (-10 x^2-20 x^3-10 x^4\right )+e^{2 x+\frac {e^4-x \log (4)}{x}} \left (x^2+2 x^3+x^4\right )+e^{\frac {e^4-x \log (4)}{x}} \left (25 x^2+50 x^3+25 x^4\right )} \, dx=\int \frac {e^x \left (e^4 (-5-5 x)-5 x^3\right )+e^{2 x} \left (-x^2+e^4 (1+x)\right )}{e^{x+\frac {e^4-x \log (4)}{x}} \left (-10 x^2-20 x^3-10 x^4\right )+e^{2 x+\frac {e^4-x \log (4)}{x}} \left (x^2+2 x^3+x^4\right )+e^{\frac {e^4-x \log (4)}{x}} \left (25 x^2+50 x^3+25 x^4\right )} \, dx \]

[In]

Int[(E^x*(E^4*(-5 - 5*x) - 5*x^3) + E^(2*x)*(-x^2 + E^4*(1 + x)))/(E^(x + (E^4 - x*Log[4])/x)*(-10*x^2 - 20*x^
3 - 10*x^4) + E^(2*x + (E^4 - x*Log[4])/x)*(x^2 + 2*x^3 + x^4) + E^((E^4 - x*Log[4])/x)*(25*x^2 + 50*x^3 + 25*
x^4)),x]

[Out]

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

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

Mathematica [A] (verified)

Time = 3.21 (sec) , antiderivative size = 26, normalized size of antiderivative = 1.00 \[ \int \frac {e^x \left (e^4 (-5-5 x)-5 x^3\right )+e^{2 x} \left (-x^2+e^4 (1+x)\right )}{e^{x+\frac {e^4-x \log (4)}{x}} \left (-10 x^2-20 x^3-10 x^4\right )+e^{2 x+\frac {e^4-x \log (4)}{x}} \left (x^2+2 x^3+x^4\right )+e^{\frac {e^4-x \log (4)}{x}} \left (25 x^2+50 x^3+25 x^4\right )} \, dx=\frac {4 e^{-\frac {e^4}{x}+x}}{\left (-5+e^x\right ) (1+x)} \]

[In]

Integrate[(E^x*(E^4*(-5 - 5*x) - 5*x^3) + E^(2*x)*(-x^2 + E^4*(1 + x)))/(E^(x + (E^4 - x*Log[4])/x)*(-10*x^2 -
 20*x^3 - 10*x^4) + E^(2*x + (E^4 - x*Log[4])/x)*(x^2 + 2*x^3 + x^4) + E^((E^4 - x*Log[4])/x)*(25*x^2 + 50*x^3
 + 25*x^4)),x]

[Out]

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

Maple [A] (verified)

Time = 2.37 (sec) , antiderivative size = 28, normalized size of antiderivative = 1.08

method result size
risch \(\frac {4 \,{\mathrm e}^{-\frac {{\mathrm e}^{4}-x^{2}}{x}}}{\left (1+x \right ) \left ({\mathrm e}^{x}-5\right )}\) \(28\)
norman \(\frac {{\mathrm e}^{x} {\mathrm e}^{-\frac {-2 x \ln \left (2\right )+{\mathrm e}^{4}}{x}}}{\left ({\mathrm e}^{x}-5\right ) \left (1+x \right )}\) \(30\)
parallelrisch \(\frac {{\mathrm e}^{x} {\mathrm e}^{\frac {2 x \ln \left (2\right )-{\mathrm e}^{4}}{x}}}{\left ({\mathrm e}^{x}-5\right ) \left (1+x \right )}\) \(33\)

[In]

int((((1+x)*exp(4)-x^2)*exp(x)^2+((-5*x-5)*exp(4)-5*x^3)*exp(x))/((x^4+2*x^3+x^2)*exp((-2*x*ln(2)+exp(4))/x)*e
xp(x)^2+(-10*x^4-20*x^3-10*x^2)*exp((-2*x*ln(2)+exp(4))/x)*exp(x)+(25*x^4+50*x^3+25*x^2)*exp((-2*x*ln(2)+exp(4
))/x)),x,method=_RETURNVERBOSE)

[Out]

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

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 55 vs. \(2 (26) = 52\).

Time = 0.26 (sec) , antiderivative size = 55, normalized size of antiderivative = 2.12 \[ \int \frac {e^x \left (e^4 (-5-5 x)-5 x^3\right )+e^{2 x} \left (-x^2+e^4 (1+x)\right )}{e^{x+\frac {e^4-x \log (4)}{x}} \left (-10 x^2-20 x^3-10 x^4\right )+e^{2 x+\frac {e^4-x \log (4)}{x}} \left (x^2+2 x^3+x^4\right )+e^{\frac {e^4-x \log (4)}{x}} \left (25 x^2+50 x^3+25 x^4\right )} \, dx=\frac {e^{\left (3 \, x\right )}}{{\left (x + 1\right )} e^{\left (x + \frac {2 \, x^{2} - 2 \, x \log \left (2\right ) + e^{4}}{x}\right )} - 5 \, {\left (x + 1\right )} e^{\left (\frac {2 \, x^{2} - 2 \, x \log \left (2\right ) + e^{4}}{x}\right )}} \]

[In]

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

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.19 (sec) , antiderivative size = 29, normalized size of antiderivative = 1.12 \[ \int \frac {e^x \left (e^4 (-5-5 x)-5 x^3\right )+e^{2 x} \left (-x^2+e^4 (1+x)\right )}{e^{x+\frac {e^4-x \log (4)}{x}} \left (-10 x^2-20 x^3-10 x^4\right )+e^{2 x+\frac {e^4-x \log (4)}{x}} \left (x^2+2 x^3+x^4\right )+e^{\frac {e^4-x \log (4)}{x}} \left (25 x^2+50 x^3+25 x^4\right )} \, dx=\frac {e^{x} e^{- \frac {- 2 x \log {\left (2 \right )} + e^{4}}{x}}}{x e^{x} - 5 x + e^{x} - 5} \]

[In]

integrate((((1+x)*exp(4)-x**2)*exp(x)**2+((-5*x-5)*exp(4)-5*x**3)*exp(x))/((x**4+2*x**3+x**2)*exp((-2*x*ln(2)+
exp(4))/x)*exp(x)**2+(-10*x**4-20*x**3-10*x**2)*exp((-2*x*ln(2)+exp(4))/x)*exp(x)+(25*x**4+50*x**3+25*x**2)*ex
p((-2*x*ln(2)+exp(4))/x)),x)

[Out]

exp(x)*exp(-(-2*x*log(2) + exp(4))/x)/(x*exp(x) - 5*x + exp(x) - 5)

Maxima [A] (verification not implemented)

none

Time = 0.30 (sec) , antiderivative size = 25, normalized size of antiderivative = 0.96 \[ \int \frac {e^x \left (e^4 (-5-5 x)-5 x^3\right )+e^{2 x} \left (-x^2+e^4 (1+x)\right )}{e^{x+\frac {e^4-x \log (4)}{x}} \left (-10 x^2-20 x^3-10 x^4\right )+e^{2 x+\frac {e^4-x \log (4)}{x}} \left (x^2+2 x^3+x^4\right )+e^{\frac {e^4-x \log (4)}{x}} \left (25 x^2+50 x^3+25 x^4\right )} \, dx=\frac {4 \, e^{\left (x - \frac {e^{4}}{x}\right )}}{{\left (x + 1\right )} e^{x} - 5 \, x - 5} \]

[In]

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

[Out]

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

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 100 vs. \(2 (26) = 52\).

Time = 0.30 (sec) , antiderivative size = 100, normalized size of antiderivative = 3.85 \[ \int \frac {e^x \left (e^4 (-5-5 x)-5 x^3\right )+e^{2 x} \left (-x^2+e^4 (1+x)\right )}{e^{x+\frac {e^4-x \log (4)}{x}} \left (-10 x^2-20 x^3-10 x^4\right )+e^{2 x+\frac {e^4-x \log (4)}{x}} \left (x^2+2 x^3+x^4\right )+e^{\frac {e^4-x \log (4)}{x}} \left (25 x^2+50 x^3+25 x^4\right )} \, dx=\frac {4 \, e^{\left (\frac {2 \, {\left (2 \, x^{2} + e^{4}\right )}}{x}\right )}}{x e^{\left (\frac {2 \, x^{2} + e^{4}}{x} + \frac {2 \, {\left (x^{2} + e^{4}\right )}}{x}\right )} - 5 \, x e^{\left (\frac {3 \, {\left (x^{2} + e^{4}\right )}}{x}\right )} + e^{\left (\frac {2 \, x^{2} + e^{4}}{x} + \frac {2 \, {\left (x^{2} + e^{4}\right )}}{x}\right )} - 5 \, e^{\left (\frac {3 \, {\left (x^{2} + e^{4}\right )}}{x}\right )}} \]

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 12.75 (sec) , antiderivative size = 28, normalized size of antiderivative = 1.08 \[ \int \frac {e^x \left (e^4 (-5-5 x)-5 x^3\right )+e^{2 x} \left (-x^2+e^4 (1+x)\right )}{e^{x+\frac {e^4-x \log (4)}{x}} \left (-10 x^2-20 x^3-10 x^4\right )+e^{2 x+\frac {e^4-x \log (4)}{x}} \left (x^2+2 x^3+x^4\right )+e^{\frac {e^4-x \log (4)}{x}} \left (25 x^2+50 x^3+25 x^4\right )} \, dx=-\frac {4\,{\mathrm {e}}^{-\frac {{\mathrm {e}}^4}{x}}\,{\mathrm {e}}^x}{5\,x-{\mathrm {e}}^x-x\,{\mathrm {e}}^x+5} \]

[In]

int((exp(2*x)*(exp(4)*(x + 1) - x^2) - exp(x)*(5*x^3 + exp(4)*(5*x + 5)))/(exp((exp(4) - 2*x*log(2))/x)*(25*x^
2 + 50*x^3 + 25*x^4) + exp(2*x)*exp((exp(4) - 2*x*log(2))/x)*(x^2 + 2*x^3 + x^4) - exp((exp(4) - 2*x*log(2))/x
)*exp(x)*(10*x^2 + 20*x^3 + 10*x^4)),x)

[Out]

-(4*exp(-exp(4)/x)*exp(x))/(5*x - exp(x) - x*exp(x) + 5)