\(\int \frac {-32+32 x-16 x^2-8 e^{3 x} x^2-e^{4 x} x^2+e^x (-16+16 x-32 x^2)+e^{2 x} (-4-24 x^2)}{16-32 x+16 x^2+8 e^{3 x} x^2+e^{4 x} x^2+e^{2 x} (-8 x+24 x^2)+e^x (-32 x+32 x^2)} \, dx\) [1146]

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

Optimal result

Integrand size = 117, antiderivative size = 25 \[ \int \frac {-32+32 x-16 x^2-8 e^{3 x} x^2-e^{4 x} x^2+e^x \left (-16+16 x-32 x^2\right )+e^{2 x} \left (-4-24 x^2\right )}{16-32 x+16 x^2+8 e^{3 x} x^2+e^{4 x} x^2+e^{2 x} \left (-8 x+24 x^2\right )+e^x \left (-32 x+32 x^2\right )} \, dx=2-x+\frac {x}{-x+\left (x+\frac {e^x x}{2}\right )^2} \]

[Out]

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

Rubi [F]

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

[In]

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

[Out]

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

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

Mathematica [A] (verified)

Time = 2.89 (sec) , antiderivative size = 31, normalized size of antiderivative = 1.24 \[ \int \frac {-32+32 x-16 x^2-8 e^{3 x} x^2-e^{4 x} x^2+e^x \left (-16+16 x-32 x^2\right )+e^{2 x} \left (-4-24 x^2\right )}{16-32 x+16 x^2+8 e^{3 x} x^2+e^{4 x} x^2+e^{2 x} \left (-8 x+24 x^2\right )+e^x \left (-32 x+32 x^2\right )} \, dx=-\frac {-4-4 x+\left (2+e^x\right )^2 x^2}{-4+\left (2+e^x\right )^2 x} \]

[In]

Integrate[(-32 + 32*x - 16*x^2 - 8*E^(3*x)*x^2 - E^(4*x)*x^2 + E^x*(-16 + 16*x - 32*x^2) + E^(2*x)*(-4 - 24*x^
2))/(16 - 32*x + 16*x^2 + 8*E^(3*x)*x^2 + E^(4*x)*x^2 + E^(2*x)*(-8*x + 24*x^2) + E^x*(-32*x + 32*x^2)),x]

[Out]

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

Maple [A] (verified)

Time = 0.08 (sec) , antiderivative size = 25, normalized size of antiderivative = 1.00

method result size
risch \(-x +\frac {4}{x \,{\mathrm e}^{2 x}+4 \,{\mathrm e}^{x} x +4 x -4}\) \(25\)
norman \(\frac {4 x -4 x^{2}-4 \,{\mathrm e}^{x} x^{2}-{\mathrm e}^{2 x} x^{2}+4}{x \,{\mathrm e}^{2 x}+4 \,{\mathrm e}^{x} x +4 x -4}\) \(46\)
parallelrisch \(-\frac {4 \,{\mathrm e}^{x} x^{2}+{\mathrm e}^{2 x} x^{2}+4 x^{2}-4 x -4}{x \,{\mathrm e}^{2 x}+4 \,{\mathrm e}^{x} x +4 x -4}\) \(46\)

[In]

int((-x^2*exp(x)^4-8*x^2*exp(x)^3+(-24*x^2-4)*exp(x)^2+(-32*x^2+16*x-16)*exp(x)-16*x^2+32*x-32)/(x^2*exp(x)^4+
8*x^2*exp(x)^3+(24*x^2-8*x)*exp(x)^2+(32*x^2-32*x)*exp(x)+16*x^2-32*x+16),x,method=_RETURNVERBOSE)

[Out]

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

Fricas [A] (verification not implemented)

none

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

[In]

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

[Out]

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

Sympy [A] (verification not implemented)

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

[In]

integrate((-x**2*exp(x)**4-8*x**2*exp(x)**3+(-24*x**2-4)*exp(x)**2+(-32*x**2+16*x-16)*exp(x)-16*x**2+32*x-32)/
(x**2*exp(x)**4+8*x**2*exp(x)**3+(24*x**2-8*x)*exp(x)**2+(32*x**2-32*x)*exp(x)+16*x**2-32*x+16),x)

