3.12.79 \(\int \frac {e^{-x^2} (8 x-x^2+8 x^3-2 x^4+e^5 (4+8 x^2-2 x^3)+e^{x^2} (-2 e^{10}+6 x^2+e^5 (-4 x+2 x^2)+e^x (-8 x+5 x^2-x^3+e^5 (-4+4 x-x^2))))}{e^{10} x^2+2 e^5 x^3+x^4} \, dx\) [1179]

3.12.79.1 Optimal result
3.12.79.2 Mathematica [A] (verified)
3.12.79.3 Rubi [F]
3.12.79.4 Maple [A] (verified)
3.12.79.5 Fricas [A] (verification not implemented)
3.12.79.6 Sympy [B] (verification not implemented)
3.12.79.7 Maxima [A] (verification not implemented)
3.12.79.8 Giac [B] (verification not implemented)
3.12.79.9 Mupad [B] (verification not implemented)

3.12.79.1 Optimal result

Integrand size = 126, antiderivative size = 36 \begin {dmath*} \int \frac {e^{-x^2} \left (8 x-x^2+8 x^3-2 x^4+e^5 \left (4+8 x^2-2 x^3\right )+e^{x^2} \left (-2 e^{10}+6 x^2+e^5 \left (-4 x+2 x^2\right )+e^x \left (-8 x+5 x^2-x^3+e^5 \left (-4+4 x-x^2\right )\right )\right )\right )}{e^{10} x^2+2 e^5 x^3+x^4} \, dx=\frac {2-\frac {(4-x) \left (-e^x+e^{-x^2}+2 x\right )}{e^5+x}}{x} \end {dmath*}

output
(2-(2*x+1/exp(x^2)-exp(x))*(-x+4)/(exp(5)+x))/x
 
3.12.79.2 Mathematica [A] (verified)

Time = 10.11 (sec) , antiderivative size = 53, normalized size of antiderivative = 1.47 \begin {dmath*} \int \frac {e^{-x^2} \left (8 x-x^2+8 x^3-2 x^4+e^5 \left (4+8 x^2-2 x^3\right )+e^{x^2} \left (-2 e^{10}+6 x^2+e^5 \left (-4 x+2 x^2\right )+e^x \left (-8 x+5 x^2-x^3+e^5 \left (-4+4 x-x^2\right )\right )\right )\right )}{e^{10} x^2+2 e^5 x^3+x^4} \, dx=\frac {e^{-x^2} \left (-4-e^{x+x^2} (-4+x)-2 e^{5+x^2} (-1+x)+x-6 e^{x^2} x\right )}{x \left (e^5+x\right )} \end {dmath*}

input
Integrate[(8*x - x^2 + 8*x^3 - 2*x^4 + E^5*(4 + 8*x^2 - 2*x^3) + E^x^2*(-2 
*E^10 + 6*x^2 + E^5*(-4*x + 2*x^2) + E^x*(-8*x + 5*x^2 - x^3 + E^5*(-4 + 4 
*x - x^2))))/(E^x^2*(E^10*x^2 + 2*E^5*x^3 + x^4)),x]
 
output
(-4 - E^(x + x^2)*(-4 + x) - 2*E^(5 + x^2)*(-1 + x) + x - 6*E^x^2*x)/(E^x^ 
2*x*(E^5 + x))
 
3.12.79.3 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^{-x^2} \left (-2 x^4+8 x^3-x^2+e^5 \left (-2 x^3+8 x^2+4\right )+e^{x^2} \left (6 x^2+e^5 \left (2 x^2-4 x\right )+e^x \left (-x^3+5 x^2+e^5 \left (-x^2+4 x-4\right )-8 x\right )-2 e^{10}\right )+8 x\right )}{x^4+2 e^5 x^3+e^{10} x^2} \, dx\)

\(\Big \downarrow \) 2026

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

\(\Big \downarrow \) 2007

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

\(\Big \downarrow \) 7293

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

\(\Big \downarrow \) 2009

