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

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

Optimal result

Integrand size = 102, antiderivative size = 34 \[ \int \frac {e^{e^x+x^2} \left (4+2 x-8 x^2-2 x^3+e^x \left (-4 x-x^2\right )\right )+e^{x^2} \left (-x^2+8 x^3+2 x^4+e^x \left (32-16 x-78 x^2-34 x^3-4 x^4\right )\right )}{16 x^2+8 x^3+x^4} \, dx=\frac {2 e^{x^2} \left (-e^x+\frac {-e^{e^x}+x}{2 (4+x)}\right )}{x} \] Output:

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

Mathematica [A] (verified)

Time = 2.51 (sec) , antiderivative size = 32, normalized size of antiderivative = 0.94 \[ \int \frac {e^{e^x+x^2} \left (4+2 x-8 x^2-2 x^3+e^x \left (-4 x-x^2\right )\right )+e^{x^2} \left (-x^2+8 x^3+2 x^4+e^x \left (32-16 x-78 x^2-34 x^3-4 x^4\right )\right )}{16 x^2+8 x^3+x^4} \, dx=-\frac {e^{x^2} \left (e^{e^x}-x+2 e^x (4+x)\right )}{x (4+x)} \] Input:

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

Output:

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

Rubi [F]

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {e^{x^2+e^x} \left (-2 x^3-8 x^2+e^x \left (-x^2-4 x\right )+2 x+4\right )+e^{x^2} \left (2 x^4+8 x^3-x^2+e^x \left (-4 x^4-34 x^3-78 x^2-16 x+32\right )\right )}{x^4+8 x^3+16 x^2} \, dx\)

\(\Big \downarrow \) 2026

\(\displaystyle \int \frac {e^{x^2+e^x} \left (-2 x^3-8 x^2+e^x \left (-x^2-4 x\right )+2 x+4\right )+e^{x^2} \left (2 x^4+8 x^3-x^2+e^x \left (-4 x^4-34 x^3-78 x^2-16 x+32\right )\right )}{x^2 \left (x^2+8 x+16\right )}dx\)

\(\Big \downarrow \) 2007

\(\displaystyle \int \frac {e^{x^2+e^x} \left (-2 x^3-8 x^2+e^x \left (-x^2-4 x\right )+2 x+4\right )+e^{x^2} \left (2 x^4+8 x^3-x^2+e^x \left (-4 x^4-34 x^3-78 x^2-16 x+32\right )\right )}{x^2 (x+4)^2}dx\)

\(\Big \downarrow \) 7293

\(\displaystyle \int \left (\frac {e^{x^2} \left (4 e^x x^4-2 x^4+2 e^{e^x} x^3+34 e^x x^3-8 x^3+8 e^{e^x} x^2+78 e^x x^2+e^{x+e^x} x^2+x^2-2 e^{e^x} x+16 e^x x+4 e^{x+e^x} x-4 e^{e^x}-32 e^x\right )}{32 x}-\frac {e^{x^2} \left (4 e^x x^4-2 x^4+2 e^{e^x} x^3+34 e^x x^3-8 x^3+8 e^{e^x} x^2+78 e^x x^2+e^{x+e^x} x^2+x^2-2 e^{e^x} x+16 e^x x+4 e^{x+e^x} x-4 e^{e^x}-32 e^x\right )}{32 (x+4)}-\frac {e^{x^2} \left (4 e^x x^4-2 x^4+2 e^{e^x} x^3+34 e^x x^3-8 x^3+8 e^{e^x} x^2+78 e^x x^2+e^{x+e^x} x^2+x^2-2 e^{e^x} x+16 e^x x+4 e^{x+e^x} x-4 e^{e^x}-32 e^x\right )}{16 x^2}-\frac {e^{x^2} \left (4 e^x x^4-2 x^4+2 e^{e^x} x^3+34 e^x x^3-8 x^3+8 e^{e^x} x^2+78 e^x x^2+e^{x+e^x} x^2+x^2-2 e^{e^x} x+16 e^x x+4 e^{x+e^x} x-4 e^{e^x}-32 e^x\right )}{16 (x+4)^2}\right )dx\)

