\(\int \frac {e^{2 x^2} (-96 x^2+24 x^3-24 e^x x^4)+e^{4 x^2} (-32 x^2+8 x^3-8 e^x x^4)+e^{x^2} (32 x^2-8 x^3+8 e^x x^4)+e^{3 x^2} (96 x^2-24 x^3+24 e^x x^4)+(20-30 x+5 x^2+15 e^x x^2+e^{x^2} (-16+24 x-4 x^2-12 e^x x^2)+e^{3 x^2} (-16+24 x-4 x^2-12 e^x x^2)+e^{4 x^2} (4-6 x+x^2+3 e^x x^2)+e^{2 x^2} (24-36 x+6 x^2+18 e^x x^2)) \log (5-4 e^{x^2}+6 e^{2 x^2}-4 e^{3 x^2}+e^{4 x^2})+(-5 e^x+4 e^{x+x^2}-6 e^{x+2 x^2}+4 e^{x+3 x^2}-e^{x+4 x^2}) \log ^2(5-4 e^{x^2}+6 e^{2 x^2}-4 e^{3 x^2}+e^{4 x^2})}{(5 e^x-4 e^{x+x^2}+6 e^{x+2 x^2}-4 e^{x+3 x^2}+e^{x+4 x^2}) \log ^2(5-4 e^{x^2}+6 e^{2 x^2}-4 e^{3 x^2}+e^{4 x^2})} \, dx\) [681]

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 = 433, antiderivative size = 37 \[ \int \frac {e^{2 x^2} \left (-96 x^2+24 x^3-24 e^x x^4\right )+e^{4 x^2} \left (-32 x^2+8 x^3-8 e^x x^4\right )+e^{x^2} \left (32 x^2-8 x^3+8 e^x x^4\right )+e^{3 x^2} \left (96 x^2-24 x^3+24 e^x x^4\right )+\left (20-30 x+5 x^2+15 e^x x^2+e^{x^2} \left (-16+24 x-4 x^2-12 e^x x^2\right )+e^{3 x^2} \left (-16+24 x-4 x^2-12 e^x x^2\right )+e^{4 x^2} \left (4-6 x+x^2+3 e^x x^2\right )+e^{2 x^2} \left (24-36 x+6 x^2+18 e^x x^2\right )\right ) \log \left (5-4 e^{x^2}+6 e^{2 x^2}-4 e^{3 x^2}+e^{4 x^2}\right )+\left (-5 e^x+4 e^{x+x^2}-6 e^{x+2 x^2}+4 e^{x+3 x^2}-e^{x+4 x^2}\right ) \log ^2\left (5-4 e^{x^2}+6 e^{2 x^2}-4 e^{3 x^2}+e^{4 x^2}\right )}{\left (5 e^x-4 e^{x+x^2}+6 e^{x+2 x^2}-4 e^{x+3 x^2}+e^{x+4 x^2}\right ) \log ^2\left (5-4 e^{x^2}+6 e^{2 x^2}-4 e^{3 x^2}+e^{4 x^2}\right )} \, dx=-x+\frac {x \left (e^{-x} (4-x)+x^2\right )}{\log \left (4+\left (1-e^{x^2}\right )^4\right )} \] Output:

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

Mathematica [A] (verified)

Time = 0.13 (sec) , antiderivative size = 59, normalized size of antiderivative = 1.59 \[ \int \frac {e^{2 x^2} \left (-96 x^2+24 x^3-24 e^x x^4\right )+e^{4 x^2} \left (-32 x^2+8 x^3-8 e^x x^4\right )+e^{x^2} \left (32 x^2-8 x^3+8 e^x x^4\right )+e^{3 x^2} \left (96 x^2-24 x^3+24 e^x x^4\right )+\left (20-30 x+5 x^2+15 e^x x^2+e^{x^2} \left (-16+24 x-4 x^2-12 e^x x^2\right )+e^{3 x^2} \left (-16+24 x-4 x^2-12 e^x x^2\right )+e^{4 x^2} \left (4-6 x+x^2+3 e^x x^2\right )+e^{2 x^2} \left (24-36 x+6 x^2+18 e^x x^2\right )\right ) \log \left (5-4 e^{x^2}+6 e^{2 x^2}-4 e^{3 x^2}+e^{4 x^2}\right )+\left (-5 e^x+4 e^{x+x^2}-6 e^{x+2 x^2}+4 e^{x+3 x^2}-e^{x+4 x^2}\right ) \log ^2\left (5-4 e^{x^2}+6 e^{2 x^2}-4 e^{3 x^2}+e^{4 x^2}\right )}{\left (5 e^x-4 e^{x+x^2}+6 e^{x+2 x^2}-4 e^{x+3 x^2}+e^{x+4 x^2}\right ) \log ^2\left (5-4 e^{x^2}+6 e^{2 x^2}-4 e^{3 x^2}+e^{4 x^2}\right )} \, dx=x \left (-1+\frac {e^{-x} \left (4-x+e^x x^2\right )}{\log \left (5-4 e^{x^2}+6 e^{2 x^2}-4 e^{3 x^2}+e^{4 x^2}\right )}\right ) \] Input:

