\(\int \frac {4-2 x+e^2 (2 x-x^2)+e^{\frac {x^2+\log ^2(\frac {2+e^2 x}{x})}{x}} (-2 x-4 x^2+e^2 (-x^2-2 x^3)+8 \log (\frac {2+e^2 x}{x})+(4+2 e^2 x) \log ^2(\frac {2+e^2 x}{x}))}{16+24 x+12 x^2+2 x^3+e^2 (8 x+12 x^2+6 x^3+x^4)+e^{\frac {3 (x^2+\log ^2(\frac {2+e^2 x}{x}))}{x}} (2 x^3+e^2 x^4)+e^{\frac {2 (x^2+\log ^2(\frac {2+e^2 x}{x}))}{x}} (12 x^2+6 x^3+e^2 (6 x^3+3 x^4))+e^{\frac {x^2+\log ^2(\frac {2+e^2 x}{x})}{x}} (24 x+24 x^2+6 x^3+e^2 (12 x^2+12 x^3+3 x^4))} \, dx\) [890]

Optimal result
Mathematica [A] (verified)
Rubi [F]
Maple [A] (verified)
Fricas [B] (verification not implemented)
Sympy [B] (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 = 293, antiderivative size = 31 \[ \int \frac {4-2 x+e^2 \left (2 x-x^2\right )+e^{\frac {x^2+\log ^2\left (\frac {2+e^2 x}{x}\right )}{x}} \left (-2 x-4 x^2+e^2 \left (-x^2-2 x^3\right )+8 \log \left (\frac {2+e^2 x}{x}\right )+\left (4+2 e^2 x\right ) \log ^2\left (\frac {2+e^2 x}{x}\right )\right )}{16+24 x+12 x^2+2 x^3+e^2 \left (8 x+12 x^2+6 x^3+x^4\right )+e^{\frac {3 \left (x^2+\log ^2\left (\frac {2+e^2 x}{x}\right )\right )}{x}} \left (2 x^3+e^2 x^4\right )+e^{\frac {2 \left (x^2+\log ^2\left (\frac {2+e^2 x}{x}\right )\right )}{x}} \left (12 x^2+6 x^3+e^2 \left (6 x^3+3 x^4\right )\right )+e^{\frac {x^2+\log ^2\left (\frac {2+e^2 x}{x}\right )}{x}} \left (24 x+24 x^2+6 x^3+e^2 \left (12 x^2+12 x^3+3 x^4\right )\right )} \, dx=\frac {x}{\left (2+x+e^{x+\frac {\log ^2\left (\frac {2+e^2 x}{x}\right )}{x}} x\right )^2} \] Output:

x/(x+exp(x+ln((exp(2)*x+2)/x)^2/x)*x+2)^2
 

Mathematica [A] (verified)

Time = 0.12 (sec) , antiderivative size = 29, normalized size of antiderivative = 0.94 \[ \int \frac {4-2 x+e^2 \left (2 x-x^2\right )+e^{\frac {x^2+\log ^2\left (\frac {2+e^2 x}{x}\right )}{x}} \left (-2 x-4 x^2+e^2 \left (-x^2-2 x^3\right )+8 \log \left (\frac {2+e^2 x}{x}\right )+\left (4+2 e^2 x\right ) \log ^2\left (\frac {2+e^2 x}{x}\right )\right )}{16+24 x+12 x^2+2 x^3+e^2 \left (8 x+12 x^2+6 x^3+x^4\right )+e^{\frac {3 \left (x^2+\log ^2\left (\frac {2+e^2 x}{x}\right )\right )}{x}} \left (2 x^3+e^2 x^4\right )+e^{\frac {2 \left (x^2+\log ^2\left (\frac {2+e^2 x}{x}\right )\right )}{x}} \left (12 x^2+6 x^3+e^2 \left (6 x^3+3 x^4\right )\right )+e^{\frac {x^2+\log ^2\left (\frac {2+e^2 x}{x}\right )}{x}} \left (24 x+24 x^2+6 x^3+e^2 \left (12 x^2+12 x^3+3 x^4\right )\right )} \, dx=\frac {x}{\left (2+x+e^{x+\frac {\log ^2\left (e^2+\frac {2}{x}\right )}{x}} x\right )^2} \] Input:

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

Output:

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

\(\Big \downarrow \) 7239

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

\(\Big \downarrow \) 7293

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

\(\Big \downarrow \) 7299

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

Input:

Int[(4 - 2*x + E^2*(2*x - x^2) + E^((x^2 + Log[(2 + E^2*x)/x]^2)/x)*(-2*x 
- 4*x^2 + E^2*(-x^2 - 2*x^3) + 8*Log[(2 + E^2*x)/x] + (4 + 2*E^2*x)*Log[(2 
 + E^2*x)/x]^2))/(16 + 24*x + 12*x^2 + 2*x^3 + E^2*(8*x + 12*x^2 + 6*x^3 + 
 x^4) + E^((3*(x^2 + Log[(2 + E^2*x)/x]^2))/x)*(2*x^3 + E^2*x^4) + E^((2*( 
x^2 + Log[(2 + E^2*x)/x]^2))/x)*(12*x^2 + 6*x^3 + E^2*(6*x^3 + 3*x^4)) + E 
^((x^2 + Log[(2 + E^2*x)/x]^2)/x)*(24*x + 24*x^2 + 6*x^3 + E^2*(12*x^2 + 1 
2*x^3 + 3*x^4))),x]
 

Output:

$Aborted
 
Maple [A] (verified)

Time = 9.17 (sec) , antiderivative size = 32, normalized size of antiderivative = 1.03

method result size
risch \(\frac {x}{\left (x \,{\mathrm e}^{\frac {\ln \left (\frac {{\mathrm e}^{2} x +2}{x}\right )^{2}+x^{2}}{x}}+x +2\right )^{2}}\) \(32\)
parallelrisch \(\frac {x}{{\mathrm e}^{\frac {2 \ln \left (\frac {{\mathrm e}^{2} x +2}{x}\right )^{2}+2 x^{2}}{x}} x^{2}+2 \,{\mathrm e}^{\frac {\ln \left (\frac {{\mathrm e}^{2} x +2}{x}\right )^{2}+x^{2}}{x}} x^{2}+x^{2}+4 x \,{\mathrm e}^{\frac {\ln \left (\frac {{\mathrm e}^{2} x +2}{x}\right )^{2}+x^{2}}{x}}+4 x +4}\) \(93\)

Input:

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

Output:

x/(x*exp((ln((exp(2)*x+2)/x)^2+x^2)/x)+x+2)^2
 

Fricas [B] (verification not implemented)

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

Time = 0.11 (sec) , antiderivative size = 70, normalized size of antiderivative = 2.26 \[ \int \frac {4-2 x+e^2 \left (2 x-x^2\right )+e^{\frac {x^2+\log ^2\left (\frac {2+e^2 x}{x}\right )}{x}} \left (-2 x-4 x^2+e^2 \left (-x^2-2 x^3\right )+8 \log \left (\frac {2+e^2 x}{x}\right )+\left (4+2 e^2 x\right ) \log ^2\left (\frac {2+e^2 x}{x}\right )\right )}{16+24 x+12 x^2+2 x^3+e^2 \left (8 x+12 x^2+6 x^3+x^4\right )+e^{\frac {3 \left (x^2+\log ^2\left (\frac {2+e^2 x}{x}\right )\right )}{x}} \left (2 x^3+e^2 x^4\right )+e^{\frac {2 \left (x^2+\log ^2\left (\frac {2+e^2 x}{x}\right )\right )}{x}} \left (12 x^2+6 x^3+e^2 \left (6 x^3+3 x^4\right )\right )+e^{\frac {x^2+\log ^2\left (\frac {2+e^2 x}{x}\right )}{x}} \left (24 x+24 x^2+6 x^3+e^2 \left (12 x^2+12 x^3+3 x^4\right )\right )} \, dx=\frac {x}{x^{2} e^{\left (\frac {2 \, {\left (x^{2} + \log \left (\frac {x e^{2} + 2}{x}\right )^{2}\right )}}{x}\right )} + x^{2} + 2 \, {\left (x^{2} + 2 \, x\right )} e^{\left (\frac {x^{2} + \log \left (\frac {x e^{2} + 2}{x}\right )^{2}}{x}\right )} + 4 \, x + 4} \] Input:

integrate((((2*exp(2)*x+4)*log((exp(2)*x+2)/x)^2+8*log((exp(2)*x+2)/x)+(-2 
*x^3-x^2)*exp(2)-4*x^2-2*x)*exp((log((exp(2)*x+2)/x)^2+x^2)/x)+(-x^2+2*x)* 
exp(2)+4-2*x)/((x^4*exp(2)+2*x^3)*exp((log((exp(2)*x+2)/x)^2+x^2)/x)^3+((3 
*x^4+6*x^3)*exp(2)+6*x^3+12*x^2)*exp((log((exp(2)*x+2)/x)^2+x^2)/x)^2+((3* 
x^4+12*x^3+12*x^2)*exp(2)+6*x^3+24*x^2+24*x)*exp((log((exp(2)*x+2)/x)^2+x^ 
2)/x)+(x^4+6*x^3+12*x^2+8*x)*exp(2)+2*x^3+12*x^2+24*x+16),x, algorithm="fr 
icas")
 

Output:

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

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 61 vs. \(2 (24) = 48\).

Time = 0.33 (sec) , antiderivative size = 61, normalized size of antiderivative = 1.97 \[ \int \frac {4-2 x+e^2 \left (2 x-x^2\right )+e^{\frac {x^2+\log ^2\left (\frac {2+e^2 x}{x}\right )}{x}} \left (-2 x-4 x^2+e^2 \left (-x^2-2 x^3\right )+8 \log \left (\frac {2+e^2 x}{x}\right )+\left (4+2 e^2 x\right ) \log ^2\left (\frac {2+e^2 x}{x}\right )\right )}{16+24 x+12 x^2+2 x^3+e^2 \left (8 x+12 x^2+6 x^3+x^4\right )+e^{\frac {3 \left (x^2+\log ^2\left (\frac {2+e^2 x}{x}\right )\right )}{x}} \left (2 x^3+e^2 x^4\right )+e^{\frac {2 \left (x^2+\log ^2\left (\frac {2+e^2 x}{x}\right )\right )}{x}} \left (12 x^2+6 x^3+e^2 \left (6 x^3+3 x^4\right )\right )+e^{\frac {x^2+\log ^2\left (\frac {2+e^2 x}{x}\right )}{x}} \left (24 x+24 x^2+6 x^3+e^2 \left (12 x^2+12 x^3+3 x^4\right )\right )} \, dx=\frac {x}{x^{2} e^{\frac {2 \left (x^{2} + \log {\left (\frac {x e^{2} + 2}{x} \right )}^{2}\right )}{x}} + x^{2} + 4 x + \left (2 x^{2} + 4 x\right ) e^{\frac {x^{2} + \log {\left (\frac {x e^{2} + 2}{x} \right )}^{2}}{x}} + 4} \] Input:

integrate((((2*exp(2)*x+4)*ln((exp(2)*x+2)/x)**2+8*ln((exp(2)*x+2)/x)+(-2* 
x**3-x**2)*exp(2)-4*x**2-2*x)*exp((ln((exp(2)*x+2)/x)**2+x**2)/x)+(-x**2+2 
*x)*exp(2)+4-2*x)/((x**4*exp(2)+2*x**3)*exp((ln((exp(2)*x+2)/x)**2+x**2)/x 
)**3+((3*x**4+6*x**3)*exp(2)+6*x**3+12*x**2)*exp((ln((exp(2)*x+2)/x)**2+x* 
*2)/x)**2+((3*x**4+12*x**3+12*x**2)*exp(2)+6*x**3+24*x**2+24*x)*exp((ln((e 
xp(2)*x+2)/x)**2+x**2)/x)+(x**4+6*x**3+12*x**2+8*x)*exp(2)+2*x**3+12*x**2+ 
24*x+16),x)
 

Output:

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

Maxima [B] (verification not implemented)

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

Time = 5.97 (sec) , antiderivative size = 123, normalized size of antiderivative = 3.97 \[ \int \frac {4-2 x+e^2 \left (2 x-x^2\right )+e^{\frac {x^2+\log ^2\left (\frac {2+e^2 x}{x}\right )}{x}} \left (-2 x-4 x^2+e^2 \left (-x^2-2 x^3\right )+8 \log \left (\frac {2+e^2 x}{x}\right )+\left (4+2 e^2 x\right ) \log ^2\left (\frac {2+e^2 x}{x}\right )\right )}{16+24 x+12 x^2+2 x^3+e^2 \left (8 x+12 x^2+6 x^3+x^4\right )+e^{\frac {3 \left (x^2+\log ^2\left (\frac {2+e^2 x}{x}\right )\right )}{x}} \left (2 x^3+e^2 x^4\right )+e^{\frac {2 \left (x^2+\log ^2\left (\frac {2+e^2 x}{x}\right )\right )}{x}} \left (12 x^2+6 x^3+e^2 \left (6 x^3+3 x^4\right )\right )+e^{\frac {x^2+\log ^2\left (\frac {2+e^2 x}{x}\right )}{x}} \left (24 x+24 x^2+6 x^3+e^2 \left (12 x^2+12 x^3+3 x^4\right )\right )} \, dx=\frac {x e^{\left (\frac {4 \, \log \left (x e^{2} + 2\right ) \log \left (x\right )}{x}\right )}}{x^{2} e^{\left (2 \, x + \frac {2 \, \log \left (x e^{2} + 2\right )^{2}}{x} + \frac {2 \, \log \left (x\right )^{2}}{x}\right )} + 2 \, {\left (x^{2} + 2 \, x\right )} e^{\left (x + \frac {\log \left (x e^{2} + 2\right )^{2}}{x} + \frac {2 \, \log \left (x e^{2} + 2\right ) \log \left (x\right )}{x} + \frac {\log \left (x\right )^{2}}{x}\right )} + {\left (x^{2} + 4 \, x + 4\right )} e^{\left (\frac {4 \, \log \left (x e^{2} + 2\right ) \log \left (x\right )}{x}\right )}} \] Input:

integrate((((2*exp(2)*x+4)*log((exp(2)*x+2)/x)^2+8*log((exp(2)*x+2)/x)+(-2 
*x^3-x^2)*exp(2)-4*x^2-2*x)*exp((log((exp(2)*x+2)/x)^2+x^2)/x)+(-x^2+2*x)* 
exp(2)+4-2*x)/((x^4*exp(2)+2*x^3)*exp((log((exp(2)*x+2)/x)^2+x^2)/x)^3+((3 
*x^4+6*x^3)*exp(2)+6*x^3+12*x^2)*exp((log((exp(2)*x+2)/x)^2+x^2)/x)^2+((3* 
x^4+12*x^3+12*x^2)*exp(2)+6*x^3+24*x^2+24*x)*exp((log((exp(2)*x+2)/x)^2+x^ 
2)/x)+(x^4+6*x^3+12*x^2+8*x)*exp(2)+2*x^3+12*x^2+24*x+16),x, algorithm="ma 
xima")
 

Output:

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

Giac [B] (verification not implemented)

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

Time = 30.71 (sec) , antiderivative size = 91, normalized size of antiderivative = 2.94 \[ \int \frac {4-2 x+e^2 \left (2 x-x^2\right )+e^{\frac {x^2+\log ^2\left (\frac {2+e^2 x}{x}\right )}{x}} \left (-2 x-4 x^2+e^2 \left (-x^2-2 x^3\right )+8 \log \left (\frac {2+e^2 x}{x}\right )+\left (4+2 e^2 x\right ) \log ^2\left (\frac {2+e^2 x}{x}\right )\right )}{16+24 x+12 x^2+2 x^3+e^2 \left (8 x+12 x^2+6 x^3+x^4\right )+e^{\frac {3 \left (x^2+\log ^2\left (\frac {2+e^2 x}{x}\right )\right )}{x}} \left (2 x^3+e^2 x^4\right )+e^{\frac {2 \left (x^2+\log ^2\left (\frac {2+e^2 x}{x}\right )\right )}{x}} \left (12 x^2+6 x^3+e^2 \left (6 x^3+3 x^4\right )\right )+e^{\frac {x^2+\log ^2\left (\frac {2+e^2 x}{x}\right )}{x}} \left (24 x+24 x^2+6 x^3+e^2 \left (12 x^2+12 x^3+3 x^4\right )\right )} \, dx=\frac {x}{x^{2} e^{\left (\frac {2 \, {\left (x^{2} + \log \left (\frac {x e^{2} + 2}{x}\right )^{2}\right )}}{x}\right )} + 2 \, x^{2} e^{\left (\frac {x^{2} + \log \left (\frac {x e^{2} + 2}{x}\right )^{2}}{x}\right )} + x^{2} + 4 \, x e^{\left (\frac {x^{2} + \log \left (\frac {x e^{2} + 2}{x}\right )^{2}}{x}\right )} + 4 \, x + 4} \] Input:

integrate((((2*exp(2)*x+4)*log((exp(2)*x+2)/x)^2+8*log((exp(2)*x+2)/x)+(-2 
*x^3-x^2)*exp(2)-4*x^2-2*x)*exp((log((exp(2)*x+2)/x)^2+x^2)/x)+(-x^2+2*x)* 
exp(2)+4-2*x)/((x^4*exp(2)+2*x^3)*exp((log((exp(2)*x+2)/x)^2+x^2)/x)^3+((3 
*x^4+6*x^3)*exp(2)+6*x^3+12*x^2)*exp((log((exp(2)*x+2)/x)^2+x^2)/x)^2+((3* 
x^4+12*x^3+12*x^2)*exp(2)+6*x^3+24*x^2+24*x)*exp((log((exp(2)*x+2)/x)^2+x^ 
2)/x)+(x^4+6*x^3+12*x^2+8*x)*exp(2)+2*x^3+12*x^2+24*x+16),x, algorithm="gi 
ac")
 

Output:

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

Mupad [B] (verification not implemented)

Time = 9.44 (sec) , antiderivative size = 452, normalized size of antiderivative = 14.58 \[ \int \frac {4-2 x+e^2 \left (2 x-x^2\right )+e^{\frac {x^2+\log ^2\left (\frac {2+e^2 x}{x}\right )}{x}} \left (-2 x-4 x^2+e^2 \left (-x^2-2 x^3\right )+8 \log \left (\frac {2+e^2 x}{x}\right )+\left (4+2 e^2 x\right ) \log ^2\left (\frac {2+e^2 x}{x}\right )\right )}{16+24 x+12 x^2+2 x^3+e^2 \left (8 x+12 x^2+6 x^3+x^4\right )+e^{\frac {3 \left (x^2+\log ^2\left (\frac {2+e^2 x}{x}\right )\right )}{x}} \left (2 x^3+e^2 x^4\right )+e^{\frac {2 \left (x^2+\log ^2\left (\frac {2+e^2 x}{x}\right )\right )}{x}} \left (12 x^2+6 x^3+e^2 \left (6 x^3+3 x^4\right )\right )+e^{\frac {x^2+\log ^2\left (\frac {2+e^2 x}{x}\right )}{x}} \left (24 x+24 x^2+6 x^3+e^2 \left (12 x^2+12 x^3+3 x^4\right )\right )} \, dx=-\frac {{\left ({\mathrm {e}}^2\,x^2+2\,x\right )}^2\,\left (4\,x-8\,\ln \left (\frac {x\,{\mathrm {e}}^2+2}{x}\right )-4\,x\,\ln \left (\frac {x\,{\mathrm {e}}^2+2}{x}\right )-2\,x\,{\ln \left (\frac {x\,{\mathrm {e}}^2+2}{x}\right )}^2+2\,x^2\,{\mathrm {e}}^2+2\,x^3\,{\mathrm {e}}^2+x^4\,{\mathrm {e}}^2-4\,{\ln \left (\frac {x\,{\mathrm {e}}^2+2}{x}\right )}^2+4\,x^2+2\,x^3-x^2\,{\ln \left (\frac {x\,{\mathrm {e}}^2+2}{x}\right )}^2\,{\mathrm {e}}^2-2\,x\,{\ln \left (\frac {x\,{\mathrm {e}}^2+2}{x}\right )}^2\,{\mathrm {e}}^2\right )}{\left (x\,{\mathrm {e}}^2+2\right )\,\left ({\left (x+2\right )}^2+x^2\,{\mathrm {e}}^{2\,x+\frac {2\,{\ln \left (\frac {x\,{\mathrm {e}}^2+2}{x}\right )}^2}{x}}+2\,x\,{\mathrm {e}}^{x+\frac {{\ln \left (\frac {x\,{\mathrm {e}}^2+2}{x}\right )}^2}{x}}\,\left (x+2\right )\right )\,\left (16\,x\,\ln \left (\frac {x\,{\mathrm {e}}^2+2}{x}\right )+8\,x\,{\ln \left (\frac {x\,{\mathrm {e}}^2+2}{x}\right )}^2+8\,x^2\,\ln \left (\frac {x\,{\mathrm {e}}^2+2}{x}\right )-8\,x^3\,{\mathrm {e}}^2-8\,x^4\,{\mathrm {e}}^2-4\,x^5\,{\mathrm {e}}^2-2\,x^4\,{\mathrm {e}}^4-2\,x^5\,{\mathrm {e}}^4-x^6\,{\mathrm {e}}^4+4\,x^2\,{\ln \left (\frac {x\,{\mathrm {e}}^2+2}{x}\right )}^2-8\,x^2-8\,x^3-4\,x^4+8\,x^2\,{\ln \left (\frac {x\,{\mathrm {e}}^2+2}{x}\right )}^2\,{\mathrm {e}}^2+4\,x^3\,{\ln \left (\frac {x\,{\mathrm {e}}^2+2}{x}\right )}^2\,{\mathrm {e}}^2+2\,x^3\,{\ln \left (\frac {x\,{\mathrm {e}}^2+2}{x}\right )}^2\,{\mathrm {e}}^4+x^4\,{\ln \left (\frac {x\,{\mathrm {e}}^2+2}{x}\right )}^2\,{\mathrm {e}}^4+8\,x^2\,\ln \left (\frac {x\,{\mathrm {e}}^2+2}{x}\right )\,{\mathrm {e}}^2+4\,x^3\,\ln \left (\frac {x\,{\mathrm {e}}^2+2}{x}\right )\,{\mathrm {e}}^2\right )} \] Input:

int(-(2*x - exp(2)*(2*x - x^2) + exp((log((x*exp(2) + 2)/x)^2 + x^2)/x)*(2 
*x - 8*log((x*exp(2) + 2)/x) + exp(2)*(x^2 + 2*x^3) - log((x*exp(2) + 2)/x 
)^2*(2*x*exp(2) + 4) + 4*x^2) - 4)/(24*x + exp((3*(log((x*exp(2) + 2)/x)^2 
 + x^2))/x)*(x^4*exp(2) + 2*x^3) + exp((2*(log((x*exp(2) + 2)/x)^2 + x^2)) 
/x)*(exp(2)*(6*x^3 + 3*x^4) + 12*x^2 + 6*x^3) + exp((log((x*exp(2) + 2)/x) 
^2 + x^2)/x)*(24*x + exp(2)*(12*x^2 + 12*x^3 + 3*x^4) + 24*x^2 + 6*x^3) + 
exp(2)*(8*x + 12*x^2 + 6*x^3 + x^4) + 12*x^2 + 2*x^3 + 16),x)
 

Output:

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

Reduce [B] (verification not implemented)

Time = 0.16 (sec) , antiderivative size = 100, normalized size of antiderivative = 3.23 \[ \int \frac {4-2 x+e^2 \left (2 x-x^2\right )+e^{\frac {x^2+\log ^2\left (\frac {2+e^2 x}{x}\right )}{x}} \left (-2 x-4 x^2+e^2 \left (-x^2-2 x^3\right )+8 \log \left (\frac {2+e^2 x}{x}\right )+\left (4+2 e^2 x\right ) \log ^2\left (\frac {2+e^2 x}{x}\right )\right )}{16+24 x+12 x^2+2 x^3+e^2 \left (8 x+12 x^2+6 x^3+x^4\right )+e^{\frac {3 \left (x^2+\log ^2\left (\frac {2+e^2 x}{x}\right )\right )}{x}} \left (2 x^3+e^2 x^4\right )+e^{\frac {2 \left (x^2+\log ^2\left (\frac {2+e^2 x}{x}\right )\right )}{x}} \left (12 x^2+6 x^3+e^2 \left (6 x^3+3 x^4\right )\right )+e^{\frac {x^2+\log ^2\left (\frac {2+e^2 x}{x}\right )}{x}} \left (24 x+24 x^2+6 x^3+e^2 \left (12 x^2+12 x^3+3 x^4\right )\right )} \, dx=\frac {x}{e^{\frac {2 \mathrm {log}\left (\frac {e^{2} x +2}{x}\right )^{2}+2 x^{2}}{x}} x^{2}+2 e^{\frac {\mathrm {log}\left (\frac {e^{2} x +2}{x}\right )^{2}+x^{2}}{x}} x^{2}+4 e^{\frac {\mathrm {log}\left (\frac {e^{2} x +2}{x}\right )^{2}+x^{2}}{x}} x +x^{2}+4 x +4} \] Input:

int((((2*exp(2)*x+4)*log((exp(2)*x+2)/x)^2+8*log((exp(2)*x+2)/x)+(-2*x^3-x 
^2)*exp(2)-4*x^2-2*x)*exp((log((exp(2)*x+2)/x)^2+x^2)/x)+(-x^2+2*x)*exp(2) 
+4-2*x)/((x^4*exp(2)+2*x^3)*exp((log((exp(2)*x+2)/x)^2+x^2)/x)^3+((3*x^4+6 
*x^3)*exp(2)+6*x^3+12*x^2)*exp((log((exp(2)*x+2)/x)^2+x^2)/x)^2+((3*x^4+12 
*x^3+12*x^2)*exp(2)+6*x^3+24*x^2+24*x)*exp((log((exp(2)*x+2)/x)^2+x^2)/x)+ 
(x^4+6*x^3+12*x^2+8*x)*exp(2)+2*x^3+12*x^2+24*x+16),x)
 

Output:

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