\(\int \frac {-4-2 x+10 x^2+5 x^3+e^x (10 x^2+5 x^3)+(2 x-5 x^2-5 e^4 x^2+5 e^x x^2+5 x^3) \log (\frac {2-5 x-5 e^4 x+5 e^x x+5 x^2}{5 x})}{2 x-5 x^2-5 e^4 x^2+5 e^x x^2+5 x^3} \, dx\) [1897]

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

Optimal result

Integrand size = 124, antiderivative size = 23 \[ \int \frac {-4-2 x+10 x^2+5 x^3+e^x \left (10 x^2+5 x^3\right )+\left (2 x-5 x^2-5 e^4 x^2+5 e^x x^2+5 x^3\right ) \log \left (\frac {2-5 x-5 e^4 x+5 e^x x+5 x^2}{5 x}\right )}{2 x-5 x^2-5 e^4 x^2+5 e^x x^2+5 x^3} \, dx=(2+x) \log \left (-1-e^4+e^x+\frac {2}{5 x}+x\right ) \] Output:

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

Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(51\) vs. \(2(23)=46\).

Time = 4.22 (sec) , antiderivative size = 51, normalized size of antiderivative = 2.22 \[ \int \frac {-4-2 x+10 x^2+5 x^3+e^x \left (10 x^2+5 x^3\right )+\left (2 x-5 x^2-5 e^4 x^2+5 e^x x^2+5 x^3\right ) \log \left (\frac {2-5 x-5 e^4 x+5 e^x x+5 x^2}{5 x}\right )}{2 x-5 x^2-5 e^4 x^2+5 e^x x^2+5 x^3} \, dx=-2 \log (x)+x \log \left (-1-e^4+e^x+\frac {2}{5 x}+x\right )+2 \log \left (2-5 x-5 e^4 x+5 e^x x+5 x^2\right ) \] Input:

Integrate[(-4 - 2*x + 10*x^2 + 5*x^3 + E^x*(10*x^2 + 5*x^3) + (2*x - 5*x^2 
 - 5*E^4*x^2 + 5*E^x*x^2 + 5*x^3)*Log[(2 - 5*x - 5*E^4*x + 5*E^x*x + 5*x^2 
)/(5*x)])/(2*x - 5*x^2 - 5*E^4*x^2 + 5*E^x*x^2 + 5*x^3),x]
 

Output:

-2*Log[x] + x*Log[-1 - E^4 + E^x + 2/(5*x) + x] + 2*Log[2 - 5*x - 5*E^4*x 
+ 5*E^x*x + 5*x^2]
 

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 {5 x^3+10 x^2+e^x \left (5 x^3+10 x^2\right )+\left (5 x^3+5 e^x x^2-5 e^4 x^2-5 x^2+2 x\right ) \log \left (\frac {5 x^2+5 e^x x-5 e^4 x-5 x+2}{5 x}\right )-2 x-4}{5 x^3+5 e^x x^2-5 e^4 x^2-5 x^2+2 x} \, dx\)

\(\Big \downarrow \) 6

\(\displaystyle \int \frac {5 x^3+10 x^2+e^x \left (5 x^3+10 x^2\right )+\left (5 x^3+5 e^x x^2-5 e^4 x^2-5 x^2+2 x\right ) \log \left (\frac {5 x^2+5 e^x x-5 e^4 x-5 x+2}{5 x}\right )-2 x-4}{5 x^3+5 e^x x^2+\left (-5-5 e^4\right ) x^2+2 x}dx\)

\(\Big \downarrow \) 7239

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

\(\Big \downarrow \) 2009

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

Input:

Int[(-4 - 2*x + 10*x^2 + 5*x^3 + E^x*(10*x^2 + 5*x^3) + (2*x - 5*x^2 - 5*E 
^4*x^2 + 5*E^x*x^2 + 5*x^3)*Log[(2 - 5*x - 5*E^4*x + 5*E^x*x + 5*x^2)/(5*x 
)])/(2*x - 5*x^2 - 5*E^4*x^2 + 5*E^x*x^2 + 5*x^3),x]
 

Output:

$Aborted
 
Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(57\) vs. \(2(19)=38\).

