\(\int \frac {e^{\frac {-4+3 e^x (-2+x)+2 x-x^2}{2+3 e^x}} (-20+20 x-20 x^2+9 e^{2 x} (-5+5 x)+3 e^x (-20+20 x-10 x^2+5 x^3))}{8 x^2+24 e^x x^2+18 e^{2 x} x^2} \, dx\) [3556]

   Optimal result
   Rubi [F]
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [B] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 99, antiderivative size = 28 \[ \int \frac {e^{\frac {-4+3 e^x (-2+x)+2 x-x^2}{2+3 e^x}} \left (-20+20 x-20 x^2+9 e^{2 x} (-5+5 x)+3 e^x \left (-20+20 x-10 x^2+5 x^3\right )\right )}{8 x^2+24 e^x x^2+18 e^{2 x} x^2} \, dx=-1+\frac {5 e^{-2+x-\frac {x^2}{2+3 e^x}}}{2 x} \]

[Out]

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

Rubi [F]

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

[In]

Int[(E^((-4 + 3*E^x*(-2 + x) + 2*x - x^2)/(2 + 3*E^x))*(-20 + 20*x - 20*x^2 + 9*E^(2*x)*(-5 + 5*x) + 3*E^x*(-2
0 + 20*x - 10*x^2 + 5*x^3)))/(8*x^2 + 24*E^x*x^2 + 18*E^(2*x)*x^2),x]

[Out]

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

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

Mathematica [A] (verified)

Time = 0.13 (sec) , antiderivative size = 26, normalized size of antiderivative = 0.93 \[ \int \frac {e^{\frac {-4+3 e^x (-2+x)+2 x-x^2}{2+3 e^x}} \left (-20+20 x-20 x^2+9 e^{2 x} (-5+5 x)+3 e^x \left (-20+20 x-10 x^2+5 x^3\right )\right )}{8 x^2+24 e^x x^2+18 e^{2 x} x^2} \, dx=\frac {5 e^{-2+x-\frac {x^2}{2+3 e^x}}}{2 x} \]

[In]

Integrate[(E^((-4 + 3*E^x*(-2 + x) + 2*x - x^2)/(2 + 3*E^x))*(-20 + 20*x - 20*x^2 + 9*E^(2*x)*(-5 + 5*x) + 3*E
^x*(-20 + 20*x - 10*x^2 + 5*x^3)))/(8*x^2 + 24*E^x*x^2 + 18*E^(2*x)*x^2),x]

[Out]

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

Maple [A] (verified)

Time = 0.88 (sec) , antiderivative size = 36, normalized size of antiderivative = 1.29

method result size
parallelrisch \(\frac {5 \,{\mathrm e}^{\frac {\left (-2+x \right ) {\mathrm e}^{\ln \left (3\right )+x}-x^{2}+2 x -4}{{\mathrm e}^{\ln \left (3\right )+x}+2}}}{2 x}\) \(36\)
norman \(\frac {\frac {5 \,{\mathrm e}^{\ln \left (3\right )+x} {\mathrm e}^{\frac {\left (-2+x \right ) {\mathrm e}^{\ln \left (3\right )+x}-x^{2}+2 x -4}{{\mathrm e}^{\ln \left (3\right )+x}+2}}}{2}+5 \,{\mathrm e}^{\frac {\left (-2+x \right ) {\mathrm e}^{\ln \left (3\right )+x}-x^{2}+2 x -4}{{\mathrm e}^{\ln \left (3\right )+x}+2}}}{x \left ({\mathrm e}^{\ln \left (3\right )+x}+2\right )}\) \(84\)

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 35, normalized size of antiderivative = 1.25 \[ \int \frac {e^{\frac {-4+3 e^x (-2+x)+2 x-x^2}{2+3 e^x}} \left (-20+20 x-20 x^2+9 e^{2 x} (-5+5 x)+3 e^x \left (-20+20 x-10 x^2+5 x^3\right )\right )}{8 x^2+24 e^x x^2+18 e^{2 x} x^2} \, dx=\frac {5 \, e^{\left (-\frac {x^{2} - {\left (x - 2\right )} e^{\left (x + \log \left (3\right )\right )} - 2 \, x + 4}{e^{\left (x + \log \left (3\right )\right )} + 2}\right )}}{2 \, x} \]