[Out]

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

Maxima [A] (verification not implemented)

none

Time = 0.22 (sec) , antiderivative size = 45, normalized size of antiderivative = 1.80 \[ \int \frac {-32+32 x-16 x^2-8 e^{3 x} x^2-e^{4 x} x^2+e^x \left (-16+16 x-32 x^2\right )+e^{2 x} \left (-4-24 x^2\right )}{16-32 x+16 x^2+8 e^{3 x} x^2+e^{4 x} x^2+e^{2 x} \left (-8 x+24 x^2\right )+e^x \left (-32 x+32 x^2\right )} \, dx=-\frac {x^{2} e^{\left (2 \, x\right )} + 4 \, x^{2} e^{x} + 4 \, x^{2} - 4 \, x - 4}{x e^{\left (2 \, x\right )} + 4 \, x e^{x} + 4 \, x - 4} \]

[In]

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

[Out]

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

Giac [A] (verification not implemented)

none

Time = 0.33 (sec) , antiderivative size = 45, normalized size of antiderivative = 1.80 \[ \int \frac {-32+32 x-16 x^2-8 e^{3 x} x^2-e^{4 x} x^2+e^x \left (-16+16 x-32 x^2\right )+e^{2 x} \left (-4-24 x^2\right )}{16-32 x+16 x^2+8 e^{3 x} x^2+e^{4 x} x^2+e^{2 x} \left (-8 x+24 x^2\right )+e^x \left (-32 x+32 x^2\right )} \, dx=-\frac {x^{2} e^{\left (2 \, x\right )} + 4 \, x^{2} e^{x} + 4 \, x^{2} - 4 \, x - 8}{x e^{\left (2 \, x\right )} + 4 \, x e^{x} + 4 \, x - 4} \]

[In]

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

[Out]

-(x^2*e^(2*x) + 4*x^2*e^x + 4*x^2 - 4*x - 8)/(x*e^(2*x) + 4*x*e^x + 4*x - 4)

Mupad [F(-1)]

Timed out. \[ \int \frac {-32+32 x-16 x^2-8 e^{3 x} x^2-e^{4 x} x^2+e^x \left (-16+16 x-32 x^2\right )+e^{2 x} \left (-4-24 x^2\right )}{16-32 x+16 x^2+8 e^{3 x} x^2+e^{4 x} x^2+e^{2 x} \left (-8 x+24 x^2\right )+e^x \left (-32 x+32 x^2\right )} \, dx=\int -\frac {{\mathrm {e}}^{2\,x}\,\left (24\,x^2+4\right )-32\,x+8\,x^2\,{\mathrm {e}}^{3\,x}+x^2\,{\mathrm {e}}^{4\,x}+{\mathrm {e}}^x\,\left (32\,x^2-16\,x+16\right )+16\,x^2+32}{8\,x^2\,{\mathrm {e}}^{3\,x}-{\mathrm {e}}^{2\,x}\,\left (8\,x-24\,x^2\right )-32\,x+x^2\,{\mathrm {e}}^{4\,x}-{\mathrm {e}}^x\,\left (32\,x-32\,x^2\right )+16\,x^2+16} \,d x \]

[In]

int(-(exp(2*x)*(24*x^2 + 4) - 32*x + 8*x^2*exp(3*x) + x^2*exp(4*x) + exp(x)*(32*x^2 - 16*x + 16) + 16*x^2 + 32
)/(8*x^2*exp(3*x) - exp(2*x)*(8*x - 24*x^2) - 32*x + x^2*exp(4*x) - exp(x)*(32*x - 32*x^2) + 16*x^2 + 16),x)

[Out]

int(-(exp(2*x)*(24*x^2 + 4) - 32*x + 8*x^2*exp(3*x) + x^2*exp(4*x) + exp(x)*(32*x^2 - 16*x + 16) + 16*x^2 + 32
)/(8*x^2*exp(3*x) - exp(2*x)*(8*x - 24*x^2) - 32*x + x^2*exp(4*x) - exp(x)*(32*x - 32*x^2) + 16*x^2 + 16), x)