\(\Big \downarrow \) 7239

\(\displaystyle \int \frac {e^{x^2} \left (2 x^4+8 x^3-x^2-2 e^x (x+4)^2 \left (2 x^2+x-1\right )-2 e^{e^x} \left (x^3+4 x^2-x-2\right )-e^{x+e^x} (x+4) x\right )}{x^2 (x+4)^2}dx\)

\(\Big \downarrow \) 7293

\(\displaystyle \int \left (\frac {2 e^{x^2} x^2}{(x+4)^2}+\frac {8 e^{x^2} x}{(x+4)^2}-\frac {e^{x^2}}{(x+4)^2}-\frac {2 e^{x^2+e^x} \left (x^3+4 x^2-x-2\right )}{(x+4)^2 x^2}-\frac {e^{x^2+x} \left (4 x^3+18 x^2+e^{e^x} x+6 x-8\right )}{(x+4) x^2}\right )dx\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {1}{4} \int \frac {e^{x^2+e^x}}{x^2}dx-\frac {1}{4} \int \frac {e^{x^2+x+e^x}}{x}dx-\frac {1}{4} \int \frac {e^{x^2+e^x}}{(x+4)^2}dx-2 \int \frac {e^{x^2+e^x}}{x+4}dx+\frac {1}{4} \int \frac {e^{x^2+x+e^x}}{x+4}dx-\frac {2 e^{x^2+x} \left (2 x^2+x\right )}{x^2 (2 x+1)}+\frac {e^{x^2}}{x+4}\)

Input:

Int[(E^(E^x + x^2)*(4 + 2*x - 8*x^2 - 2*x^3 + E^x*(-4*x - x^2)) + E^x^2*(- 
x^2 + 8*x^3 + 2*x^4 + E^x*(32 - 16*x - 78*x^2 - 34*x^3 - 4*x^4)))/(16*x^2 
+ 8*x^3 + x^4),x]
 

Output:

$Aborted
 
Maple [A] (verified)

Time = 0.40 (sec) , antiderivative size = 43, normalized size of antiderivative = 1.26

method result size
parallelrisch \(\frac {-2 \,{\mathrm e}^{x^{2}} {\mathrm e}^{x} x +{\mathrm e}^{x^{2}} x -8 \,{\mathrm e}^{x} {\mathrm e}^{x^{2}}-{\mathrm e}^{x^{2}} {\mathrm e}^{{\mathrm e}^{x}}}{\left (4+x \right ) x}\) \(43\)
risch \(-\frac {\left (2 \,{\mathrm e}^{x} x -x +8 \,{\mathrm e}^{x}\right ) {\mathrm e}^{x^{2}}}{\left (4+x \right ) x}-\frac {{\mathrm e}^{x^{2}+{\mathrm e}^{x}}}{\left (4+x \right ) x}\) \(46\)

Input:

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

Output:

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

Fricas [A] (verification not implemented)

Time = 0.10 (sec) , antiderivative size = 35, normalized size of antiderivative = 1.03 \[ \int \frac {e^{e^x+x^2} \left (4+2 x-8 x^2-2 x^3+e^x \left (-4 x-x^2\right )\right )+e^{x^2} \left (-x^2+8 x^3+2 x^4+e^x \left (32-16 x-78 x^2-34 x^3-4 x^4\right )\right )}{16 x^2+8 x^3+x^4} \, dx=-\frac {{\left (2 \, {\left (x + 4\right )} e^{x} - x\right )} e^{\left (x^{2}\right )} + e^{\left (x^{2} + e^{x}\right )}}{x^{2} + 4 \, x} \] Input:

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

Output:

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

Sympy [A] (verification not implemented)

Time = 0.18 (sec) , antiderivative size = 41, normalized size of antiderivative = 1.21 \[ \int \frac {e^{e^x+x^2} \left (4+2 x-8 x^2-2 x^3+e^x \left (-4 x-x^2\right )\right )+e^{x^2} \left (-x^2+8 x^3+2 x^4+e^x \left (32-16 x-78 x^2-34 x^3-4 x^4\right )\right )}{16 x^2+8 x^3+x^4} \, dx=\frac {\left (- 2 x e^{x} + x - 8 e^{x}\right ) e^{x^{2}}}{x^{2} + 4 x} - \frac {e^{x^{2}} e^{e^{x}}}{x^{2} + 4 x} \] Input:

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