[In]

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

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.24 (sec) , antiderivative size = 29, normalized size of antiderivative = 1.04 \[ \int \frac {e^{\frac {-4+3 e^x (-2+x)+2 x-x^2}{2+3 e^x}} \left (-20+20 x-20 x^2+9 e^{2 x} (-5+5 x)+3 e^x \left (-20+20 x-10 x^2+5 x^3\right )\right )}{8 x^2+24 e^x x^2+18 e^{2 x} x^2} \, dx=\frac {5 e^{\frac {- x^{2} + 2 x + 3 \left (x - 2\right ) e^{x} - 4}{3 e^{x} + 2}}}{2 x} \]

[In]

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

[Out]

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

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 66 vs. \(2 (25) = 50\).

Time = 0.34 (sec) , antiderivative size = 66, normalized size of antiderivative = 2.36 \[ \int \frac {e^{\frac {-4+3 e^x (-2+x)+2 x-x^2}{2+3 e^x}} \left (-20+20 x-20 x^2+9 e^{2 x} (-5+5 x)+3 e^x \left (-20+20 x-10 x^2+5 x^3\right )\right )}{8 x^2+24 e^x x^2+18 e^{2 x} x^2} \, dx=\frac {5 \, e^{\left (-\frac {x^{2}}{3 \, e^{x} + 2} + \frac {3 \, x e^{x}}{3 \, e^{x} + 2} + \frac {2 \, x}{3 \, e^{x} + 2} - \frac {6 \, e^{x}}{3 \, e^{x} + 2} - \frac {4}{3 \, e^{x} + 2}\right )}}{2 \, x} \]

[In]

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

[Out]

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

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 70 vs. \(2 (25) = 50\).

Time = 0.81 (sec) , antiderivative size = 70, normalized size of antiderivative = 2.50 \[ \int \frac {e^{\frac {-4+3 e^x (-2+x)+2 x-x^2}{2+3 e^x}} \left (-20+20 x-20 x^2+9 e^{2 x} (-5+5 x)+3 e^x \left (-20+20 x-10 x^2+5 x^3\right )\right )}{8 x^2+24 e^x x^2+18 e^{2 x} x^2} \, dx=\frac {5 \, e^{\left (-\frac {1}{2} \, \log \left (3\right )^{2} + \frac {e^{\left (x + \log \left (3\right )\right )} \log \left (3\right )^{2} - 2 \, {\left (x + \log \left (3\right )\right )}^{2} + 2 \, {\left (x + \log \left (3\right )\right )} e^{\left (x + \log \left (3\right )\right )} + 4 \, {\left (x + \log \left (3\right )\right )} \log \left (3\right ) + 4 \, x + 4 \, \log \left (3\right )}{2 \, {\left (e^{\left (x + \log \left (3\right )\right )} + 2\right )}} - 2\right )}}{6 \, x} \]

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 0.33 (sec) , antiderivative size = 69, normalized size of antiderivative = 2.46 \[ \int \frac {e^{\frac {-4+3 e^x (-2+x)+2 x-x^2}{2+3 e^x}} \left (-20+20 x-20 x^2+9 e^{2 x} (-5+5 x)+3 e^x \left (-20+20 x-10 x^2+5 x^3\right )\right )}{8 x^2+24 e^x x^2+18 e^{2 x} x^2} \, dx=\frac {5\,{\mathrm {e}}^{\frac {3\,x\,{\mathrm {e}}^x}{3\,{\mathrm {e}}^x+2}}\,{\mathrm {e}}^{\frac {2\,x}{3\,{\mathrm {e}}^x+2}}\,{\mathrm {e}}^{-\frac {x^2}{3\,{\mathrm {e}}^x+2}}\,{\mathrm {e}}^{-\frac {6\,{\mathrm {e}}^x}{3\,{\mathrm {e}}^x+2}}\,{\mathrm {e}}^{-\frac {4}{3\,{\mathrm {e}}^x+2}}}{2\,x} \]

[In]

int((exp((2*x - x^2 + exp(x + log(3))*(x - 2) - 4)/(exp(x + log(3)) + 2))*(20*x + exp(x + log(3))*(20*x - 10*x
^2 + 5*x^3 - 20) - 20*x^2 + exp(2*x + 2*log(3))*(5*x - 5) - 20))/(2*x^2*exp(2*x + 2*log(3)) + 8*x^2 + 8*x^2*ex
p(x + log(3))),x)

[Out]

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