\(\int \frac {e^x (-16-16 x)+e^{x+\frac {2}{3} (2 x+2 x^2)} (-1-x)+e^{x+\frac {1}{3} (2 x+2 x^2)} (10+6 x-8 x^2)}{4-4 e^{\frac {1}{3} (2 x+2 x^2)}+e^{\frac {2}{3} (2 x+2 x^2)}} \, dx\) [5084]

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

Optimal result

Integrand size = 98, antiderivative size = 27 \[ \int \frac {e^x (-16-16 x)+e^{x+\frac {2}{3} \left (2 x+2 x^2\right )} (-1-x)+e^{x+\frac {1}{3} \left (2 x+2 x^2\right )} \left (10+6 x-8 x^2\right )}{4-4 e^{\frac {1}{3} \left (2 x+2 x^2\right )}+e^{\frac {2}{3} \left (2 x+2 x^2\right )}} \, dx=e^x \left (-x+\frac {6 x}{-2+e^{\frac {1}{3} x (2+2 x)}}\right ) \]

[Out]

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

Rubi [F]

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

[In]

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

[Out]

-(E^x*x) + 6*Defer[Int][E^x/(-2 + E^((2*x*(1 + x))/3)), x] - 8*Defer[Int][(E^x*x)/(-2 + E^((2*x*(1 + x))/3))^2
, x] + 2*Defer[Int][(E^x*x)/(-2 + E^((2*x*(1 + x))/3)), x] - 16*Defer[Int][(E^x*x^2)/(-2 + E^((2*x*(1 + x))/3)
)^2, x] - 8*Defer[Int][(E^x*x^2)/(-2 + E^((2*x*(1 + x))/3)), x]

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

Mathematica [A] (verified)

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

[In]

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

[Out]

-(E^x*(1 - 6/(-2 + E^((2*x*(1 + x))/3)))*x)

Maple [A] (verified)

Time = 0.11 (sec) , antiderivative size = 23, normalized size of antiderivative = 0.85

method result size
risch \(-{\mathrm e}^{x} x +\frac {6 x \,{\mathrm e}^{x}}{{\mathrm e}^{\frac {2 \left (1+x \right ) x}{3}}-2}\) \(23\)
norman \(\frac {8 \,{\mathrm e}^{x} x -{\mathrm e}^{x} x \,{\mathrm e}^{\frac {2}{3} x^{2}+\frac {2}{3} x}}{{\mathrm e}^{\frac {2}{3} x^{2}+\frac {2}{3} x}-2}\) \(37\)
parallelrisch \(-\frac {{\mathrm e}^{x} x \,{\mathrm e}^{\frac {2}{3} x^{2}+\frac {2}{3} x}-8 \,{\mathrm e}^{x} x}{{\mathrm e}^{\frac {2}{3} x^{2}+\frac {2}{3} x}-2}\) \(37\)

[In]

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

[Out]

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

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 53 vs. \(2 (20) = 40\).

Time = 0.25 (sec) , antiderivative size = 53, normalized size of antiderivative = 1.96 \[ \int \frac {e^x (-16-16 x)+e^{x+\frac {2}{3} \left (2 x+2 x^2\right )} (-1-x)+e^{x+\frac {1}{3} \left (2 x+2 x^2\right )} \left (10+6 x-8 x^2\right )}{4-4 e^{\frac {1}{3} \left (2 x+2 x^2\right )}+e^{\frac {2}{3} \left (2 x+2 x^2\right )}} \, dx=-\frac {x e^{\left (\frac {8}{3} \, x^{2} + \frac {17}{3} \, x\right )} - 8 \, x e^{\left (2 \, x^{2} + 5 \, x\right )}}{e^{\left (\frac {8}{3} \, x^{2} + \frac {14}{3} \, x\right )} - 2 \, e^{\left (2 \, x^{2} + 4 \, x\right )}} \]

[In]

integrate(((-1-x)*exp(x)*exp(2/3*x^2+2/3*x)^2+(-8*x^2+6*x+10)*exp(x)*exp(2/3*x^2+2/3*x)+(-16*x-16)*exp(x))/(ex
p(2/3*x^2+2/3*x)^2-4*exp(2/3*x^2+2/3*x)+4),x, algorithm="fricas")

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.09 (sec) , antiderivative size = 26, normalized size of antiderivative = 0.96 \[ \int \frac {e^x (-16-16 x)+e^{x+\frac {2}{3} \left (2 x+2 x^2\right )} (-1-x)+e^{x+\frac {1}{3} \left (2 x+2 x^2\right )} \left (10+6 x-8 x^2\right )}{4-4 e^{\frac {1}{3} \left (2 x+2 x^2\right )}+e^{\frac {2}{3} \left (2 x+2 x^2\right )}} \, dx=- x e^{x} + \frac {6 x e^{x}}{e^{\frac {2 x^{2}}{3} + \frac {2 x}{3}} - 2} \]

[In]

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

[Out]

-x*exp(x) + 6*x*exp(x)/(exp(2*x**2/3 + 2*x/3) - 2)

Maxima [A] (verification not implemented)

none

Time = 0.22 (sec) , antiderivative size = 34, normalized size of antiderivative = 1.26 \[ \int \frac {e^x (-16-16 x)+e^{x+\frac {2}{3} \left (2 x+2 x^2\right )} (-1-x)+e^{x+\frac {1}{3} \left (2 x+2 x^2\right )} \left (10+6 x-8 x^2\right )}{4-4 e^{\frac {1}{3} \left (2 x+2 x^2\right )}+e^{\frac {2}{3} \left (2 x+2 x^2\right )}} \, dx=-\frac {x e^{\left (\frac {2}{3} \, x^{2} + \frac {5}{3} \, x\right )} - 8 \, x e^{x}}{e^{\left (\frac {2}{3} \, x^{2} + \frac {2}{3} \, x\right )} - 2} \]

[In]

integrate(((-1-x)*exp(x)*exp(2/3*x^2+2/3*x)^2+(-8*x^2+6*x+10)*exp(x)*exp(2/3*x^2+2/3*x)+(-16*x-16)*exp(x))/(ex
p(2/3*x^2+2/3*x)^2-4*exp(2/3*x^2+2/3*x)+4),x, algorithm="maxima")

[Out]

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

Giac [F(-1)]

Timed out. \[ \int \frac {e^x (-16-16 x)+e^{x+\frac {2}{3} \left (2 x+2 x^2\right )} (-1-x)+e^{x+\frac {1}{3} \left (2 x+2 x^2\right )} \left (10+6 x-8 x^2\right )}{4-4 e^{\frac {1}{3} \left (2 x+2 x^2\right )}+e^{\frac {2}{3} \left (2 x+2 x^2\right )}} \, dx=\text {Timed out} \]

[In]

integrate(((-1-x)*exp(x)*exp(2/3*x^2+2/3*x)^2+(-8*x^2+6*x+10)*exp(x)*exp(2/3*x^2+2/3*x)+(-16*x-16)*exp(x))/(ex
p(2/3*x^2+2/3*x)^2-4*exp(2/3*x^2+2/3*x)+4),x, algorithm="giac")

[Out]

Timed out

Mupad [B] (verification not implemented)

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

[In]

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

[Out]

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