Output:

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

Maxima [A] (verification not implemented)

Time = 0.08 (sec) , antiderivative size = 35, normalized size of antiderivative = 1.03 \[ \int \frac {e^{e^x+x^2} \left (4+2 x-8 x^2-2 x^3+e^x \left (-4 x-x^2\right )\right )+e^{x^2} \left (-x^2+8 x^3+2 x^4+e^x \left (32-16 x-78 x^2-34 x^3-4 x^4\right )\right )}{16 x^2+8 x^3+x^4} \, dx=-\frac {{\left (2 \, {\left (x + 4\right )} e^{x} - x\right )} e^{\left (x^{2}\right )} + e^{\left (x^{2} + e^{x}\right )}}{x^{2} + 4 \, x} \] Input:

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

Output:

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

Giac [F]

\[ \int \frac {e^{e^x+x^2} \left (4+2 x-8 x^2-2 x^3+e^x \left (-4 x-x^2\right )\right )+e^{x^2} \left (-x^2+8 x^3+2 x^4+e^x \left (32-16 x-78 x^2-34 x^3-4 x^4\right )\right )}{16 x^2+8 x^3+x^4} \, dx=\int { -\frac {{\left (2 \, x^{3} + 8 \, x^{2} + {\left (x^{2} + 4 \, x\right )} e^{x} - 2 \, x - 4\right )} e^{\left (x^{2} + e^{x}\right )} - {\left (2 \, x^{4} + 8 \, x^{3} - x^{2} - 2 \, {\left (2 \, x^{4} + 17 \, x^{3} + 39 \, x^{2} + 8 \, x - 16\right )} e^{x}\right )} e^{\left (x^{2}\right )}}{x^{4} + 8 \, x^{3} + 16 \, x^{2}} \,d x } \] Input:

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

Output:

integrate(-((2*x^3 + 8*x^2 + (x^2 + 4*x)*e^x - 2*x - 4)*e^(x^2 + e^x) - (2 
*x^4 + 8*x^3 - x^2 - 2*(2*x^4 + 17*x^3 + 39*x^2 + 8*x - 16)*e^x)*e^(x^2))/ 
(x^4 + 8*x^3 + 16*x^2), x)
 

Mupad [B] (verification not implemented)

Time = 0.42 (sec) , antiderivative size = 47, normalized size of antiderivative = 1.38 \[ \int \frac {e^{e^x+x^2} \left (4+2 x-8 x^2-2 x^3+e^x \left (-4 x-x^2\right )\right )+e^{x^2} \left (-x^2+8 x^3+2 x^4+e^x \left (32-16 x-78 x^2-34 x^3-4 x^4\right )\right )}{16 x^2+8 x^3+x^4} \, dx=-\frac {{\mathrm {e}}^{{\mathrm {e}}^x+x^2}}{x^2+4\,x}-\frac {{\mathrm {e}}^{x^2}\,\left (8\,{\mathrm {e}}^x-x+2\,x\,{\mathrm {e}}^x\right )}{x^2+4\,x} \] Input:

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

Output:

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

Reduce [B] (verification not implemented)

Time = 0.21 (sec) , antiderivative size = 34, normalized size of antiderivative = 1.00 \[ \int \frac {e^{e^x+x^2} \left (4+2 x-8 x^2-2 x^3+e^x \left (-4 x-x^2\right )\right )+e^{x^2} \left (-x^2+8 x^3+2 x^4+e^x \left (32-16 x-78 x^2-34 x^3-4 x^4\right )\right )}{16 x^2+8 x^3+x^4} \, dx=\frac {e^{x^{2}} \left (-e^{e^{x}}-2 e^{x} x -8 e^{x}+x \right )}{x \left (x +4\right )} \] Input:

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

Output:

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