Time = 0.90 (sec) , antiderivative size = 58, normalized size of antiderivative = 2.52

method result size
norman \(2 \ln \left (\frac {5 \,{\mathrm e}^{x} x -5 x \,{\mathrm e}^{4}+5 x^{2}-5 x +2}{5 x}\right )+\ln \left (\frac {5 \,{\mathrm e}^{x} x -5 x \,{\mathrm e}^{4}+5 x^{2}-5 x +2}{5 x}\right ) x\) \(58\)
parallelrisch \(2 \ln \left (\frac {5 \,{\mathrm e}^{x} x -5 x \,{\mathrm e}^{4}+5 x^{2}-5 x +2}{5 x}\right )+\ln \left (\frac {5 \,{\mathrm e}^{x} x -5 x \,{\mathrm e}^{4}+5 x^{2}-5 x +2}{5 x}\right ) x\) \(58\)
risch \(x \ln \left (x \,{\mathrm e}^{4}-\frac {2}{5}-x^{2}+\left (1-{\mathrm e}^{x}\right ) x \right )-x \ln \left (x \right )+\frac {i \pi x \,\operatorname {csgn}\left (i \left (x \,{\mathrm e}^{4}-\frac {2}{5}-x^{2}+\left (1-{\mathrm e}^{x}\right ) x \right )\right ) {\operatorname {csgn}\left (\frac {i \left (x \,{\mathrm e}^{4}-\frac {2}{5}-x^{2}+\left (1-{\mathrm e}^{x}\right ) x \right )}{x}\right )}^{2}}{2}-\frac {i \pi x \,\operatorname {csgn}\left (i \left (x \,{\mathrm e}^{4}-\frac {2}{5}-x^{2}+\left (1-{\mathrm e}^{x}\right ) x \right )\right ) \operatorname {csgn}\left (\frac {i \left (x \,{\mathrm e}^{4}-\frac {2}{5}-x^{2}+\left (1-{\mathrm e}^{x}\right ) x \right )}{x}\right ) \operatorname {csgn}\left (\frac {i}{x}\right )}{2}+\frac {i \pi x {\operatorname {csgn}\left (\frac {i \left (x \,{\mathrm e}^{4}-\frac {2}{5}-x^{2}+\left (1-{\mathrm e}^{x}\right ) x \right )}{x}\right )}^{3}}{2}-i \pi x {\operatorname {csgn}\left (\frac {i \left (x \,{\mathrm e}^{4}-\frac {2}{5}-x^{2}+\left (1-{\mathrm e}^{x}\right ) x \right )}{x}\right )}^{2}+\frac {i \pi x {\operatorname {csgn}\left (\frac {i \left (x \,{\mathrm e}^{4}-\frac {2}{5}-x^{2}+\left (1-{\mathrm e}^{x}\right ) x \right )}{x}\right )}^{2} \operatorname {csgn}\left (\frac {i}{x}\right )}{2}+i \pi x +2 \ln \left ({\mathrm e}^{x}-\frac {5 x \,{\mathrm e}^{4}-5 x^{2}+5 x -2}{5 x}\right )\) \(283\)

Input:

int(((5*exp(x)*x^2-5*x^2*exp(4)+5*x^3-5*x^2+2*x)*ln(1/5*(5*exp(x)*x-5*x*ex 
p(4)+5*x^2-5*x+2)/x)+(5*x^3+10*x^2)*exp(x)+5*x^3+10*x^2-2*x-4)/(5*exp(x)*x 
^2-5*x^2*exp(4)+5*x^3-5*x^2+2*x),x,method=_RETURNVERBOSE)
 

Output:

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

Fricas [A] (verification not implemented)

Time = 0.10 (sec) , antiderivative size = 30, normalized size of antiderivative = 1.30 \[ \int \frac {-4-2 x+10 x^2+5 x^3+e^x \left (10 x^2+5 x^3\right )+\left (2 x-5 x^2-5 e^4 x^2+5 e^x x^2+5 x^3\right ) \log \left (\frac {2-5 x-5 e^4 x+5 e^x x+5 x^2}{5 x}\right )}{2 x-5 x^2-5 e^4 x^2+5 e^x x^2+5 x^3} \, dx={\left (x + 2\right )} \log \left (\frac {5 \, x^{2} - 5 \, x e^{4} + 5 \, x e^{x} - 5 \, x + 2}{5 \, x}\right ) \] Input:

integrate(((5*exp(x)*x^2-5*x^2*exp(4)+5*x^3-5*x^2+2*x)*log(1/5*(5*exp(x)*x 
-5*x*exp(4)+5*x^2-5*x+2)/x)+(5*x^3+10*x^2)*exp(x)+5*x^3+10*x^2-2*x-4)/(5*e 
xp(x)*x^2-5*x^2*exp(4)+5*x^3-5*x^2+2*x),x, algorithm="fricas")
 

Output:

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

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 49 vs. \(2 (19) = 38\).

Time = 0.25 (sec) , antiderivative size = 49, normalized size of antiderivative = 2.13 \[ \int \frac {-4-2 x+10 x^2+5 x^3+e^x \left (10 x^2+5 x^3\right )+\left (2 x-5 x^2-5 e^4 x^2+5 e^x x^2+5 x^3\right ) \log \left (\frac {2-5 x-5 e^4 x+5 e^x x+5 x^2}{5 x}\right )}{2 x-5 x^2-5 e^4 x^2+5 e^x x^2+5 x^3} \, dx=x \log {\left (\frac {x^{2} + x e^{x} - x e^{4} - x + \frac {2}{5}}{x} \right )} + 2 \log {\left (e^{x} + \frac {5 x^{2} - 5 x e^{4} - 5 x + 2}{5 x} \right )} \] Input:

integrate(((5*exp(x)*x**2-5*x**2*exp(4)+5*x**3-5*x**2+2*x)*ln(1/5*(5*exp(x 
)*x-5*x*exp(4)+5*x**2-5*x+2)/x)+(5*x**3+10*x**2)*exp(x)+5*x**3+10*x**2-2*x 
-4)/(5*exp(x)*x**2-5*x**2*exp(4)+5*x**3-5*x**2+2*x),x)
 

Output:

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

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 60 vs. \(2 (19) = 38\).

Time = 0.14 (sec) , antiderivative size = 60, normalized size of antiderivative = 2.61 \[ \int \frac {-4-2 x+10 x^2+5 x^3+e^x \left (10 x^2+5 x^3\right )+\left (2 x-5 x^2-5 e^4 x^2+5 e^x x^2+5 x^3\right ) \log \left (\frac {2-5 x-5 e^4 x+5 e^x x+5 x^2}{5 x}\right )}{2 x-5 x^2-5 e^4 x^2+5 e^x x^2+5 x^3} \, dx=-x \log \left (5\right ) + x \log \left (5 \, x^{2} - 5 \, x {\left (e^{4} + 1\right )} + 5 \, x e^{x} + 2\right ) - x \log \left (x\right ) + 2 \, \log \left (\frac {5 \, x^{2} - 5 \, x {\left (e^{4} + 1\right )} + 5 \, x e^{x} + 2}{5 \, x}\right ) \] Input:

integrate(((5*exp(x)*x^2-5*x^2*exp(4)+5*x^3-5*x^2+2*x)*log(1/5*(5*exp(x)*x 
-5*x*exp(4)+5*x^2-5*x+2)/x)+(5*x^3+10*x^2)*exp(x)+5*x^3+10*x^2-2*x-4)/(5*e 
xp(x)*x^2-5*x^2*exp(4)+5*x^3-5*x^2+2*x),x, algorithm="maxima")
 

Output:

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

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 56 vs. \(2 (19) = 38\).

Time = 0.16 (sec) , antiderivative size = 56, normalized size of antiderivative = 2.43 \[ \int \frac {-4-2 x+10 x^2+5 x^3+e^x \left (10 x^2+5 x^3\right )+\left (2 x-5 x^2-5 e^4 x^2+5 e^x x^2+5 x^3\right ) \log \left (\frac {2-5 x-5 e^4 x+5 e^x x+5 x^2}{5 x}\right )}{2 x-5 x^2-5 e^4 x^2+5 e^x x^2+5 x^3} \, dx=x \log \left (\frac {5 \, x^{2} - 5 \, x e^{4} + 5 \, x e^{x} - 5 \, x + 2}{5 \, x}\right ) + 2 \, \log \left (-5 \, x^{2} + 5 \, x e^{4} - 5 \, x e^{x} + 5 \, x - 2\right ) - 2 \, \log \left (x\right ) \] Input:

