\(\int \frac {e^{-2+x} (e^{\frac {e^{-2+x} x}{(4+x) (i \pi +\log (9-e))^2}} (-4-4 x-x^2)+e^{2-x} (32+16 x+2 x^2) (i \pi +\log (9-e))^2)}{(16+8 x+x^2) (i \pi +\log (9-e))^2} \, dx\) [785]

Optimal result
Mathematica [A] (verified)
Rubi [F]
Maple [A] (verified)
Fricas [A] (verification not implemented)
Sympy [B] (verification not implemented)
Maxima [B] (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^{-2+x} \left (e^{\frac {e^{-2+x} x}{(4+x) (i \pi +\log (9-e))^2}} \left (-4-4 x-x^2\right )+e^{2-x} \left (32+16 x+2 x^2\right ) (i \pi +\log (9-e))^2\right )}{\left (16+8 x+x^2\right ) (i \pi +\log (9-e))^2} \, dx=-e^{\frac {e^{-2+x} x}{(4+x) (i \pi +\log (9-e))^2}}+2 x \] Output:

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

Mathematica [A] (verified)

Time = 5.21 (sec) , antiderivative size = 35, normalized size of antiderivative = 1.03 \[ \int \frac {e^{-2+x} \left (e^{\frac {e^{-2+x} x}{(4+x) (i \pi +\log (9-e))^2}} \left (-4-4 x-x^2\right )+e^{2-x} \left (32+16 x+2 x^2\right ) (i \pi +\log (9-e))^2\right )}{\left (16+8 x+x^2\right ) (i \pi +\log (9-e))^2} \, dx=-e^{-\frac {e^{-2+x} x}{(4+x) (\pi -i \log (9-e))^2}}+2 x \] Input:

Integrate[(E^(-2 + x)*(E^((E^(-2 + x)*x)/((4 + x)*(I*Pi + Log[9 - E])^2))* 
(-4 - 4*x - x^2) + E^(2 - x)*(32 + 16*x + 2*x^2)*(I*Pi + Log[9 - E])^2))/( 
(16 + 8*x + x^2)*(I*Pi + Log[9 - E])^2),x]
 

Output:

-E^(-((E^(-2 + x)*x)/((4 + x)*(Pi - I*Log[9 - E])^2))) + 2*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} \left (\left (-x^2-4 x-4\right ) e^{\frac {e^{x-2} x}{(x+4) (\log (9-e)+i \pi )^2}}+e^{2-x} \left (2 x^2+16 x+32\right ) (\log (9-e)+i \pi )^2\right )}{\left (x^2+8 x+16\right ) (\log (9-e)+i \pi )^2} \, dx\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {\int -\frac {e^{x-2} \left (e^{\frac {e^{x-2} x}{(x+4) (i \pi +\log (9-e))^2}} \left (x^2+4 x+4\right )-2 e^{2-x} \left (x^2+8 x+16\right ) (i \pi +\log (9-e))^2\right )}{x^2+8 x+16}dx}{(\log (9-e)+i \pi )^2}\)

\(\Big \downarrow \) 25

\(\displaystyle -\frac {\int \frac {e^{x-2} \left (e^{\frac {e^{x-2} x}{(x+4) (i \pi +\log (9-e))^2}} \left (x^2+4 x+4\right )-2 e^{2-x} \left (x^2+8 x+16\right ) (i \pi +\log (9-e))^2\right )}{x^2+8 x+16}dx}{(\log (9-e)+i \pi )^2}\)

\(\Big \downarrow \) 2007

\(\displaystyle -\frac {\int \frac {e^{x-2} \left (e^{\frac {e^{x-2} x}{(x+4) (i \pi +\log (9-e))^2}} \left (x^2+4 x+4\right )-2 e^{2-x} \left (x^2+8 x+16\right ) (i \pi +\log (9-e))^2\right )}{(x+4)^2}dx}{(\log (9-e)+i \pi )^2}\)

\(\Big \downarrow \) 7293

\(\displaystyle -\frac {\int \left (\frac {\exp \left (\frac {e^{x-2} x}{(x+4) (i \pi +\log (9-e))^2}+x-2\right ) (x+2)^2}{(x+4)^2}+2 (\pi -i \log (9-e))^2\right )dx}{(\log (9-e)+i \pi )^2}\)