\(\displaystyle -2 e^5 \int \frac {e^{-x^2}}{x+e^5}dx+8 \int \frac {e^{-x^2}}{x+e^5}dx+2 \left (4-e^{15}\right ) \int \frac {e^{-x^2-10}}{x+e^5}dx-8 \int \frac {e^{-x^2-10}}{x+e^5}dx+4 e^5 \left (2+4 e^{10}+e^{15}\right ) \int \frac {e^{-x^2-5}}{x+e^5}dx-16 e^5 \int \frac {e^{-x^2-5}}{x+e^5}dx-16 e^5 \int \frac {e^{5-x^2}}{x+e^5}dx+4 \int \frac {e^{5-x^2}}{x+e^5}dx-4 e^5 \int \frac {e^{10-x^2}}{x+e^5}dx-\frac {2 \left (2+4 e^{10}+e^{15}\right ) \sqrt {\pi } \text {erf}(x)}{e^5}+2 e^{10} \sqrt {\pi } \text {erf}(x)+8 e^5 \sqrt {\pi } \text {erf}(x)+\frac {4 \sqrt {\pi } \text {erf}(x)}{e^5}-\frac {4 e^{-x^2-5}}{x}+\frac {e^{-x^2}}{x+e^5}+\frac {8 e^{-x^2-5}}{x+e^5}+\frac {8 e^{5-x^2}}{x+e^5}+\frac {2 e^{10-x^2}}{x+e^5}-\frac {2 \left (2+4 e^{10}+e^{15}\right ) e^{-x^2-5}}{x+e^5}+\frac {4 e^{x-5}}{x}+\frac {2}{x}-\frac {\left (4+e^5\right ) e^{x-5}}{x+e^5}-\frac {2 \left (4+e^5\right )}{x+e^5}\)

input
Int[(8*x - x^2 + 8*x^3 - 2*x^4 + E^5*(4 + 8*x^2 - 2*x^3) + E^x^2*(-2*E^10 
+ 6*x^2 + E^5*(-4*x + 2*x^2) + E^x*(-8*x + 5*x^2 - x^3 + E^5*(-4 + 4*x - x 
^2))))/(E^x^2*(E^10*x^2 + 2*E^5*x^3 + x^4)),x]
 
output
$Aborted
 

3.12.79.3.1 Defintions of rubi rules used

rule 2007
Int[(u_.)*(Px_)^(p_), x_Symbol] :> With[{a = Rt[Coeff[Px, x, 0], Expon[Px, 
x]], b = Rt[Coeff[Px, x, Expon[Px, x]], Expon[Px, x]]}, Int[u*(a + b*x)^(Ex 
pon[Px, x]*p), x] /; EqQ[Px, (a + b*x)^Expon[Px, x]]] /; IntegerQ[p] && Pol 
yQ[Px, x] && GtQ[Expon[Px, x], 1] && NeQ[Coeff[Px, x, 0], 0]
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 2026
Int[(Fx_.)*(Px_)^(p_.), x_Symbol] :> With[{r = Expon[Px, x, Min]}, Int[x^(p 
*r)*ExpandToSum[Px/x^r, x]^p*Fx, x] /; IGtQ[r, 0]] /; PolyQ[Px, x] && Integ 
erQ[p] &&  !MonomialQ[Px, x] && (ILtQ[p, 0] ||  !PolyQ[u, x])
 

rule 7293
Int[u_, x_Symbol] :> With[{v = ExpandIntegrand[u, x]}, Int[v, x] /; SumQ[v] 
]
 
3.12.79.4 Maple [A] (verified)

Time = 3.10 (sec) , antiderivative size = 57, normalized size of antiderivative = 1.58