integrate(((5*exp(x)*x^2-5*x^2*exp(4)+5*x^3-5*x^2+2*x)*log(1/5*(5*exp(x)*x 
-5*x*exp(4)+5*x^2-5*x+2)/x)+(5*x^3+10*x^2)*exp(x)+5*x^3+10*x^2-2*x-4)/(5*e 
xp(x)*x^2-5*x^2*exp(4)+5*x^3-5*x^2+2*x),x, algorithm="giac")
 

Output:

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

Mupad [F(-1)]

Timed out. \[ \int \frac {-4-2 x+10 x^2+5 x^3+e^x \left (10 x^2+5 x^3\right )+\left (2 x-5 x^2-5 e^4 x^2+5 e^x x^2+5 x^3\right ) \log \left (\frac {2-5 x-5 e^4 x+5 e^x x+5 x^2}{5 x}\right )}{2 x-5 x^2-5 e^4 x^2+5 e^x x^2+5 x^3} \, dx=\int \frac {{\mathrm {e}}^x\,\left (5\,x^3+10\,x^2\right )-2\,x+\ln \left (\frac {x\,{\mathrm {e}}^x-x\,{\mathrm {e}}^4-x+x^2+\frac {2}{5}}{x}\right )\,\left (2\,x+5\,x^2\,{\mathrm {e}}^x-5\,x^2\,{\mathrm {e}}^4-5\,x^2+5\,x^3\right )+10\,x^2+5\,x^3-4}{2\,x+5\,x^2\,{\mathrm {e}}^x-5\,x^2\,{\mathrm {e}}^4-5\,x^2+5\,x^3} \,d x \] Input:

int((exp(x)*(10*x^2 + 5*x^3) - 2*x + log((x*exp(x) - x*exp(4) - x + x^2 + 
2/5)/x)*(2*x + 5*x^2*exp(x) - 5*x^2*exp(4) - 5*x^2 + 5*x^3) + 10*x^2 + 5*x 
^3 - 4)/(2*x + 5*x^2*exp(x) - 5*x^2*exp(4) - 5*x^2 + 5*x^3),x)
 

Output:

int((exp(x)*(10*x^2 + 5*x^3) - 2*x + log((x*exp(x) - x*exp(4) - x + x^2 + 
2/5)/x)*(2*x + 5*x^2*exp(x) - 5*x^2*exp(4) - 5*x^2 + 5*x^3) + 10*x^2 + 5*x 
^3 - 4)/(2*x + 5*x^2*exp(x) - 5*x^2*exp(4) - 5*x^2 + 5*x^3), x)
 

Reduce [F]