\(\Big \downarrow \) 2009

\(\displaystyle -\frac {\int \exp \left (\frac {e^{x-2} x}{(x+4) (i \pi +\log (9-e))^2}+x-2\right )dx+4 \int \frac {\exp \left (\frac {e^{x-2} x}{(x+4) (i \pi +\log (9-e))^2}+x-2\right )}{(x+4)^2}dx-4 \int \frac {\exp \left (\frac {e^{x-2} x}{(x+4) (i \pi +\log (9-e))^2}+x-2\right )}{x+4}dx+2 x (\pi -i \log (9-e))^2}{(\log (9-e)+i \pi )^2}\)

Input:

Int[(E^(-2 + x)*(E^((E^(-2 + x)*x)/((4 + x)*(I*Pi + Log[9 - E])^2))*(-4 - 
4*x - x^2) + E^(2 - x)*(32 + 16*x + 2*x^2)*(I*Pi + Log[9 - E])^2))/((16 + 
8*x + x^2)*(I*Pi + Log[9 - E])^2),x]
 

Output:

$Aborted
 
Maple [A] (verified)

Time = 0.72 (sec) , antiderivative size = 26, normalized size of antiderivative = 0.76

method result size
risch \(2 x -{\mathrm e}^{\frac {x \,{\mathrm e}^{-2+x}}{\left (4+x \right ) \ln \left ({\mathrm e}-9\right )^{2}}}\) \(26\)
parallelrisch \(\frac {-2 \ln \left ({\mathrm e}-9\right )^{2} \ln \left ({\mathrm e}^{2-x}\right )-{\mathrm e}^{\frac {x \,{\mathrm e}^{-2+x}}{\left (4+x \right ) \ln \left ({\mathrm e}-9\right )^{2}}} \ln \left ({\mathrm e}-9\right )^{2}}{\ln \left ({\mathrm e}-9\right )^{2}}\) \(58\)
parts \(2 x +\frac {\left (-4 \,{\mathrm e}^{2-x} \ln \left ({\mathrm e}-9\right ) {\mathrm e}^{\frac {x \,{\mathrm e}^{-2+x}}{\left (4+x \right ) \ln \left ({\mathrm e}-9\right )^{2}}}-\ln \left ({\mathrm e}-9\right ) x \,{\mathrm e}^{2-x} {\mathrm e}^{\frac {x \,{\mathrm e}^{-2+x}}{\left (4+x \right ) \ln \left ({\mathrm e}-9\right )^{2}}}\right ) {\mathrm e}^{-2+x}}{\left (4+x \right ) \ln \left ({\mathrm e}-9\right )}\) \(100\)
norman \(\frac {\left (-32 \,{\mathrm e}^{2-x} \ln \left ({\mathrm e}-9\right )-4 \,{\mathrm e}^{2-x} \ln \left ({\mathrm e}-9\right ) {\mathrm e}^{\frac {x \,{\mathrm e}^{-2+x}}{\left (4+x \right ) \ln \left ({\mathrm e}-9\right )^{2}}}+2 \ln \left ({\mathrm e}-9\right ) x^{2} {\mathrm e}^{2-x}-\ln \left ({\mathrm e}-9\right ) x \,{\mathrm e}^{2-x} {\mathrm e}^{\frac {x \,{\mathrm e}^{-2+x}}{\left (4+x \right ) \ln \left ({\mathrm e}-9\right )^{2}}}\right ) {\mathrm e}^{-2+x}}{\left (4+x \right ) \ln \left ({\mathrm e}-9\right )}\) \(125\)

Input:

int(((-x^2-4*x-4)*exp(x/(4+x)/exp(2-x)/ln(exp(1)-9)^2)+(2*x^2+16*x+32)*exp 
(2-x)*ln(exp(1)-9)^2)/(x^2+8*x+16)/exp(2-x)/ln(exp(1)-9)^2,x,method=_RETUR 
NVERBOSE)
 

Output:

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

Fricas [A] (verification not implemented)