method result size
norman \(\frac {\left (-4+x +\left (-2 \,{\mathrm e}^{5}-6\right ) x \,{\mathrm e}^{x^{2}}+2 \,{\mathrm e}^{5} {\mathrm e}^{x^{2}}+4 \,{\mathrm e}^{x} {\mathrm e}^{x^{2}}-x \,{\mathrm e}^{x} {\mathrm e}^{x^{2}}\right ) {\mathrm e}^{-x^{2}}}{x \left ({\mathrm e}^{5}+x \right )}\) \(57\)
risch \(\frac {\left (-2 \,{\mathrm e}^{5}-6\right ) x +2 \,{\mathrm e}^{5}}{\left ({\mathrm e}^{5}+x \right ) x}-\frac {\left (x -4\right ) {\mathrm e}^{x}}{\left ({\mathrm e}^{5}+x \right ) x}+\frac {\left (x -4\right ) {\mathrm e}^{-x^{2}}}{\left ({\mathrm e}^{5}+x \right ) x}\) \(60\)
parallelrisch \(\frac {\left (-4-2 \,{\mathrm e}^{5} {\mathrm e}^{x^{2}} x -x \,{\mathrm e}^{x} {\mathrm e}^{x^{2}}+2 \,{\mathrm e}^{5} {\mathrm e}^{x^{2}}-6 \,{\mathrm e}^{x^{2}} x +4 \,{\mathrm e}^{x} {\mathrm e}^{x^{2}}+x \right ) {\mathrm e}^{-x^{2}}}{x \left ({\mathrm e}^{5}+x \right )}\) \(61\)
parts \(\frac {\left (-2 \,{\mathrm e}^{5}-6\right ) x +2 \,{\mathrm e}^{5}}{\left ({\mathrm e}^{5}+x \right ) x}-\frac {{\mathrm e}^{x} {\mathrm e}^{5}}{{\mathrm e}^{5}+x}+\left (1-{\mathrm e}^{5}\right ) {\mathrm e}^{-{\mathrm e}^{5}} \operatorname {Ei}_{1}\left (-{\mathrm e}^{5}-x \right )-{\mathrm e}^{5} \left (-\frac {{\mathrm e}^{x}}{{\mathrm e}^{5}+x}-{\mathrm e}^{-{\mathrm e}^{5}} \operatorname {Ei}_{1}\left (-{\mathrm e}^{5}-x \right )\right )-\frac {5 \,{\mathrm e}^{x}}{{\mathrm e}^{5}+x}-5 \,{\mathrm e}^{-{\mathrm e}^{5}} \operatorname {Ei}_{1}\left (-{\mathrm e}^{5}-x \right )-\frac {8 \,{\mathrm e}^{x} {\mathrm e}^{-5}}{{\mathrm e}^{5}+x}+8 \left ({\mathrm e}^{-5}\right )^{2} \operatorname {Ei}_{1}\left (-x \right )-8 \left ({\mathrm e}^{-5}\right )^{2} \left ({\mathrm e}^{5}+1\right ) {\mathrm e}^{-{\mathrm e}^{5}} \operatorname {Ei}_{1}\left (-{\mathrm e}^{5}-x \right )-4 \,{\mathrm e}^{5} \left (-\frac {{\mathrm e}^{x} \left (2 x +{\mathrm e}^{5}\right ) {\mathrm e}^{-10}}{x \left ({\mathrm e}^{5}+x \right )}-\left ({\mathrm e}^{5}-2\right ) {\mathrm e}^{-10} {\mathrm e}^{-5} \operatorname {Ei}_{1}\left (-x \right )-{\mathrm e}^{-10} \left ({\mathrm e}^{5}+2\right ) {\mathrm e}^{-5} {\mathrm e}^{-{\mathrm e}^{5}} \operatorname {Ei}_{1}\left (-{\mathrm e}^{5}-x \right )\right )+4 \,{\mathrm e}^{5} \left (\frac {{\mathrm e}^{x} {\mathrm e}^{-5}}{{\mathrm e}^{5}+x}-\left ({\mathrm e}^{-5}\right )^{2} \operatorname {Ei}_{1}\left (-x \right )+\left ({\mathrm e}^{-5}\right )^{2} \left ({\mathrm e}^{5}+1\right ) {\mathrm e}^{-{\mathrm e}^{5}} \operatorname {Ei}_{1}\left (-{\mathrm e}^{5}-x \right )\right )+\frac {\left (x -4\right ) {\mathrm e}^{-x^{2}}}{\left ({\mathrm e}^{5}+x \right ) x}\) \(320\)

input
int(((((-x^2+4*x-4)*exp(5)-x^3+5*x^2-8*x)*exp(x)-2*exp(5)^2+(2*x^2-4*x)*ex 
p(5)+6*x^2)*exp(x^2)+(-2*x^3+8*x^2+4)*exp(5)-2*x^4+8*x^3-x^2+8*x)/(x^2*exp 
(5)^2+2*x^3*exp(5)+x^4)/exp(x^2),x,method=_RETURNVERBOSE)
 
output
(-4+x+(-2*exp(5)-6)*x*exp(x^2)+2*exp(5)*exp(x^2)+4*exp(x)*exp(x^2)-x*exp(x 
)*exp(x^2))/x/(exp(5)+x)/exp(x^2)
 
