\(\int \frac {e^{-2-\frac {1+4 x}{-1+x}} (-x^2-3 x^3-7 x^4+2 x^5-11 x^6+5 x^7-5 x^8+e^2 (16-112 x+16 x^2)+e^{2+\frac {1+4 x}{-1+x}} (x-2 x^2+x^3)+e (40 x^2+16 x^3+8 x^4+16 x^5))}{x^2-2 x^3+x^4} \, dx\) [883]

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

Optimal result

Integrand size = 130, antiderivative size = 35 \[ \int \frac {e^{-2-\frac {1+4 x}{-1+x}} \left (-x^2-3 x^3-7 x^4+2 x^5-11 x^6+5 x^7-5 x^8+e^2 \left (16-112 x+16 x^2\right )+e^{2+\frac {1+4 x}{-1+x}} \left (x-2 x^2+x^3\right )+e \left (40 x^2+16 x^3+8 x^4+16 x^5\right )\right )}{x^2-2 x^3+x^4} \, dx=-\frac {e^{-4+\frac {5}{1-x}} \left (-4+\frac {x \left (1+x^2\right )}{e}\right )^2}{x}+\log (x) \] Output:

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

Mathematica [A] (verified)

Time = 0.07 (sec) , antiderivative size = 43, normalized size of antiderivative = 1.23 \[ \int \frac {e^{-2-\frac {1+4 x}{-1+x}} \left (-x^2-3 x^3-7 x^4+2 x^5-11 x^6+5 x^7-5 x^8+e^2 \left (16-112 x+16 x^2\right )+e^{2+\frac {1+4 x}{-1+x}} \left (x-2 x^2+x^3\right )+e \left (40 x^2+16 x^3+8 x^4+16 x^5\right )\right )}{x^2-2 x^3+x^4} \, dx=\frac {e^{-6-\frac {5}{-1+x}} \left (-\left (-4 e+x+x^3\right )^2+e^{6+\frac {5}{-1+x}} x \log (x)\right )}{x} \] Input:

Integrate[(E^(-2 - (1 + 4*x)/(-1 + x))*(-x^2 - 3*x^3 - 7*x^4 + 2*x^5 - 11* 
x^6 + 5*x^7 - 5*x^8 + E^2*(16 - 112*x + 16*x^2) + E^(2 + (1 + 4*x)/(-1 + x 
))*(x - 2*x^2 + x^3) + E*(40*x^2 + 16*x^3 + 8*x^4 + 16*x^5)))/(x^2 - 2*x^3 
 + x^4),x]
 

Output:

(E^(-6 - 5/(-1 + x))*(-(-4*E + x + x^3)^2 + E^(6 + 5/(-1 + x))*x*Log[x]))/ 
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^{-\frac {4 x+1}{x-1}-2} \left (-5 x^8+5 x^7-11 x^6+2 x^5-7 x^4-3 x^3-x^2+e^2 \left (16 x^2-112 x+16\right )+e^{\frac {4 x+1}{x-1}+2} \left (x^3-2 x^2+x\right )+e \left (16 x^5+8 x^4+16 x^3+40 x^2\right )\right )}{x^4-2 x^3+x^2} \, dx\)

\(\Big \downarrow \) 2026

\(\displaystyle \int \frac {e^{-\frac {4 x+1}{x-1}-2} \left (-5 x^8+5 x^7-11 x^6+2 x^5-7 x^4-3 x^3-x^2+e^2 \left (16 x^2-112 x+16\right )+e^{\frac {4 x+1}{x-1}+2} \left (x^3-2 x^2+x\right )+e \left (16 x^5+8 x^4+16 x^3+40 x^2\right )\right )}{x^2 \left (x^2-2 x+1\right )}dx\)

\(\Big \downarrow \) 7277

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

\(\Big \downarrow \) 27

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

\(\Big \downarrow \) 7292

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

\(\Big \downarrow \) 7293

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

\(\Big \downarrow \) 2009

\(\displaystyle -5 \int e^{\frac {1-6 x}{x-1}} x^4dx-5 \int e^{\frac {1-6 x}{x-1}} x^3dx-16 \int e^{\frac {1-6 x}{x-1}} x^2dx-41 \int e^{\frac {1-6 x}{x-1}}dx+40 \int e^{-\frac {5 x}{x-1}}dx-25 \int e^{\frac {1-6 x}{x-1}} xdx+16 \int e^{-\frac {5 x}{x-1}} xdx-\frac {80 \operatorname {ExpIntegralEi}\left (\frac {5}{1-x}\right )}{e^5}+\frac {60 \operatorname {ExpIntegralEi}\left (\frac {5}{1-x}\right )}{e^6}-4 e^{\frac {5}{1-x}-6}+16 e^{\frac {5}{1-x}-5}-\frac {16 e^{\frac {4 x+1}{1-x}}}{x}+\log (x)\)