Time = 0.09 (sec) , antiderivative size = 25, normalized size of antiderivative = 0.74 \[ \int \frac {e^{-2+x} \left (e^{\frac {e^{-2+x} x}{(4+x) (i \pi +\log (9-e))^2}} \left (-4-4 x-x^2\right )+e^{2-x} \left (32+16 x+2 x^2\right ) (i \pi +\log (9-e))^2\right )}{\left (16+8 x+x^2\right ) (i \pi +\log (9-e))^2} \, dx=2 \, x - e^{\left (\frac {x e^{\left (x - 2\right )}}{{\left (x + 4\right )} \log \left (e - 9\right )^{2}}\right )} \] Input:

integrate(((-x^2-4*x-4)*exp(x/(4+x)/exp(2-x)/log(exp(1)-9)^2)+(2*x^2+16*x+ 
32)*exp(2-x)*log(exp(1)-9)^2)/(x^2+8*x+16)/exp(2-x)/log(exp(1)-9)^2,x, alg 
orithm="fricas")
 

Output:

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

Sympy [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 85 vs. \(2 (26) = 52\).

Time = 1.00 (sec) , antiderivative size = 85, normalized size of antiderivative = 2.50 \[ \int \frac {e^{-2+x} \left (e^{\frac {e^{-2+x} x}{(4+x) (i \pi +\log (9-e))^2}} \left (-4-4 x-x^2\right )+e^{2-x} \left (32+16 x+2 x^2\right ) (i \pi +\log (9-e))^2\right )}{\left (16+8 x+x^2\right ) (i \pi +\log (9-e))^2} \, dx=2 x - e^{\frac {x e^{x}}{- \pi ^{2} x e^{2} + x e^{2} \log {\left (9 - e \right )}^{2} + 2 i \pi x e^{2} \log {\left (9 - e \right )} - 4 \pi ^{2} e^{2} + 4 e^{2} \log {\left (9 - e \right )}^{2} + 8 i \pi e^{2} \log {\left (9 - e \right )}}} \] Input:

integrate(((-x**2-4*x-4)*exp(x/(4+x)/exp(2-x)/ln(exp(1)-9)**2)+(2*x**2+16* 
x+32)*exp(2-x)*ln(exp(1)-9)**2)/(x**2+8*x+16)/exp(2-x)/ln(exp(1)-9)**2,x)
 

Output:

2*x - exp(x*exp(x)/(-pi**2*x*exp(2) + x*exp(2)*log(9 - E)**2 + 2*I*pi*x*ex 
p(2)*log(9 - E) - 4*pi**2*exp(2) + 4*exp(2)*log(9 - E)**2 + 8*I*pi*exp(2)* 
log(9 - E)))
 

Maxima [B] (verification not implemented)

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

Time = 0.25 (sec) , antiderivative size = 120, normalized size of antiderivative = 3.53 \[ \int \frac {e^{-2+x} \left (e^{\frac {e^{-2+x} x}{(4+x) (i \pi +\log (9-e))^2}} \left (-4-4 x-x^2\right )+e^{2-x} \left (32+16 x+2 x^2\right ) (i \pi +\log (9-e))^2\right )}{\left (16+8 x+x^2\right ) (i \pi +\log (9-e))^2} \, dx=\frac {2 \, {\left (x - \frac {16}{x + 4} - 8 \, \log \left (x + 4\right )\right )} \log \left (e - 9\right )^{2} + 16 \, {\left (\frac {4}{x + 4} + \log \left (x + 4\right )\right )} \log \left (e - 9\right )^{2} - e^{\left (-\frac {4 \, e^{x}}{x e^{2} \log \left (e - 9\right )^{2} + 4 \, e^{2} \log \left (e - 9\right )^{2}} + \frac {e^{\left (x - 2\right )}}{\log \left (e - 9\right )^{2}}\right )} \log \left (e - 9\right )^{2} - \frac {32 \, \log \left (e - 9\right )^{2}}{x + 4}}{\log \left (e - 9\right )^{2}} \] Input:

integrate(((-x^2-4*x-4)*exp(x/(4+x)/exp(2-x)/log(exp(1)-9)^2)+(2*x^2+16*x+ 
32)*exp(2-x)*log(exp(1)-9)^2)/(x^2+8*x+16)/exp(2-x)/log(exp(1)-9)^2,x, alg 
orithm="maxima")
 

Output:

(2*(x - 16/(x + 4) - 8*log(x + 4))*log(e - 9)^2 + 16*(4/(x + 4) + log(x + 
4))*log(e - 9)^2 - e^(-4*e^x/(x*e^2*log(e - 9)^2 + 4*e^2*log(e - 9)^2) + e 
^(x - 2)/log(e - 9)^2)*log(e - 9)^2 - 32*log(e - 9)^2/(x + 4))/log(e - 9)^ 
2
 

Giac [F]

\[ \int \frac {e^{-2+x} \left (e^{\frac {e^{-2+x} x}{(4+x) (i \pi +\log (9-e))^2}} \left (-4-4 x-x^2\right )+e^{2-x} \left (32+16 x+2 x^2\right ) (i \pi +\log (9-e))^2\right )}{\left (16+8 x+x^2\right ) (i \pi +\log (9-e))^2} \, dx=\int { \frac {{\left (2 \, {\left (x^{2} + 8 \, x + 16\right )} e^{\left (-x + 2\right )} \log \left (e - 9\right )^{2} - {\left (x^{2} + 4 \, x + 4\right )} e^{\left (\frac {x e^{\left (x - 2\right )}}{{\left (x + 4\right )} \log \left (e - 9\right )^{2}}\right )}\right )} e^{\left (x - 2\right )}}{{\left (x^{2} + 8 \, x + 16\right )} \log \left (e - 9\right )^{2}} \,d x } \] Input:

integrate(((-x^2-4*x-4)*exp(x/(4+x)/exp(2-x)/log(exp(1)-9)^2)+(2*x^2+16*x+ 
32)*exp(2-x)*log(exp(1)-9)^2)/(x^2+8*x+16)/exp(2-x)/log(exp(1)-9)^2,x, alg 
orithm="giac")
 

Output:

undef
 

Mupad [B] (verification not implemented)

Time = 7.44 (sec) , antiderivative size = 34, normalized size of antiderivative = 1.00 \[ \int \frac {e^{-2+x} \left (e^{\frac {e^{-2+x} x}{(4+x) (i \pi +\log (9-e))^2}} \left (-4-4 x-x^2\right )+e^{2-x} \left (32+16 x+2 x^2\right ) (i \pi +\log (9-e))^2\right )}{\left (16+8 x+x^2\right ) (i \pi +\log (9-e))^2} \, dx=2\,x-{\mathrm {e}}^{\frac {x\,{\mathrm {e}}^{-2}\,{\mathrm {e}}^x}{x\,{\ln \left (\mathrm {e}-9\right )}^2+4\,{\ln \left (\mathrm {e}-9\right )}^2}} \] Input:

int(-(exp(x - 2)*(exp((x*exp(x - 2))/(log(exp(1) - 9)^2*(x + 4)))*(4*x + x 
^2 + 4) - log(exp(1) - 9)^2*exp(2 - x)*(16*x + 2*x^2 + 32)))/(log(exp(1) - 
 9)^2*(8*x + x^2 + 16)),x)
 

Output:

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

Reduce [B] (verification not implemented)

Time = 0.17 (sec) , antiderivative size = 38, normalized size of antiderivative = 1.12 \[ \int \frac {e^{-2+x} \left (e^{\frac {e^{-2+x} x}{(4+x) (i \pi +\log (9-e))^2}} \left (-4-4 x-x^2\right )+e^{2-x} \left (32+16 x+2 x^2\right ) (i \pi +\log (9-e))^2\right )}{\left (16+8 x+x^2\right ) (i \pi +\log (9-e))^2} \, dx=-e^{\frac {e^{x} x}{\mathrm {log}\left (e -9\right )^{2} e^{2} x +4 \mathrm {log}\left (e -9\right )^{2} e^{2}}}+2 x \] Input:

int(((-x^2-4*x-4)*exp(x/(4+x)/exp(2-x)/log(exp(1)-9)^2)+(2*x^2+16*x+32)*ex 
p(2-x)*log(exp(1)-9)^2)/(x^2+8*x+16)/exp(2-x)/log(exp(1)-9)^2,x)
 

Output:

 - e**((e**x*x)/(log(e - 9)**2*e**2*x + 4*log(e - 9)**2*e**2)) + 2*x