3.12.79.5 Fricas [A] (verification not implemented)

Time = 0.25 (sec) , antiderivative size = 45, normalized size of antiderivative = 1.25 \begin {dmath*} \int \frac {e^{-x^2} \left (8 x-x^2+8 x^3-2 x^4+e^5 \left (4+8 x^2-2 x^3\right )+e^{x^2} \left (-2 e^{10}+6 x^2+e^5 \left (-4 x+2 x^2\right )+e^x \left (-8 x+5 x^2-x^3+e^5 \left (-4+4 x-x^2\right )\right )\right )\right )}{e^{10} x^2+2 e^5 x^3+x^4} \, dx=-\frac {{\left ({\left (2 \, {\left (x - 1\right )} e^{5} + {\left (x - 4\right )} e^{x} + 6 \, x\right )} e^{\left (x^{2}\right )} - x + 4\right )} e^{\left (-x^{2}\right )}}{x^{2} + x e^{5}} \end {dmath*}

input
integrate(((((-x^2+4*x-4)*exp(5)-x^3+5*x^2-8*x)*exp(x)-2*exp(5)^2+(2*x^2-4 
*x)*exp(5)+6*x^2)*exp(x^2)+(-2*x^3+8*x^2+4)*exp(5)-2*x^4+8*x^3-x^2+8*x)/(x 
^2*exp(5)^2+2*x^3*exp(5)+x^4)/exp(x^2),x, algorithm=\
 
output
-((2*(x - 1)*e^5 + (x - 4)*e^x + 6*x)*e^(x^2) - x + 4)*e^(-x^2)/(x^2 + x*e 
^5)
 
3.12.79.6 Sympy [B] (verification not implemented)

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

Time = 0.40 (sec) , antiderivative size = 54, normalized size of antiderivative = 1.50 \begin {dmath*} \int \frac {e^{-x^2} \left (8 x-x^2+8 x^3-2 x^4+e^5 \left (4+8 x^2-2 x^3\right )+e^{x^2} \left (-2 e^{10}+6 x^2+e^5 \left (-4 x+2 x^2\right )+e^x \left (-8 x+5 x^2-x^3+e^5 \left (-4+4 x-x^2\right )\right )\right )\right )}{e^{10} x^2+2 e^5 x^3+x^4} \, dx=\frac {\left (4 - x\right ) e^{x}}{x^{2} + x e^{5}} + \frac {\left (x - 4\right ) e^{- x^{2}}}{x^{2} + x e^{5}} + \frac {x \left (- 2 e^{5} - 6\right ) + 2 e^{5}}{x^{2} + x e^{5}} \end {dmath*}

input
integrate(((((-x**2+4*x-4)*exp(5)-x**3+5*x**2-8*x)*exp(x)-2*exp(5)**2+(2*x 
**2-4*x)*exp(5)+6*x**2)*exp(x**2)+(-2*x**3+8*x**2+4)*exp(5)-2*x**4+8*x**3- 
x**2+8*x)/(x**2*exp(5)**2+2*x**3*exp(5)+x**4)/exp(x**2),x)
 
output
(4 - x)*exp(x)/(x**2 + x*exp(5)) + (x - 4)*exp(-x**2)/(x**2 + x*exp(5)) + 
(x*(-2*exp(5) - 6) + 2*exp(5))/(x**2 + x*exp(5))
 
3.12.79.7 Maxima [A] (verification not implemented)

Time = 0.25 (sec) , antiderivative size = 41, normalized size of antiderivative = 1.14 \begin {dmath*} \int \frac {e^{-x^2} \left (8 x-x^2+8 x^3-2 x^4+e^5 \left (4+8 x^2-2 x^3\right )+e^{x^2} \left (-2 e^{10}+6 x^2+e^5 \left (-4 x+2 x^2\right )+e^x \left (-8 x+5 x^2-x^3+e^5 \left (-4+4 x-x^2\right )\right )\right )\right )}{e^{10} x^2+2 e^5 x^3+x^4} \, dx=-\frac {2 \, x {\left (e^{5} + 3\right )} - {\left (x - 4\right )} e^{\left (-x^{2}\right )} + {\left (x - 4\right )} e^{x} - 2 \, e^{5}}{x^{2} + x e^{5}} \end {dmath*}

input
integrate(((((-x^2+4*x-4)*exp(5)-x^3+5*x^2-8*x)*exp(x)-2*exp(5)^2+(2*x^2-4 
*x)*exp(5)+6*x^2)*exp(x^2)+(-2*x^3+8*x^2+4)*exp(5)-2*x^4+8*x^3-x^2+8*x)/(x 
^2*exp(5)^2+2*x^3*exp(5)+x^4)/exp(x^2),x, algorithm=\
 
output
-(2*x*(e^5 + 3) - (x - 4)*e^(-x^2) + (x - 4)*e^x - 2*e^5)/(x^2 + x*e^5)
 
3.12.79.8 Giac [B] (verification not implemented)

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

Time = 0.29 (sec) , antiderivative size = 66, normalized size of antiderivative = 1.83 \begin {dmath*} \int \frac {e^{-x^2} \left (8 x-x^2+8 x^3-2 x^4+e^5 \left (4+8 x^2-2 x^3\right )+e^{x^2} \left (-2 e^{10}+6 x^2+e^5 \left (-4 x+2 x^2\right )+e^x \left (-8 x+5 x^2-x^3+e^5 \left (-4+4 x-x^2\right )\right )\right )\right )}{e^{10} x^2+2 e^5 x^3+x^4} \, dx=-\frac {x e^{\left (x^{2} + x\right )} + 2 \, x e^{\left (x^{2} + 5\right )} + 6 \, x e^{\left (x^{2}\right )} - x - 4 \, e^{\left (x^{2} + x\right )} - 2 \, e^{\left (x^{2} + 5\right )} + 4}{x^{2} e^{\left (x^{2}\right )} + x e^{\left (x^{2} + 5\right )}} \end {dmath*}

input
integrate(((((-x^2+4*x-4)*exp(5)-x^3+5*x^2-8*x)*exp(x)-2*exp(5)^2+(2*x^2-4 
*x)*exp(5)+6*x^2)*exp(x^2)+(-2*x^3+8*x^2+4)*exp(5)-2*x^4+8*x^3-x^2+8*x)/(x 
^2*exp(5)^2+2*x^3*exp(5)+x^4)/exp(x^2),x, algorithm=\
 
output
-(x*e^(x^2 + x) + 2*x*e^(x^2 + 5) + 6*x*e^(x^2) - x - 4*e^(x^2 + x) - 2*e^ 
(x^2 + 5) + 4)/(x^2*e^(x^2) + x*e^(x^2 + 5))
 
3.12.79.9 Mupad [B] (verification not implemented)

Time = 16.44 (sec) , antiderivative size = 49, normalized size of antiderivative = 1.36 \begin {dmath*} \int \frac {e^{-x^2} \left (8 x-x^2+8 x^3-2 x^4+e^5 \left (4+8 x^2-2 x^3\right )+e^{x^2} \left (-2 e^{10}+6 x^2+e^5 \left (-4 x+2 x^2\right )+e^x \left (-8 x+5 x^2-x^3+e^5 \left (-4+4 x-x^2\right )\right )\right )\right )}{e^{10} x^2+2 e^5 x^3+x^4} \, dx=-\frac {6\,x-2\,{\mathrm {e}}^5+4\,{\mathrm {e}}^{-x^2}-4\,{\mathrm {e}}^x+2\,x\,{\mathrm {e}}^5-x\,{\mathrm {e}}^{-x^2}+x\,{\mathrm {e}}^x}{x\,\left (x+{\mathrm {e}}^5\right )} \end {dmath*}

input
int((exp(-x^2)*(8*x - exp(x^2)*(2*exp(10) + exp(5)*(4*x - 2*x^2) + exp(x)* 
(8*x + exp(5)*(x^2 - 4*x + 4) - 5*x^2 + x^3) - 6*x^2) + exp(5)*(8*x^2 - 2* 
x^3 + 4) - x^2 + 8*x^3 - 2*x^4))/(2*x^3*exp(5) + x^2*exp(10) + x^4),x)
 
output
-(6*x - 2*exp(5) + 4*exp(-x^2) - 4*exp(x) + 2*x*exp(5) - x*exp(-x^2) + x*e 
xp(x))/(x*(x + exp(5)))