Input:

Int[(E^(-2 - (1 + 4*x)/(-1 + x))*(-x^2 - 3*x^3 - 7*x^4 + 2*x^5 - 11*x^6 + 
5*x^7 - 5*x^8 + E^2*(16 - 112*x + 16*x^2) + E^(2 + (1 + 4*x)/(-1 + x))*(x 
- 2*x^2 + x^3) + E*(40*x^2 + 16*x^3 + 8*x^4 + 16*x^5)))/(x^2 - 2*x^3 + x^4 
),x]
 

Output:

$Aborted
 
Maple [A] (verified)

Time = 1.81 (sec) , antiderivative size = 50, normalized size of antiderivative = 1.43

method result size
risch \(\ln \left (x \right )-\frac {\left (x^{6}-8 x^{3} {\mathrm e}+2 x^{4}+16 \,{\mathrm e}^{2}-8 x \,{\mathrm e}+x^{2}\right ) {\mathrm e}^{-\frac {-1+6 x}{-1+x}}}{x}\) \(50\)
norman \(\frac {\left (\left (-16 \,{\mathrm e}-8\right ) x +{\mathrm e}^{-1} x^{6}+\left (1+8 \,{\mathrm e}\right ) {\mathrm e}^{-1} x^{2}-2 \,{\mathrm e}^{-1} x^{5}-{\mathrm e}^{-1} x^{7}+2 \left (1+4 \,{\mathrm e}\right ) {\mathrm e}^{-1} x^{4}-\left (1+8 \,{\mathrm e}\right ) {\mathrm e}^{-1} x^{3}+16 \,{\mathrm e}\right ) {\mathrm e}^{-1} {\mathrm e}^{-\frac {1+4 x}{-1+x}}}{x \left (-1+x \right )}+\ln \left (x \right )\) \(114\)
parallelrisch \(\frac {{\mathrm e}^{-2} \left (-x^{7}+{\mathrm e}^{2} \ln \left (x \right ) x^{2} {\mathrm e}^{\frac {1+4 x}{-1+x}}+x^{6}-{\mathrm e}^{2} \ln \left (x \right ) {\mathrm e}^{\frac {1+4 x}{-1+x}} x +8 x^{4} {\mathrm e}-2 x^{5}-8 x^{3} {\mathrm e}+2 x^{4}-16 \,{\mathrm e}^{2} x +8 x^{2} {\mathrm e}-x^{3}+16 \,{\mathrm e}^{2}-8 x \,{\mathrm e}+x^{2}\right ) {\mathrm e}^{-\frac {1+4 x}{-1+x}}}{x \left (-1+x \right )}\) \(137\)
parts \(\text {Expression too large to display}\) \(847\)
default \(\text {Expression too large to display}\) \(907\)
derivativedivides \(\text {Expression too large to display}\) \(908\)

Input:

int(((x^3-2*x^2+x)*exp(1)^2*exp((1+4*x)/(-1+x))+(16*x^2-112*x+16)*exp(1)^2 
+(16*x^5+8*x^4+16*x^3+40*x^2)*exp(1)-5*x^8+5*x^7-11*x^6+2*x^5-7*x^4-3*x^3- 
x^2)/(x^4-2*x^3+x^2)/exp(1)^2/exp((1+4*x)/(-1+x)),x,method=_RETURNVERBOSE)
 

Output:

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

Fricas [A] (verification not implemented)

Time = 0.09 (sec) , antiderivative size = 60, normalized size of antiderivative = 1.71 \[ \int \frac {e^{-2-\frac {1+4 x}{-1+x}} \left (-x^2-3 x^3-7 x^4+2 x^5-11 x^6+5 x^7-5 x^8+e^2 \left (16-112 x+16 x^2\right )+e^{2+\frac {1+4 x}{-1+x}} \left (x-2 x^2+x^3\right )+e \left (40 x^2+16 x^3+8 x^4+16 x^5\right )\right )}{x^2-2 x^3+x^4} \, dx=-\frac {{\left (x^{6} + 2 \, x^{4} - x e^{\left (\frac {6 \, x - 1}{x - 1}\right )} \log \left (x\right ) + x^{2} - 8 \, {\left (x^{3} + x\right )} e + 16 \, e^{2}\right )} e^{\left (-\frac {6 \, x - 1}{x - 1}\right )}}{x} \] Input:

integrate(((x^3-2*x^2+x)*exp(1)^2*exp((1+4*x)/(-1+x))+(16*x^2-112*x+16)*ex 
p(1)^2+(16*x^5+8*x^4+16*x^3+40*x^2)*exp(1)-5*x^8+5*x^7-11*x^6+2*x^5-7*x^4- 
3*x^3-x^2)/(x^4-2*x^3+x^2)/exp(1)^2/exp((1+4*x)/(-1+x)),x, algorithm="fric 
as")
 

Output:

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

Sympy [A] (verification not implemented)

Time = 0.15 (sec) , antiderivative size = 49, normalized size of antiderivative = 1.40 \[ \int \frac {e^{-2-\frac {1+4 x}{-1+x}} \left (-x^2-3 x^3-7 x^4+2 x^5-11 x^6+5 x^7-5 x^8+e^2 \left (16-112 x+16 x^2\right )+e^{2+\frac {1+4 x}{-1+x}} \left (x-2 x^2+x^3\right )+e \left (40 x^2+16 x^3+8 x^4+16 x^5\right )\right )}{x^2-2 x^3+x^4} \, dx=\log {\left (x \right )} + \frac {\left (- x^{6} - 2 x^{4} + 8 e x^{3} - x^{2} + 8 e x - 16 e^{2}\right ) e^{- \frac {4 x + 1}{x - 1}}}{x e^{2}} \] Input:

integrate(((x**3-2*x**2+x)*exp(1)**2*exp((1+4*x)/(-1+x))+(16*x**2-112*x+16 
)*exp(1)**2+(16*x**5+8*x**4+16*x**3+40*x**2)*exp(1)-5*x**8+5*x**7-11*x**6+ 
2*x**5-7*x**4-3*x**3-x**2)/(x**4-2*x**3+x**2)/exp(1)**2/exp((1+4*x)/(-1+x) 
),x)
 

Output:

log(x) + (-x**6 - 2*x**4 + 8*E*x**3 - x**2 + 8*E*x - 16*exp(2))*exp(-2)*ex 
p(-(4*x + 1)/(x - 1))/x
 

Maxima [F]

\[ \int \frac {e^{-2-\frac {1+4 x}{-1+x}} \left (-x^2-3 x^3-7 x^4+2 x^5-11 x^6+5 x^7-5 x^8+e^2 \left (16-112 x+16 x^2\right )+e^{2+\frac {1+4 x}{-1+x}} \left (x-2 x^2+x^3\right )+e \left (40 x^2+16 x^3+8 x^4+16 x^5\right )\right )}{x^2-2 x^3+x^4} \, dx=\int { -\frac {{\left (5 \, x^{8} - 5 \, x^{7} + 11 \, x^{6} - 2 \, x^{5} + 7 \, x^{4} + 3 \, x^{3} + x^{2} - 16 \, {\left (x^{2} - 7 \, x + 1\right )} e^{2} - 8 \, {\left (2 \, x^{5} + x^{4} + 2 \, x^{3} + 5 \, x^{2}\right )} e - {\left (x^{3} - 2 \, x^{2} + x\right )} e^{\left (\frac {4 \, x + 1}{x - 1} + 2\right )}\right )} e^{\left (-\frac {4 \, x + 1}{x - 1} - 2\right )}}{x^{4} - 2 \, x^{3} + x^{2}} \,d x } \] Input:

integrate(((x^3-2*x^2+x)*exp(1)^2*exp((1+4*x)/(-1+x))+(16*x^2-112*x+16)*ex 
p(1)^2+(16*x^5+8*x^4+16*x^3+40*x^2)*exp(1)-5*x^8+5*x^7-11*x^6+2*x^5-7*x^4- 
3*x^3-x^2)/(x^4-2*x^3+x^2)/exp(1)^2/exp((1+4*x)/(-1+x)),x, algorithm="maxi 
ma")
 

Output:

-(x^6 + 2*x^4 - 8*x^3*e + x^2 + 16*e^2 + 40*e + 1)*e^(-5/(x - 1) - 6)/x - 
1/5*e^(-5/(x - 1) - 6) + integrate((7*x*(40*e + 1) - 40*e - 1)*e^(-5/(x - 
1))/(x^4*e^6 - 2*x^3*e^6 + x^2*e^6), x) + log(x)
 

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 98 vs. \(2 (31) = 62\).

Time = 0.18 (sec) , antiderivative size = 98, normalized size of antiderivative = 2.80 \[ \int \frac {e^{-2-\frac {1+4 x}{-1+x}} \left (-x^2-3 x^3-7 x^4+2 x^5-11 x^6+5 x^7-5 x^8+e^2 \left (16-112 x+16 x^2\right )+e^{2+\frac {1+4 x}{-1+x}} \left (x-2 x^2+x^3\right )+e \left (40 x^2+16 x^3+8 x^4+16 x^5\right )\right )}{x^2-2 x^3+x^4} \, dx=-\frac {{\left (x^{6} e^{\left (-\frac {5 \, x}{x - 1}\right )} + 2 \, x^{4} e^{\left (-\frac {5 \, x}{x - 1}\right )} - 8 \, x^{3} e^{\left (-\frac {5 \, x}{x - 1} + 1\right )} + x^{2} e^{\left (-\frac {5 \, x}{x - 1}\right )} - x e \log \left (x\right ) - 8 \, x e^{\left (-\frac {5 \, x}{x - 1} + 1\right )} + 16 \, e^{\left (-\frac {5 \, x}{x - 1} + 2\right )}\right )} e^{\left (-1\right )}}{x} \] Input:

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

Output:

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

Mupad [B] (verification not implemented)

Time = 2.88 (sec) , antiderivative size = 81, normalized size of antiderivative = 2.31 \[ \int \frac {e^{-2-\frac {1+4 x}{-1+x}} \left (-x^2-3 x^3-7 x^4+2 x^5-11 x^6+5 x^7-5 x^8+e^2 \left (16-112 x+16 x^2\right )+e^{2+\frac {1+4 x}{-1+x}} \left (x-2 x^2+x^3\right )+e \left (40 x^2+16 x^3+8 x^4+16 x^5\right )\right )}{x^2-2 x^3+x^4} \, dx=-\frac {16\,{\mathrm {e}}^{\frac {1}{x-1}-\frac {6\,x}{x-1}+2}}{x}-{\mathrm {e}}^{\frac {1}{x-1}-\frac {6\,x}{x-1}}\,\left (x-8\,\mathrm {e}-8\,x^2\,\mathrm {e}-{\mathrm {e}}^{\frac {6\,x}{x-1}-\frac {1}{x-1}}\,\ln \left (x\right )+2\,x^3+x^5\right ) \] Input:

int((exp(-(4*x + 1)/(x - 1))*exp(-2)*(exp(2)*(16*x^2 - 112*x + 16) - x^2 - 
 3*x^3 - 7*x^4 + 2*x^5 - 11*x^6 + 5*x^7 - 5*x^8 + exp(1)*(40*x^2 + 16*x^3 
+ 8*x^4 + 16*x^5) + exp((4*x + 1)/(x - 1))*exp(2)*(x - 2*x^2 + x^3)))/(x^2 
 - 2*x^3 + x^4),x)
 

Output:

- (16*exp(1/(x - 1) - (6*x)/(x - 1) + 2))/x - exp(1/(x - 1) - (6*x)/(x - 1 
))*(x - 8*exp(1) - 8*x^2*exp(1) - exp((6*x)/(x - 1) - 1/(x - 1))*log(x) + 
2*x^3 + x^5)
 

Reduce [B] (verification not implemented)

Time = 0.20 (sec) , antiderivative size = 65, normalized size of antiderivative = 1.86 \[ \int \frac {e^{-2-\frac {1+4 x}{-1+x}} \left (-x^2-3 x^3-7 x^4+2 x^5-11 x^6+5 x^7-5 x^8+e^2 \left (16-112 x+16 x^2\right )+e^{2+\frac {1+4 x}{-1+x}} \left (x-2 x^2+x^3\right )+e \left (40 x^2+16 x^3+8 x^4+16 x^5\right )\right )}{x^2-2 x^3+x^4} \, dx=\frac {e^{\frac {5}{x -1}} \mathrm {log}\left (x \right ) e^{6} x -16 e^{2}+8 e \,x^{3}+8 e x -x^{6}-2 x^{4}-x^{2}}{e^{\frac {5}{x -1}} e^{6} x} \] Input:

int(((x^3-2*x^2+x)*exp(1)^2*exp((1+4*x)/(-1+x))+(16*x^2-112*x+16)*exp(1)^2 
+(16*x^5+8*x^4+16*x^3+40*x^2)*exp(1)-5*x^8+5*x^7-11*x^6+2*x^5-7*x^4-3*x^3- 
x^2)/(x^4-2*x^3+x^2)/exp(1)^2/exp((1+4*x)/(-1+x)),x)
 

Output:

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