\[ \int \frac {-4-2 x+10 x^2+5 x^3+e^x \left (10 x^2+5 x^3\right )+\left (2 x-5 x^2-5 e^4 x^2+5 e^x x^2+5 x^3\right ) \log \left (\frac {2-5 x-5 e^4 x+5 e^x x+5 x^2}{5 x}\right )}{2 x-5 x^2-5 e^4 x^2+5 e^x x^2+5 x^3} \, dx=2 \left (\int \frac {\mathrm {log}\left (\frac {5 e^{x} x -5 e^{4} x +5 x^{2}-5 x +2}{5 x}\right )}{5 e^{x} x -5 e^{4} x +5 x^{2}-5 x +2}d x \right )+5 \left (\int \frac {e^{x} x^{2}}{5 e^{x} x -5 e^{4} x +5 x^{2}-5 x +2}d x \right )+5 \left (\int \frac {e^{x} \mathrm {log}\left (\frac {5 e^{x} x -5 e^{4} x +5 x^{2}-5 x +2}{5 x}\right ) x}{5 e^{x} x -5 e^{4} x +5 x^{2}-5 x +2}d x \right )+10 \left (\int \frac {e^{x} x}{5 e^{x} x -5 e^{4} x +5 x^{2}-5 x +2}d x \right )+5 \left (\int \frac {\mathrm {log}\left (\frac {5 e^{x} x -5 e^{4} x +5 x^{2}-5 x +2}{5 x}\right ) x^{2}}{5 e^{x} x -5 e^{4} x +5 x^{2}-5 x +2}d x \right )-5 \left (\int \frac {\mathrm {log}\left (\frac {5 e^{x} x -5 e^{4} x +5 x^{2}-5 x +2}{5 x}\right ) x}{5 e^{x} x -5 e^{4} x +5 x^{2}-5 x +2}d x \right ) e^{4}-5 \left (\int \frac {\mathrm {log}\left (\frac {5 e^{x} x -5 e^{4} x +5 x^{2}-5 x +2}{5 x}\right ) x}{5 e^{x} x -5 e^{4} x +5 x^{2}-5 x +2}d x \right )+5 \left (\int \frac {x}{5 e^{x} x -5 e^{4} x +5 x^{2}-5 x +2}d x \right ) e^{4}+20 \left (\int \frac {x}{5 e^{x} x -5 e^{4} x +5 x^{2}-5 x +2}d x \right )-6 \left (\int \frac {1}{5 e^{x} x^{2}-5 e^{4} x^{2}+5 x^{3}-5 x^{2}+2 x}d x \right )-4 \left (\int \frac {1}{5 e^{x} x -5 e^{4} x +5 x^{2}-5 x +2}d x \right )-\mathrm {log}\left (5 e^{x} x -5 e^{4} x +5 x^{2}-5 x +2\right )+\mathrm {log}\left (x \right )+x \] Input:

int(((5*exp(x)*x^2-5*x^2*exp(4)+5*x^3-5*x^2+2*x)*log(1/5*(5*exp(x)*x-5*x*e 
xp(4)+5*x^2-5*x+2)/x)+(5*x^3+10*x^2)*exp(x)+5*x^3+10*x^2-2*x-4)/(5*exp(x)* 
x^2-5*x^2*exp(4)+5*x^3-5*x^2+2*x),x)
 

Output:

2*int(log((5*e**x*x - 5*e**4*x + 5*x**2 - 5*x + 2)/(5*x))/(5*e**x*x - 5*e* 
*4*x + 5*x**2 - 5*x + 2),x) + 5*int((e**x*x**2)/(5*e**x*x - 5*e**4*x + 5*x 
**2 - 5*x + 2),x) + 5*int((e**x*log((5*e**x*x - 5*e**4*x + 5*x**2 - 5*x + 
2)/(5*x))*x)/(5*e**x*x - 5*e**4*x + 5*x**2 - 5*x + 2),x) + 10*int((e**x*x) 
/(5*e**x*x - 5*e**4*x + 5*x**2 - 5*x + 2),x) + 5*int((log((5*e**x*x - 5*e* 
*4*x + 5*x**2 - 5*x + 2)/(5*x))*x**2)/(5*e**x*x - 5*e**4*x + 5*x**2 - 5*x 
+ 2),x) - 5*int((log((5*e**x*x - 5*e**4*x + 5*x**2 - 5*x + 2)/(5*x))*x)/(5 
*e**x*x - 5*e**4*x + 5*x**2 - 5*x + 2),x)*e**4 - 5*int((log((5*e**x*x - 5* 
e**4*x + 5*x**2 - 5*x + 2)/(5*x))*x)/(5*e**x*x - 5*e**4*x + 5*x**2 - 5*x + 
 2),x) + 5*int(x/(5*e**x*x - 5*e**4*x + 5*x**2 - 5*x + 2),x)*e**4 + 20*int 
(x/(5*e**x*x - 5*e**4*x + 5*x**2 - 5*x + 2),x) - 6*int(1/(5*e**x*x**2 - 5* 
e**4*x**2 + 5*x**3 - 5*x**2 + 2*x),x) - 4*int(1/(5*e**x*x - 5*e**4*x + 5*x 
**2 - 5*x + 2),x) - log(5*e**x*x - 5*e**4*x + 5*x**2 - 5*x + 2) + log(x) + 
 x