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

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

Optimal result

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

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

Mathematica [A] (verified)

Time = 0.05 (sec) , antiderivative size = 28, normalized size of antiderivative = 0.97 \[ \int \frac {4-2 x^2-2 e^x x^2+\left (2+e^x x+x^2\right ) \log \left (\frac {8+4 e^x x+4 x^2}{x}\right )+\left (-2-e^x x-x^2+e^{2+x} \left (-2-e^x x-x^2\right )\right ) \log ^3\left (\frac {8+4 e^x x+4 x^2}{x}\right )}{\left (2+e^x x+x^2\right ) \log ^3\left (\frac {8+4 e^x x+4 x^2}{x}\right )} \, dx=-e^{2+x}-x+\frac {x}{\log ^2\left (4 \left (e^x+\frac {2}{x}+x\right )\right )} \] Input:

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

Output:

-E^(2 + x) - x + x/Log[4*(E^x + 2/x + 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 {-2 e^x x^2-2 x^2+\left (-x^2+e^{x+2} \left (-x^2-e^x x-2\right )-e^x x-2\right ) \log ^3\left (\frac {4 x^2+4 e^x x+8}{x}\right )+\left (x^2+e^x x+2\right ) \log \left (\frac {4 x^2+4 e^x x+8}{x}\right )+4}{\left (x^2+e^x x+2\right ) \log ^3\left (\frac {4 x^2+4 e^x x+8}{x}\right )} \, dx\)

\(\Big \downarrow \) 7292

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

\(\Big \downarrow \) 7293

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

\(\Big \downarrow \) 2009

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

Input:

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

Output:

$Aborted
 
Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(66\) vs. \(2(29)=58\).

Time = 2.14 (sec) , antiderivative size = 67, normalized size of antiderivative = 2.31

method result size
parallelrisch \(\frac {-4 \ln \left (\frac {4 \,{\mathrm e}^{x} x +4 x^{2}+8}{x}\right )^{2} x -4 \ln \left (\frac {4 \,{\mathrm e}^{x} x +4 x^{2}+8}{x}\right )^{2} {\mathrm e}^{2+x}+4 x}{4 \ln \left (\frac {4 \,{\mathrm e}^{x} x +4 x^{2}+8}{x}\right )^{2}}\) \(67\)
risch \(-{\mathrm e}^{2+x}-x +\frac {4 x}{{\left (4 \ln \left (2\right )-2 \ln \left (x \right )+2 \ln \left ({\mathrm e}^{x} x +x^{2}+2\right )+i \pi \,\operatorname {csgn}\left (i \left ({\mathrm e}^{x} x +x^{2}+2\right )\right ) {\operatorname {csgn}\left (\frac {i \left ({\mathrm e}^{x} x +x^{2}+2\right )}{x}\right )}^{2}-i \pi \,\operatorname {csgn}\left (i \left ({\mathrm e}^{x} x +x^{2}+2\right )\right ) \operatorname {csgn}\left (\frac {i \left ({\mathrm e}^{x} x +x^{2}+2\right )}{x}\right ) \operatorname {csgn}\left (\frac {i}{x}\right )+i \pi {\operatorname {csgn}\left (\frac {i \left ({\mathrm e}^{x} x +x^{2}+2\right )}{x}\right )}^{2} \operatorname {csgn}\left (\frac {i}{x}\right )-i \pi {\operatorname {csgn}\left (\frac {i \left ({\mathrm e}^{x} x +x^{2}+2\right )}{x}\right )}^{3}\right )}^{2}}\) \(163\)

Input:

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

Output:

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

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 63 vs. \(2 (29) = 58\).

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

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

Output:

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

Sympy [A] (verification not implemented)

Time = 0.15 (sec) , antiderivative size = 27, normalized size of antiderivative = 0.93 \[ \int \frac {4-2 x^2-2 e^x x^2+\left (2+e^x x+x^2\right ) \log \left (\frac {8+4 e^x x+4 x^2}{x}\right )+\left (-2-e^x x-x^2+e^{2+x} \left (-2-e^x x-x^2\right )\right ) \log ^3\left (\frac {8+4 e^x x+4 x^2}{x}\right )}{\left (2+e^x x+x^2\right ) \log ^3\left (\frac {8+4 e^x x+4 x^2}{x}\right )} \, dx=- x + \frac {x}{\log {\left (\frac {4 x^{2} + 4 x e^{x} + 8}{x} \right )}^{2}} - e^{2} e^{x} \] Input:

integrate((((-exp(x)*x-x**2-2)*exp(2+x)-exp(x)*x-x**2-2)*ln((4*exp(x)*x+4* 
x**2+8)/x)**3+(exp(x)*x+x**2+2)*ln((4*exp(x)*x+4*x**2+8)/x)-2*exp(x)*x**2- 
2*x**2+4)/(exp(x)*x+x**2+2)/ln((4*exp(x)*x+4*x**2+8)/x)**3,x)
 

Output:

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

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 163 vs. \(2 (29) = 58\).

Time = 0.22 (sec) , antiderivative size = 163, normalized size of antiderivative = 5.62 \[ \int \frac {4-2 x^2-2 e^x x^2+\left (2+e^x x+x^2\right ) \log \left (\frac {8+4 e^x x+4 x^2}{x}\right )+\left (-2-e^x x-x^2+e^{2+x} \left (-2-e^x x-x^2\right )\right ) \log ^3\left (\frac {8+4 e^x x+4 x^2}{x}\right )}{\left (2+e^x x+x^2\right ) \log ^3\left (\frac {8+4 e^x x+4 x^2}{x}\right )} \, dx=-\frac {{\left (x + e^{\left (x + 2\right )}\right )} \log \left (x^{2} + x e^{x} + 2\right )^{2} - 4 \, x \log \left (2\right ) \log \left (x\right ) + x \log \left (x\right )^{2} + {\left (4 \, \log \left (2\right )^{2} - 1\right )} x + {\left (4 \, e^{2} \log \left (2\right )^{2} - 4 \, e^{2} \log \left (2\right ) \log \left (x\right ) + e^{2} \log \left (x\right )^{2}\right )} e^{x} + 2 \, {\left ({\left (2 \, e^{2} \log \left (2\right ) - e^{2} \log \left (x\right )\right )} e^{x} + 2 \, x \log \left (2\right ) - x \log \left (x\right )\right )} \log \left (x^{2} + x e^{x} + 2\right )}{4 \, \log \left (2\right )^{2} + 2 \, {\left (2 \, \log \left (2\right ) - \log \left (x\right )\right )} \log \left (x^{2} + x e^{x} + 2\right ) + \log \left (x^{2} + x e^{x} + 2\right )^{2} - 4 \, \log \left (2\right ) \log \left (x\right ) + \log \left (x\right )^{2}} \] Input:

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

Output:

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

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 64 vs. \(2 (29) = 58\).

Time = 0.74 (sec) , antiderivative size = 64, normalized size of antiderivative = 2.21 \[ \int \frac {4-2 x^2-2 e^x x^2+\left (2+e^x x+x^2\right ) \log \left (\frac {8+4 e^x x+4 x^2}{x}\right )+\left (-2-e^x x-x^2+e^{2+x} \left (-2-e^x x-x^2\right )\right ) \log ^3\left (\frac {8+4 e^x x+4 x^2}{x}\right )}{\left (2+e^x x+x^2\right ) \log ^3\left (\frac {8+4 e^x x+4 x^2}{x}\right )} \, dx=-\frac {x \log \left (\frac {4 \, {\left (x^{2} + x e^{x} + 2\right )}}{x}\right )^{2} + e^{\left (x + 2\right )} \log \left (\frac {4 \, {\left (x^{2} + x e^{x} + 2\right )}}{x}\right )^{2} - x}{\log \left (\frac {4 \, {\left (x^{2} + x e^{x} + 2\right )}}{x}\right )^{2}} \] Input:

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

Output:

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

Mupad [B] (verification not implemented)

Time = 3.02 (sec) , antiderivative size = 483, normalized size of antiderivative = 16.66 \[ \int \frac {4-2 x^2-2 e^x x^2+\left (2+e^x x+x^2\right ) \log \left (\frac {8+4 e^x x+4 x^2}{x}\right )+\left (-2-e^x x-x^2+e^{2+x} \left (-2-e^x x-x^2\right )\right ) \log ^3\left (\frac {8+4 e^x x+4 x^2}{x}\right )}{\left (2+e^x x+x^2\right ) \log ^3\left (\frac {8+4 e^x x+4 x^2}{x}\right )} \, dx=\frac {\frac {x\,\left (x\,{\mathrm {e}}^x+x^2+2\right )}{2\,\left (x^2\,{\mathrm {e}}^x+x^2-2\right )}+\frac {x\,\ln \left (\frac {4\,x\,{\mathrm {e}}^x+4\,x^2+8}{x}\right )\,\left (x\,{\mathrm {e}}^x+x^2+2\right )\,\left (4\,x^2\,{\mathrm {e}}^x+2\,x^3\,{\mathrm {e}}^x-2\,x^4\,{\mathrm {e}}^x+x^5\,{\mathrm {e}}^x+4\,x\,{\mathrm {e}}^x+8\,x^2-x^4+4\right )}{2\,{\left (x^2\,{\mathrm {e}}^x+x^2-2\right )}^3}}{\ln \left (\frac {4\,x\,{\mathrm {e}}^x+4\,x^2+8}{x}\right )}-{\mathrm {e}}^{x+2}-x+\frac {x-\frac {x\,\ln \left (\frac {4\,x\,{\mathrm {e}}^x+4\,x^2+8}{x}\right )\,\left (x\,{\mathrm {e}}^x+x^2+2\right )}{2\,\left (x^2\,{\mathrm {e}}^x+x^2-2\right )}}{{\ln \left (\frac {4\,x\,{\mathrm {e}}^x+4\,x^2+8}{x}\right )}^2}-\frac {-x^7+2\,x^6-4\,x^4-8\,x^3+16\,x^2+24\,x+16}{2\,\left (x^2\,{\mathrm {e}}^x+x^2-2\right )\,\left (-x^4+2\,x^2+4\,x\right )}-\frac {-x^{12}+4\,x^{11}-5\,x^{10}-4\,x^9-2\,x^8+20\,x^7-28\,x^6+88\,x^4+144\,x^3+64\,x^2}{2\,x^2\,\left (-x^4+2\,x^2+4\,x\right )\,\left (x^4\,{\mathrm {e}}^{2\,x}+{\left (x^2-2\right )}^2+2\,x^2\,{\mathrm {e}}^x\,\left (x^2-2\right )\right )}-\frac {x^{16}-2\,x^{15}+x^{14}-24\,x^{11}+8\,x^{10}+16\,x^9+144\,x^6+192\,x^5+64\,x^4}{2\,x^4\,\left (-x^4+2\,x^2+4\,x\right )\,\left (x^6\,{\mathrm {e}}^{3\,x}+{\left (x^2-2\right )}^3+3\,x^4\,{\mathrm {e}}^{2\,x}\,\left (x^2-2\right )+3\,x^2\,{\mathrm {e}}^x\,{\left (x^2-2\right )}^2\right )} \] Input:

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

Output:

((x*(x*exp(x) + x^2 + 2))/(2*(x^2*exp(x) + x^2 - 2)) + (x*log((4*x*exp(x) 
+ 4*x^2 + 8)/x)*(x*exp(x) + x^2 + 2)*(4*x^2*exp(x) + 2*x^3*exp(x) - 2*x^4* 
exp(x) + x^5*exp(x) + 4*x*exp(x) + 8*x^2 - x^4 + 4))/(2*(x^2*exp(x) + x^2 
- 2)^3))/log((4*x*exp(x) + 4*x^2 + 8)/x) - exp(x + 2) - x + (x - (x*log((4 
*x*exp(x) + 4*x^2 + 8)/x)*(x*exp(x) + x^2 + 2))/(2*(x^2*exp(x) + x^2 - 2)) 
)/log((4*x*exp(x) + 4*x^2 + 8)/x)^2 - (24*x + 16*x^2 - 8*x^3 - 4*x^4 + 2*x 
^6 - x^7 + 16)/(2*(x^2*exp(x) + x^2 - 2)*(4*x + 2*x^2 - x^4)) - (64*x^2 + 
144*x^3 + 88*x^4 - 28*x^6 + 20*x^7 - 2*x^8 - 4*x^9 - 5*x^10 + 4*x^11 - x^1 
2)/(2*x^2*(4*x + 2*x^2 - x^4)*(x^4*exp(2*x) + (x^2 - 2)^2 + 2*x^2*exp(x)*( 
x^2 - 2))) - (64*x^4 + 192*x^5 + 144*x^6 + 16*x^9 + 8*x^10 - 24*x^11 + x^1 
4 - 2*x^15 + x^16)/(2*x^4*(4*x + 2*x^2 - x^4)*(x^6*exp(3*x) + (x^2 - 2)^3 
+ 3*x^4*exp(2*x)*(x^2 - 2) + 3*x^2*exp(x)*(x^2 - 2)^2))
 

Reduce [B] (verification not implemented)

Time = 0.23 (sec) , antiderivative size = 74, normalized size of antiderivative = 2.55 \[ \int \frac {4-2 x^2-2 e^x x^2+\left (2+e^x x+x^2\right ) \log \left (\frac {8+4 e^x x+4 x^2}{x}\right )+\left (-2-e^x x-x^2+e^{2+x} \left (-2-e^x x-x^2\right )\right ) \log ^3\left (\frac {8+4 e^x x+4 x^2}{x}\right )}{\left (2+e^x x+x^2\right ) \log ^3\left (\frac {8+4 e^x x+4 x^2}{x}\right )} \, dx=\frac {-e^{x} \mathrm {log}\left (\frac {4 e^{x} x +4 x^{2}+8}{x}\right )^{2} e^{2}-\mathrm {log}\left (\frac {4 e^{x} x +4 x^{2}+8}{x}\right )^{2} x +x}{\mathrm {log}\left (\frac {4 e^{x} x +4 x^{2}+8}{x}\right )^{2}} \] Input:

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

Output:

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