Integrate[(E^(2*x^2)*(-96*x^2 + 24*x^3 - 24*E^x*x^4) + E^(4*x^2)*(-32*x^2 
+ 8*x^3 - 8*E^x*x^4) + E^x^2*(32*x^2 - 8*x^3 + 8*E^x*x^4) + E^(3*x^2)*(96* 
x^2 - 24*x^3 + 24*E^x*x^4) + (20 - 30*x + 5*x^2 + 15*E^x*x^2 + E^x^2*(-16 
+ 24*x - 4*x^2 - 12*E^x*x^2) + E^(3*x^2)*(-16 + 24*x - 4*x^2 - 12*E^x*x^2) 
 + E^(4*x^2)*(4 - 6*x + x^2 + 3*E^x*x^2) + E^(2*x^2)*(24 - 36*x + 6*x^2 + 
18*E^x*x^2))*Log[5 - 4*E^x^2 + 6*E^(2*x^2) - 4*E^(3*x^2) + E^(4*x^2)] + (- 
5*E^x + 4*E^(x + x^2) - 6*E^(x + 2*x^2) + 4*E^(x + 3*x^2) - E^(x + 4*x^2)) 
*Log[5 - 4*E^x^2 + 6*E^(2*x^2) - 4*E^(3*x^2) + E^(4*x^2)]^2)/((5*E^x - 4*E 
^(x + x^2) + 6*E^(x + 2*x^2) - 4*E^(x + 3*x^2) + E^(x + 4*x^2))*Log[5 - 4* 
E^x^2 + 6*E^(2*x^2) - 4*E^(3*x^2) + E^(4*x^2)]^2),x]
 

Output:

x*(-1 + (4 - x + E^x*x^2)/(E^x*Log[5 - 4*E^x^2 + 6*E^(2*x^2) - 4*E^(3*x^2) 
 + E^(4*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 {\left (4 e^{x^2+x}-6 e^{2 x^2+x}+4 e^{3 x^2+x}-e^{4 x^2+x}-5 e^x\right ) \log ^2\left (-4 e^{x^2}+6 e^{2 x^2}-4 e^{3 x^2}+e^{4 x^2}+5\right )+\left (15 e^x x^2+5 x^2+e^{x^2} \left (-12 e^x x^2-4 x^2+24 x-16\right )+e^{3 x^2} \left (-12 e^x x^2-4 x^2+24 x-16\right )+e^{4 x^2} \left (3 e^x x^2+x^2-6 x+4\right )+e^{2 x^2} \left (18 e^x x^2+6 x^2-36 x+24\right )-30 x+20\right ) \log \left (-4 e^{x^2}+6 e^{2 x^2}-4 e^{3 x^2}+e^{4 x^2}+5\right )+e^{2 x^2} \left (-24 e^x x^4+24 x^3-96 x^2\right )+e^{4 x^2} \left (-8 e^x x^4+8 x^3-32 x^2\right )+e^{x^2} \left (8 e^x x^4-8 x^3+32 x^2\right )+e^{3 x^2} \left (24 e^x x^4-24 x^3+96 x^2\right )}{\left (-4 e^{x^2+x}+6 e^{2 x^2+x}-4 e^{3 x^2+x}+e^{4 x^2+x}+5 e^x\right ) \log ^2\left (-4 e^{x^2}+6 e^{2 x^2}-4 e^{3 x^2}+e^{4 x^2}+5\right )} \, dx\)

\(\Big \downarrow \) 7292

\(\displaystyle \int \frac {e^{-x} \left (\left (4 e^{x^2+x}-6 e^{2 x^2+x}+4 e^{3 x^2+x}-e^{4 x^2+x}-5 e^x\right ) \log ^2\left (-4 e^{x^2}+6 e^{2 x^2}-4 e^{3 x^2}+e^{4 x^2}+5\right )+\left (15 e^x x^2+5 x^2+e^{x^2} \left (-12 e^x x^2-4 x^2+24 x-16\right )+e^{3 x^2} \left (-12 e^x x^2-4 x^2+24 x-16\right )+e^{4 x^2} \left (3 e^x x^2+x^2-6 x+4\right )+e^{2 x^2} \left (18 e^x x^2+6 x^2-36 x+24\right )-30 x+20\right ) \log \left (-4 e^{x^2}+6 e^{2 x^2}-4 e^{3 x^2}+e^{4 x^2}+5\right )+e^{2 x^2} \left (-24 e^x x^4+24 x^3-96 x^2\right )+e^{4 x^2} \left (-8 e^x x^4+8 x^3-32 x^2\right )+e^{x^2} \left (8 e^x x^4-8 x^3+32 x^2\right )+e^{3 x^2} \left (24 e^x x^4-24 x^3+96 x^2\right )\right )}{\left (-4 e^{x^2}+6 e^{2 x^2}-4 e^{3 x^2}+e^{4 x^2}+5\right ) \log ^2\left (-4 e^{x^2}+6 e^{2 x^2}-4 e^{3 x^2}+e^{4 x^2}+5\right )}dx\)

\(\Big \downarrow \) 7293

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

\(\Big \downarrow \) 7239

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

\(\Big \downarrow \) 7293

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

\(\Big \downarrow \) 7299

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

Input:

Int[(E^(2*x^2)*(-96*x^2 + 24*x^3 - 24*E^x*x^4) + E^(4*x^2)*(-32*x^2 + 8*x^ 
3 - 8*E^x*x^4) + E^x^2*(32*x^2 - 8*x^3 + 8*E^x*x^4) + E^(3*x^2)*(96*x^2 - 
24*x^3 + 24*E^x*x^4) + (20 - 30*x + 5*x^2 + 15*E^x*x^2 + E^x^2*(-16 + 24*x 
 - 4*x^2 - 12*E^x*x^2) + E^(3*x^2)*(-16 + 24*x - 4*x^2 - 12*E^x*x^2) + E^( 
4*x^2)*(4 - 6*x + x^2 + 3*E^x*x^2) + E^(2*x^2)*(24 - 36*x + 6*x^2 + 18*E^x 
*x^2))*Log[5 - 4*E^x^2 + 6*E^(2*x^2) - 4*E^(3*x^2) + E^(4*x^2)] + (-5*E^x 
+ 4*E^(x + x^2) - 6*E^(x + 2*x^2) + 4*E^(x + 3*x^2) - E^(x + 4*x^2))*Log[5 
 - 4*E^x^2 + 6*E^(2*x^2) - 4*E^(3*x^2) + E^(4*x^2)]^2)/((5*E^x - 4*E^(x + 
x^2) + 6*E^(x + 2*x^2) - 4*E^(x + 3*x^2) + E^(x + 4*x^2))*Log[5 - 4*E^x^2 
+ 6*E^(2*x^2) - 4*E^(3*x^2) + E^(4*x^2)]^2),x]
 

Output:

$Aborted
 
Maple [A] (verified)

Time = 250.59 (sec) , antiderivative size = 55, normalized size of antiderivative = 1.49

method result size
risch \(-x +\frac {\left ({\mathrm e}^{x} x^{2}-x +4\right ) x \,{\mathrm e}^{-x}}{\ln \left ({\mathrm e}^{4 x^{2}}-4 \,{\mathrm e}^{3 x^{2}}+6 \,{\mathrm e}^{2 x^{2}}-4 \,{\mathrm e}^{x^{2}}+5\right )}\) \(55\)
parallelrisch \(\frac {\left (8 \,{\mathrm e}^{x} x^{3}-8 \ln \left ({\mathrm e}^{4 x^{2}}-4 \,{\mathrm e}^{3 x^{2}}+6 \,{\mathrm e}^{2 x^{2}}-4 \,{\mathrm e}^{x^{2}}+5\right ) {\mathrm e}^{x} x -8 x^{2}+32 x \right ) {\mathrm e}^{-x}}{8 \ln \left ({\mathrm e}^{4 x^{2}}-4 \,{\mathrm e}^{3 x^{2}}+6 \,{\mathrm e}^{2 x^{2}}-4 \,{\mathrm e}^{x^{2}}+5\right )}\) \(92\)

Input:

int(((-exp(x)*exp(x^2)^4+4*exp(x)*exp(x^2)^3-6*exp(x)*exp(x^2)^2+4*exp(x)* 
exp(x^2)-5*exp(x))*ln(exp(x^2)^4-4*exp(x^2)^3+6*exp(x^2)^2-4*exp(x^2)+5)^2 
+((3*exp(x)*x^2+x^2-6*x+4)*exp(x^2)^4+(-12*exp(x)*x^2-4*x^2+24*x-16)*exp(x 
^2)^3+(18*exp(x)*x^2+6*x^2-36*x+24)*exp(x^2)^2+(-12*exp(x)*x^2-4*x^2+24*x- 
16)*exp(x^2)+15*exp(x)*x^2+5*x^2-30*x+20)*ln(exp(x^2)^4-4*exp(x^2)^3+6*exp 
(x^2)^2-4*exp(x^2)+5)+(-8*exp(x)*x^4+8*x^3-32*x^2)*exp(x^2)^4+(24*exp(x)*x 
^4-24*x^3+96*x^2)*exp(x^2)^3+(-24*exp(x)*x^4+24*x^3-96*x^2)*exp(x^2)^2+(8* 
exp(x)*x^4-8*x^3+32*x^2)*exp(x^2))/(exp(x)*exp(x^2)^4-4*exp(x)*exp(x^2)^3+ 
6*exp(x)*exp(x^2)^2-4*exp(x)*exp(x^2)+5*exp(x))/ln(exp(x^2)^4-4*exp(x^2)^3 
+6*exp(x^2)^2-4*exp(x^2)+5)^2,x,method=_RETURNVERBOSE)
 

Output:

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

Fricas [B] (verification not implemented)

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

Time = 0.12 (sec) , antiderivative size = 202, normalized size of antiderivative = 5.46 \[ \int \frac {e^{2 x^2} \left (-96 x^2+24 x^3-24 e^x x^4\right )+e^{4 x^2} \left (-32 x^2+8 x^3-8 e^x x^4\right )+e^{x^2} \left (32 x^2-8 x^3+8 e^x x^4\right )+e^{3 x^2} \left (96 x^2-24 x^3+24 e^x x^4\right )+\left (20-30 x+5 x^2+15 e^x x^2+e^{x^2} \left (-16+24 x-4 x^2-12 e^x x^2\right )+e^{3 x^2} \left (-16+24 x-4 x^2-12 e^x x^2\right )+e^{4 x^2} \left (4-6 x+x^2+3 e^x x^2\right )+e^{2 x^2} \left (24-36 x+6 x^2+18 e^x x^2\right )\right ) \log \left (5-4 e^{x^2}+6 e^{2 x^2}-4 e^{3 x^2}+e^{4 x^2}\right )+\left (-5 e^x+4 e^{x+x^2}-6 e^{x+2 x^2}+4 e^{x+3 x^2}-e^{x+4 x^2}\right ) \log ^2\left (5-4 e^{x^2}+6 e^{2 x^2}-4 e^{3 x^2}+e^{4 x^2}\right )}{\left (5 e^x-4 e^{x+x^2}+6 e^{x+2 x^2}-4 e^{x+3 x^2}+e^{x+4 x^2}\right ) \log ^2\left (5-4 e^{x^2}+6 e^{2 x^2}-4 e^{3 x^2}+e^{4 x^2}\right )} \, dx=\frac {{\left (x^{3} e^{\left (12 \, x^{2} + 4 \, x\right )} - x e^{\left (12 \, x^{2} + 4 \, x\right )} \log \left ({\left (e^{\left (16 \, x^{2} + 4 \, x\right )} - 4 \, e^{\left (15 \, x^{2} + 4 \, x\right )} + 6 \, e^{\left (14 \, x^{2} + 4 \, x\right )} - 4 \, e^{\left (13 \, x^{2} + 4 \, x\right )} + 5 \, e^{\left (12 \, x^{2} + 4 \, x\right )}\right )} e^{\left (-12 \, x^{2} - 4 \, x\right )}\right ) - {\left (x^{2} - 4 \, x\right )} e^{\left (12 \, x^{2} + 3 \, x\right )}\right )} e^{\left (-12 \, x^{2} - 4 \, x\right )}}{\log \left ({\left (e^{\left (16 \, x^{2} + 4 \, x\right )} - 4 \, e^{\left (15 \, x^{2} + 4 \, x\right )} + 6 \, e^{\left (14 \, x^{2} + 4 \, x\right )} - 4 \, e^{\left (13 \, x^{2} + 4 \, x\right )} + 5 \, e^{\left (12 \, x^{2} + 4 \, x\right )}\right )} e^{\left (-12 \, x^{2} - 4 \, x\right )}\right )} \] Input:

integrate(((-exp(x)*exp(x^2)^4+4*exp(x)*exp(x^2)^3-6*exp(x)*exp(x^2)^2+4*e 
xp(x)*exp(x^2)-5*exp(x))*log(exp(x^2)^4-4*exp(x^2)^3+6*exp(x^2)^2-4*exp(x^ 
2)+5)^2+((3*exp(x)*x^2+x^2-6*x+4)*exp(x^2)^4+(-12*exp(x)*x^2-4*x^2+24*x-16 
)*exp(x^2)^3+(18*exp(x)*x^2+6*x^2-36*x+24)*exp(x^2)^2+(-12*exp(x)*x^2-4*x^ 
2+24*x-16)*exp(x^2)+15*exp(x)*x^2+5*x^2-30*x+20)*log(exp(x^2)^4-4*exp(x^2) 
^3+6*exp(x^2)^2-4*exp(x^2)+5)+(-8*exp(x)*x^4+8*x^3-32*x^2)*exp(x^2)^4+(24* 
exp(x)*x^4-24*x^3+96*x^2)*exp(x^2)^3+(-24*exp(x)*x^4+24*x^3-96*x^2)*exp(x^ 
2)^2+(8*exp(x)*x^4-8*x^3+32*x^2)*exp(x^2))/(exp(x)*exp(x^2)^4-4*exp(x)*exp 
(x^2)^3+6*exp(x)*exp(x^2)^2-4*exp(x)*exp(x^2)+5*exp(x))/log(exp(x^2)^4-4*e 
xp(x^2)^3+6*exp(x^2)^2-4*exp(x^2)+5)^2,x, algorithm="fricas")
 

Output:

(x^3*e^(12*x^2 + 4*x) - x*e^(12*x^2 + 4*x)*log((e^(16*x^2 + 4*x) - 4*e^(15 
*x^2 + 4*x) + 6*e^(14*x^2 + 4*x) - 4*e^(13*x^2 + 4*x) + 5*e^(12*x^2 + 4*x) 
)*e^(-12*x^2 - 4*x)) - (x^2 - 4*x)*e^(12*x^2 + 3*x))*e^(-12*x^2 - 4*x)/log 
((e^(16*x^2 + 4*x) - 4*e^(15*x^2 + 4*x) + 6*e^(14*x^2 + 4*x) - 4*e^(13*x^2 
 + 4*x) + 5*e^(12*x^2 + 4*x))*e^(-12*x^2 - 4*x))
 

Sympy [B] (verification not implemented)

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

Time = 0.40 (sec) , antiderivative size = 51, normalized size of antiderivative = 1.38 \[ \int \frac {e^{2 x^2} \left (-96 x^2+24 x^3-24 e^x x^4\right )+e^{4 x^2} \left (-32 x^2+8 x^3-8 e^x x^4\right )+e^{x^2} \left (32 x^2-8 x^3+8 e^x x^4\right )+e^{3 x^2} \left (96 x^2-24 x^3+24 e^x x^4\right )+\left (20-30 x+5 x^2+15 e^x x^2+e^{x^2} \left (-16+24 x-4 x^2-12 e^x x^2\right )+e^{3 x^2} \left (-16+24 x-4 x^2-12 e^x x^2\right )+e^{4 x^2} \left (4-6 x+x^2+3 e^x x^2\right )+e^{2 x^2} \left (24-36 x+6 x^2+18 e^x x^2\right )\right ) \log \left (5-4 e^{x^2}+6 e^{2 x^2}-4 e^{3 x^2}+e^{4 x^2}\right )+\left (-5 e^x+4 e^{x+x^2}-6 e^{x+2 x^2}+4 e^{x+3 x^2}-e^{x+4 x^2}\right ) \log ^2\left (5-4 e^{x^2}+6 e^{2 x^2}-4 e^{3 x^2}+e^{4 x^2}\right )}{\left (5 e^x-4 e^{x+x^2}+6 e^{x+2 x^2}-4 e^{x+3 x^2}+e^{x+4 x^2}\right ) \log ^2\left (5-4 e^{x^2}+6 e^{2 x^2}-4 e^{3 x^2}+e^{4 x^2}\right )} \, dx=- x + \frac {\left (x^{3} e^{x} - x^{2} + 4 x\right ) e^{- x}}{\log {\left (e^{4 x^{2}} - 4 e^{3 x^{2}} + 6 e^{2 x^{2}} - 4 e^{x^{2}} + 5 \right )}} \] Input:

integrate(((-exp(x)*exp(x**2)**4+4*exp(x)*exp(x**2)**3-6*exp(x)*exp(x**2)* 
*2+4*exp(x)*exp(x**2)-5*exp(x))*ln(exp(x**2)**4-4*exp(x**2)**3+6*exp(x**2) 
**2-4*exp(x**2)+5)**2+((3*exp(x)*x**2+x**2-6*x+4)*exp(x**2)**4+(-12*exp(x) 
*x**2-4*x**2+24*x-16)*exp(x**2)**3+(18*exp(x)*x**2+6*x**2-36*x+24)*exp(x** 
2)**2+(-12*exp(x)*x**2-4*x**2+24*x-16)*exp(x**2)+15*exp(x)*x**2+5*x**2-30* 
x+20)*ln(exp(x**2)**4-4*exp(x**2)**3+6*exp(x**2)**2-4*exp(x**2)+5)+(-8*exp 
(x)*x**4+8*x**3-32*x**2)*exp(x**2)**4+(24*exp(x)*x**4-24*x**3+96*x**2)*exp 
(x**2)**3+(-24*exp(x)*x**4+24*x**3-96*x**2)*exp(x**2)**2+(8*exp(x)*x**4-8* 
x**3+32*x**2)*exp(x**2))/(exp(x)*exp(x**2)**4-4*exp(x)*exp(x**2)**3+6*exp( 
x)*exp(x**2)**2-4*exp(x)*exp(x**2)+5*exp(x))/ln(exp(x**2)**4-4*exp(x**2)** 
3+6*exp(x**2)**2-4*exp(x**2)+5)**2,x)
 

Output:

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

Maxima [B] (verification not implemented)

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

Time = 0.17 (sec) , antiderivative size = 83, normalized size of antiderivative = 2.24 \[ \int \frac {e^{2 x^2} \left (-96 x^2+24 x^3-24 e^x x^4\right )+e^{4 x^2} \left (-32 x^2+8 x^3-8 e^x x^4\right )+e^{x^2} \left (32 x^2-8 x^3+8 e^x x^4\right )+e^{3 x^2} \left (96 x^2-24 x^3+24 e^x x^4\right )+\left (20-30 x+5 x^2+15 e^x x^2+e^{x^2} \left (-16+24 x-4 x^2-12 e^x x^2\right )+e^{3 x^2} \left (-16+24 x-4 x^2-12 e^x x^2\right )+e^{4 x^2} \left (4-6 x+x^2+3 e^x x^2\right )+e^{2 x^2} \left (24-36 x+6 x^2+18 e^x x^2\right )\right ) \log \left (5-4 e^{x^2}+6 e^{2 x^2}-4 e^{3 x^2}+e^{4 x^2}\right )+\left (-5 e^x+4 e^{x+x^2}-6 e^{x+2 x^2}+4 e^{x+3 x^2}-e^{x+4 x^2}\right ) \log ^2\left (5-4 e^{x^2}+6 e^{2 x^2}-4 e^{3 x^2}+e^{4 x^2}\right )}{\left (5 e^x-4 e^{x+x^2}+6 e^{x+2 x^2}-4 e^{x+3 x^2}+e^{x+4 x^2}\right ) \log ^2\left (5-4 e^{x^2}+6 e^{2 x^2}-4 e^{3 x^2}+e^{4 x^2}\right )} \, dx=\frac {x^{3} e^{x} - x e^{x} \log \left (e^{\left (2 \, x^{2}\right )} - 4 \, e^{\left (x^{2}\right )} + 5\right ) - x e^{x} \log \left (e^{\left (2 \, x^{2}\right )} + 1\right ) - x^{2} + 4 \, x}{e^{x} \log \left (e^{\left (2 \, x^{2}\right )} - 4 \, e^{\left (x^{2}\right )} + 5\right ) + e^{x} \log \left (e^{\left (2 \, x^{2}\right )} + 1\right )} \] Input:

integrate(((-exp(x)*exp(x^2)^4+4*exp(x)*exp(x^2)^3-6*exp(x)*exp(x^2)^2+4*e 
xp(x)*exp(x^2)-5*exp(x))*log(exp(x^2)^4-4*exp(x^2)^3+6*exp(x^2)^2-4*exp(x^ 
2)+5)^2+((3*exp(x)*x^2+x^2-6*x+4)*exp(x^2)^4+(-12*exp(x)*x^2-4*x^2+24*x-16 
)*exp(x^2)^3+(18*exp(x)*x^2+6*x^2-36*x+24)*exp(x^2)^2+(-12*exp(x)*x^2-4*x^ 
2+24*x-16)*exp(x^2)+15*exp(x)*x^2+5*x^2-30*x+20)*log(exp(x^2)^4-4*exp(x^2) 
^3+6*exp(x^2)^2-4*exp(x^2)+5)+(-8*exp(x)*x^4+8*x^3-32*x^2)*exp(x^2)^4+(24* 
exp(x)*x^4-24*x^3+96*x^2)*exp(x^2)^3+(-24*exp(x)*x^4+24*x^3-96*x^2)*exp(x^ 
2)^2+(8*exp(x)*x^4-8*x^3+32*x^2)*exp(x^2))/(exp(x)*exp(x^2)^4-4*exp(x)*exp 
(x^2)^3+6*exp(x)*exp(x^2)^2-4*exp(x)*exp(x^2)+5*exp(x))/log(exp(x^2)^4-4*e 
xp(x^2)^3+6*exp(x^2)^2-4*exp(x^2)+5)^2,x, algorithm="maxima")
 

Output:

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

Giac [B] (verification not implemented)

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

Time = 0.53 (sec) , antiderivative size = 83, normalized size of antiderivative = 2.24 \[ \int \frac {e^{2 x^2} \left (-96 x^2+24 x^3-24 e^x x^4\right )+e^{4 x^2} \left (-32 x^2+8 x^3-8 e^x x^4\right )+e^{x^2} \left (32 x^2-8 x^3+8 e^x x^4\right )+e^{3 x^2} \left (96 x^2-24 x^3+24 e^x x^4\right )+\left (20-30 x+5 x^2+15 e^x x^2+e^{x^2} \left (-16+24 x-4 x^2-12 e^x x^2\right )+e^{3 x^2} \left (-16+24 x-4 x^2-12 e^x x^2\right )+e^{4 x^2} \left (4-6 x+x^2+3 e^x x^2\right )+e^{2 x^2} \left (24-36 x+6 x^2+18 e^x x^2\right )\right ) \log \left (5-4 e^{x^2}+6 e^{2 x^2}-4 e^{3 x^2}+e^{4 x^2}\right )+\left (-5 e^x+4 e^{x+x^2}-6 e^{x+2 x^2}+4 e^{x+3 x^2}-e^{x+4 x^2}\right ) \log ^2\left (5-4 e^{x^2}+6 e^{2 x^2}-4 e^{3 x^2}+e^{4 x^2}\right )}{\left (5 e^x-4 e^{x+x^2}+6 e^{x+2 x^2}-4 e^{x+3 x^2}+e^{x+4 x^2}\right ) \log ^2\left (5-4 e^{x^2}+6 e^{2 x^2}-4 e^{3 x^2}+e^{4 x^2}\right )} \, dx=\frac {x^{3} e^{x} - x e^{x} \log \left (e^{\left (2 \, x^{2}\right )} - 4 \, e^{\left (x^{2}\right )} + 5\right ) - x e^{x} \log \left (e^{\left (2 \, x^{2}\right )} + 1\right ) - x^{2} + 4 \, x}{e^{x} \log \left (e^{\left (2 \, x^{2}\right )} - 4 \, e^{\left (x^{2}\right )} + 5\right ) + e^{x} \log \left (e^{\left (2 \, x^{2}\right )} + 1\right )} \] Input:

integrate(((-exp(x)*exp(x^2)^4+4*exp(x)*exp(x^2)^3-6*exp(x)*exp(x^2)^2+4*e 
xp(x)*exp(x^2)-5*exp(x))*log(exp(x^2)^4-4*exp(x^2)^3+6*exp(x^2)^2-4*exp(x^ 
2)+5)^2+((3*exp(x)*x^2+x^2-6*x+4)*exp(x^2)^4+(-12*exp(x)*x^2-4*x^2+24*x-16 
)*exp(x^2)^3+(18*exp(x)*x^2+6*x^2-36*x+24)*exp(x^2)^2+(-12*exp(x)*x^2-4*x^ 
2+24*x-16)*exp(x^2)+15*exp(x)*x^2+5*x^2-30*x+20)*log(exp(x^2)^4-4*exp(x^2) 
^3+6*exp(x^2)^2-4*exp(x^2)+5)+(-8*exp(x)*x^4+8*x^3-32*x^2)*exp(x^2)^4+(24* 
exp(x)*x^4-24*x^3+96*x^2)*exp(x^2)^3+(-24*exp(x)*x^4+24*x^3-96*x^2)*exp(x^ 
2)^2+(8*exp(x)*x^4-8*x^3+32*x^2)*exp(x^2))/(exp(x)*exp(x^2)^4-4*exp(x)*exp 
(x^2)^3+6*exp(x)*exp(x^2)^2-4*exp(x)*exp(x^2)+5*exp(x))/log(exp(x^2)^4-4*e 
xp(x^2)^3+6*exp(x^2)^2-4*exp(x^2)+5)^2,x, algorithm="giac")
 

Output:

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

Mupad [B] (verification not implemented)

Time = 4.91 (sec) , antiderivative size = 343, normalized size of antiderivative = 9.27 \[ \int \frac {e^{2 x^2} \left (-96 x^2+24 x^3-24 e^x x^4\right )+e^{4 x^2} \left (-32 x^2+8 x^3-8 e^x x^4\right )+e^{x^2} \left (32 x^2-8 x^3+8 e^x x^4\right )+e^{3 x^2} \left (96 x^2-24 x^3+24 e^x x^4\right )+\left (20-30 x+5 x^2+15 e^x x^2+e^{x^2} \left (-16+24 x-4 x^2-12 e^x x^2\right )+e^{3 x^2} \left (-16+24 x-4 x^2-12 e^x x^2\right )+e^{4 x^2} \left (4-6 x+x^2+3 e^x x^2\right )+e^{2 x^2} \left (24-36 x+6 x^2+18 e^x x^2\right )\right ) \log \left (5-4 e^{x^2}+6 e^{2 x^2}-4 e^{3 x^2}+e^{4 x^2}\right )+\left (-5 e^x+4 e^{x+x^2}-6 e^{x+2 x^2}+4 e^{x+3 x^2}-e^{x+4 x^2}\right ) \log ^2\left (5-4 e^{x^2}+6 e^{2 x^2}-4 e^{3 x^2}+e^{4 x^2}\right )}{\left (5 e^x-4 e^{x+x^2}+6 e^{x+2 x^2}-4 e^{x+3 x^2}+e^{x+4 x^2}\right ) \log ^2\left (5-4 e^{x^2}+6 e^{2 x^2}-4 e^{3 x^2}+e^{4 x^2}\right )} \, dx=\frac {x\,{\mathrm {e}}^{-x}\,\left (x^2\,{\mathrm {e}}^x-x+4\right )-\frac {{\mathrm {e}}^{-x^2-x}\,\ln \left (6\,{\mathrm {e}}^{2\,x^2}-4\,{\mathrm {e}}^{x^2}-4\,{\mathrm {e}}^{3\,x^2}+{\mathrm {e}}^{4\,x^2}+5\right )\,\left (3\,x^2\,{\mathrm {e}}^x-6\,x+x^2+4\right )\,\left (6\,{\mathrm {e}}^{2\,x^2}-4\,{\mathrm {e}}^{x^2}-4\,{\mathrm {e}}^{3\,x^2}+{\mathrm {e}}^{4\,x^2}+5\right )}{8\,x\,{\left ({\mathrm {e}}^{x^2}-1\right )}^3}}{\ln \left (6\,{\mathrm {e}}^{2\,x^2}-4\,{\mathrm {e}}^{x^2}-4\,{\mathrm {e}}^{3\,x^2}+{\mathrm {e}}^{4\,x^2}+5\right )}-\frac {5\,x}{8}-\frac {{\mathrm {e}}^{-x^2-x}\,\left (\frac {15\,x^2\,{\mathrm {e}}^x}{8}-\frac {15\,x}{4}+\frac {5\,x^2}{8}+\frac {5}{2}\right )}{x}+\frac {{\mathrm {e}}^{-x}\,\left (\frac {x^2}{8}-\frac {3\,x}{4}+\frac {1}{2}\right )}{x}+\frac {{\mathrm {e}}^{-x}\,\left (3\,x^4\,{\mathrm {e}}^x+4\,x^2-6\,x^3+x^4\right )}{2\,x^3\,\left (3\,{\mathrm {e}}^{x^2}-3\,{\mathrm {e}}^{2\,x^2}+{\mathrm {e}}^{3\,x^2}-1\right )}-\frac {{\mathrm {e}}^{-x}\,\left (3\,x^4\,{\mathrm {e}}^x+4\,x^2-6\,x^3+x^4\right )}{2\,x^3\,\left ({\mathrm {e}}^{2\,x^2}-2\,{\mathrm {e}}^{x^2}+1\right )}+\frac {{\mathrm {e}}^{-x}\,\left (3\,x^4\,{\mathrm {e}}^x+4\,x^2-6\,x^3+x^4\right )}{2\,x^3\,\left ({\mathrm {e}}^{x^2}-1\right )} \] Input:

int((log(6*exp(2*x^2) - 4*exp(x^2) - 4*exp(3*x^2) + exp(4*x^2) + 5)*(15*x^ 
2*exp(x) - 30*x + exp(4*x^2)*(3*x^2*exp(x) - 6*x + x^2 + 4) - exp(x^2)*(12 
*x^2*exp(x) - 24*x + 4*x^2 + 16) - exp(3*x^2)*(12*x^2*exp(x) - 24*x + 4*x^ 
2 + 16) + exp(2*x^2)*(18*x^2*exp(x) - 36*x + 6*x^2 + 24) + 5*x^2 + 20) - l 
og(6*exp(2*x^2) - 4*exp(x^2) - 4*exp(3*x^2) + exp(4*x^2) + 5)^2*(5*exp(x) 
- 4*exp(x^2)*exp(x) + 6*exp(2*x^2)*exp(x) - 4*exp(3*x^2)*exp(x) + exp(4*x^ 
2)*exp(x)) + exp(x^2)*(8*x^4*exp(x) + 32*x^2 - 8*x^3) - exp(4*x^2)*(8*x^4* 
exp(x) + 32*x^2 - 8*x^3) - exp(2*x^2)*(24*x^4*exp(x) + 96*x^2 - 24*x^3) + 
exp(3*x^2)*(24*x^4*exp(x) + 96*x^2 - 24*x^3))/(log(6*exp(2*x^2) - 4*exp(x^ 
2) - 4*exp(3*x^2) + exp(4*x^2) + 5)^2*(5*exp(x) - 4*exp(x^2)*exp(x) + 6*ex 
p(2*x^2)*exp(x) - 4*exp(3*x^2)*exp(x) + exp(4*x^2)*exp(x))),x)
 

Output:

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

Reduce [B] (verification not implemented)

Time = 0.55 (sec) , antiderivative size = 96, normalized size of antiderivative = 2.59 \[ \int \frac {e^{2 x^2} \left (-96 x^2+24 x^3-24 e^x x^4\right )+e^{4 x^2} \left (-32 x^2+8 x^3-8 e^x x^4\right )+e^{x^2} \left (32 x^2-8 x^3+8 e^x x^4\right )+e^{3 x^2} \left (96 x^2-24 x^3+24 e^x x^4\right )+\left (20-30 x+5 x^2+15 e^x x^2+e^{x^2} \left (-16+24 x-4 x^2-12 e^x x^2\right )+e^{3 x^2} \left (-16+24 x-4 x^2-12 e^x x^2\right )+e^{4 x^2} \left (4-6 x+x^2+3 e^x x^2\right )+e^{2 x^2} \left (24-36 x+6 x^2+18 e^x x^2\right )\right ) \log \left (5-4 e^{x^2}+6 e^{2 x^2}-4 e^{3 x^2}+e^{4 x^2}\right )+\left (-5 e^x+4 e^{x+x^2}-6 e^{x+2 x^2}+4 e^{x+3 x^2}-e^{x+4 x^2}\right ) \log ^2\left (5-4 e^{x^2}+6 e^{2 x^2}-4 e^{3 x^2}+e^{4 x^2}\right )}{\left (5 e^x-4 e^{x+x^2}+6 e^{x+2 x^2}-4 e^{x+3 x^2}+e^{x+4 x^2}\right ) \log ^2\left (5-4 e^{x^2}+6 e^{2 x^2}-4 e^{3 x^2}+e^{4 x^2}\right )} \, dx=\frac {x \left (-e^{x} \mathrm {log}\left (e^{4 x^{2}}-4 e^{3 x^{2}}+6 e^{2 x^{2}}-4 e^{x^{2}}+5\right )+e^{x} x^{2}-x +4\right )}{e^{x} \mathrm {log}\left (e^{4 x^{2}}-4 e^{3 x^{2}}+6 e^{2 x^{2}}-4 e^{x^{2}}+5\right )} \] Input:

int(((-exp(x)*exp(x^2)^4+4*exp(x)*exp(x^2)^3-6*exp(x)*exp(x^2)^2+4*exp(x)* 
exp(x^2)-5*exp(x))*log(exp(x^2)^4-4*exp(x^2)^3+6*exp(x^2)^2-4*exp(x^2)+5)^ 
2+((3*exp(x)*x^2+x^2-6*x+4)*exp(x^2)^4+(-12*exp(x)*x^2-4*x^2+24*x-16)*exp( 
x^2)^3+(18*exp(x)*x^2+6*x^2-36*x+24)*exp(x^2)^2+(-12*exp(x)*x^2-4*x^2+24*x 
-16)*exp(x^2)+15*exp(x)*x^2+5*x^2-30*x+20)*log(exp(x^2)^4-4*exp(x^2)^3+6*e 
xp(x^2)^2-4*exp(x^2)+5)+(-8*exp(x)*x^4+8*x^3-32*x^2)*exp(x^2)^4+(24*exp(x) 
*x^4-24*x^3+96*x^2)*exp(x^2)^3+(-24*exp(x)*x^4+24*x^3-96*x^2)*exp(x^2)^2+( 
8*exp(x)*x^4-8*x^3+32*x^2)*exp(x^2))/(exp(x)*exp(x^2)^4-4*exp(x)*exp(x^2)^ 
3+6*exp(x)*exp(x^2)^2-4*exp(x)*exp(x^2)+5*exp(x))/log(exp(x^2)^4-4*exp(x^2 
)^3+6*exp(x^2)^2-4*exp(x^2)+5)^2,x)
 

Output:

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