Integrand size = 93, antiderivative size = 34 \[ \int \frac {e^{\frac {1}{2} \left (-x+2 x^2-x^3-e^x \left (1-2 x+x^2\right )\right )} \left (-2+5 e^{\frac {1}{2} \left (x-2 x^2+x^3+e^x \left (1-2 x+x^2\right )\right )}-x+4 x^2-3 x^3+e^x \left (x-x^3\right )\right )}{x^2} \, dx=e^4-\frac {5}{x}-\frac {-2 e^{-\frac {1}{2} (-1+x)^2 \left (e^x+x\right )}+x}{x} \] Output:
exp(4)-(x-2/exp((-1+x)^2*(1/2*exp(x)+1/2*x)))/x-5/x
Time = 0.16 (sec) , antiderivative size = 24, normalized size of antiderivative = 0.71 \[ \int \frac {e^{\frac {1}{2} \left (-x+2 x^2-x^3-e^x \left (1-2 x+x^2\right )\right )} \left (-2+5 e^{\frac {1}{2} \left (x-2 x^2+x^3+e^x \left (1-2 x+x^2\right )\right )}-x+4 x^2-3 x^3+e^x \left (x-x^3\right )\right )}{x^2} \, dx=\frac {-5+2 e^{-\frac {1}{2} (-1+x)^2 \left (e^x+x\right )}}{x} \] Input:
Integrate[(E^((-x + 2*x^2 - x^3 - E^x*(1 - 2*x + x^2))/2)*(-2 + 5*E^((x - 2*x^2 + x^3 + E^x*(1 - 2*x + x^2))/2) - x + 4*x^2 - 3*x^3 + E^x*(x - x^3)) )/x^2,x]
Output:
(-5 + 2/E^(((-1 + x)^2*(E^x + x))/2))/x
Leaf count is larger than twice the leaf count of optimal. \(82\) vs. \(2(34)=68\).
Time = 15.97 (sec) , antiderivative size = 82, normalized size of antiderivative = 2.41, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.032, Rules used = {7292, 7293, 2009}
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 (-3 x^3+e^x \left (x-x^3\right )+4 x^2+5 e^{\frac {1}{2} \left (x^3-2 x^2+e^x \left (x^2-2 x+1\right )+x\right )}-x-2\right ) \exp \left (\frac {1}{2} \left (-x^3+2 x^2-e^x \left (x^2-2 x+1\right )-x\right )\right )}{x^2} \, dx\) |
\(\Big \downarrow \) 7292 |
\(\displaystyle \int \frac {e^{-\frac {1}{2} (x-1)^2 \left (x+e^x\right )} \left (-3 x^3+e^x \left (x-x^3\right )+4 x^2+5 e^{\frac {1}{2} \left (x^3-2 x^2+e^x \left (x^2-2 x+1\right )+x\right )}-x-2\right )}{x^2}dx\) |
\(\Big \downarrow \) 7293 |
\(\displaystyle \int \left (\frac {5}{x^2}-\frac {e^{-\frac {1}{2} (x-1)^2 \left (x+e^x\right )} \left (e^x x^3+3 x^3-4 x^2-e^x x+x+2\right )}{x^2}\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {2 e^{-\frac {1}{2} (1-x)^2 \left (x+e^x\right )} \left (e^x x^3+3 x^3-4 x^2-e^x x+x\right )}{x^2 \left (\left (e^x+1\right ) (1-x)^2-2 (1-x) \left (x+e^x\right )\right )}-\frac {5}{x}\) |
Input:
Int[(E^((-x + 2*x^2 - x^3 - E^x*(1 - 2*x + x^2))/2)*(-2 + 5*E^((x - 2*x^2 + x^3 + E^x*(1 - 2*x + x^2))/2) - x + 4*x^2 - 3*x^3 + E^x*(x - x^3)))/x^2, x]
Output:
-5/x + (2*(x - E^x*x - 4*x^2 + 3*x^3 + E^x*x^3))/(E^(((1 - x)^2*(E^x + x)) /2)*x^2*((1 + E^x)*(1 - x)^2 - 2*(1 - x)*(E^x + x)))
Time = 0.22 (sec) , antiderivative size = 24, normalized size of antiderivative = 0.71
method | result | size |
risch | \(-\frac {5}{x}+\frac {2 \,{\mathrm e}^{-\frac {\left (-1+x \right )^{2} \left ({\mathrm e}^{x}+x \right )}{2}}}{x}\) | \(24\) |
norman | \(\frac {\left (2-5 \,{\mathrm e}^{\frac {\left (x^{2}-2 x +1\right ) {\mathrm e}^{x}}{2}+\frac {x^{3}}{2}-x^{2}+\frac {x}{2}}\right ) {\mathrm e}^{-\frac {\left (x^{2}-2 x +1\right ) {\mathrm e}^{x}}{2}-\frac {x^{3}}{2}+x^{2}-\frac {x}{2}}}{x}\) | \(65\) |
parallelrisch | \(\frac {\left (4-10 \,{\mathrm e}^{\frac {\left (x^{2}-2 x +1\right ) {\mathrm e}^{x}}{2}+\frac {x^{3}}{2}-x^{2}+\frac {x}{2}}\right ) {\mathrm e}^{-\frac {\left (x^{2}-2 x +1\right ) {\mathrm e}^{x}}{2}-\frac {x^{3}}{2}+x^{2}-\frac {x}{2}}}{2 x}\) | \(66\) |
Input:
int((5*exp(1/2*(x^2-2*x+1)*exp(x)+1/2*x^3-x^2+1/2*x)+(-x^3+x)*exp(x)-3*x^3 +4*x^2-x-2)/x^2/exp(1/2*(x^2-2*x+1)*exp(x)+1/2*x^3-x^2+1/2*x),x,method=_RE TURNVERBOSE)
Output:
-5/x+2/x*exp(-1/2*(-1+x)^2*(exp(x)+x))
Leaf count of result is larger than twice the leaf count of optimal. 61 vs. \(2 (29) = 58\).
Time = 0.07 (sec) , antiderivative size = 61, normalized size of antiderivative = 1.79 \[ \int \frac {e^{\frac {1}{2} \left (-x+2 x^2-x^3-e^x \left (1-2 x+x^2\right )\right )} \left (-2+5 e^{\frac {1}{2} \left (x-2 x^2+x^3+e^x \left (1-2 x+x^2\right )\right )}-x+4 x^2-3 x^3+e^x \left (x-x^3\right )\right )}{x^2} \, dx=-\frac {{\left (5 \, e^{\left (\frac {1}{2} \, x^{3} - x^{2} + \frac {1}{2} \, {\left (x^{2} - 2 \, x + 1\right )} e^{x} + \frac {1}{2} \, x\right )} - 2\right )} e^{\left (-\frac {1}{2} \, x^{3} + x^{2} - \frac {1}{2} \, {\left (x^{2} - 2 \, x + 1\right )} e^{x} - \frac {1}{2} \, x\right )}}{x} \] Input:
integrate((5*exp(1/2*(x^2-2*x+1)*exp(x)+1/2*x^3-x^2+1/2*x)+(-x^3+x)*exp(x) -3*x^3+4*x^2-x-2)/x^2/exp(1/2*(x^2-2*x+1)*exp(x)+1/2*x^3-x^2+1/2*x),x, alg orithm="fricas")
Output:
-(5*e^(1/2*x^3 - x^2 + 1/2*(x^2 - 2*x + 1)*e^x + 1/2*x) - 2)*e^(-1/2*x^3 + x^2 - 1/2*(x^2 - 2*x + 1)*e^x - 1/2*x)/x
Time = 0.12 (sec) , antiderivative size = 32, normalized size of antiderivative = 0.94 \[ \int \frac {e^{\frac {1}{2} \left (-x+2 x^2-x^3-e^x \left (1-2 x+x^2\right )\right )} \left (-2+5 e^{\frac {1}{2} \left (x-2 x^2+x^3+e^x \left (1-2 x+x^2\right )\right )}-x+4 x^2-3 x^3+e^x \left (x-x^3\right )\right )}{x^2} \, dx=\frac {2 e^{- \frac {x^{3}}{2} + x^{2} - \frac {x}{2} - \left (\frac {x^{2}}{2} - x + \frac {1}{2}\right ) e^{x}}}{x} - \frac {5}{x} \] Input:
integrate((5*exp(1/2*(x**2-2*x+1)*exp(x)+1/2*x**3-x**2+1/2*x)+(-x**3+x)*ex p(x)-3*x**3+4*x**2-x-2)/x**2/exp(1/2*(x**2-2*x+1)*exp(x)+1/2*x**3-x**2+1/2 *x),x)
Output:
2*exp(-x**3/2 + x**2 - x/2 - (x**2/2 - x + 1/2)*exp(x))/x - 5/x
\[ \int \frac {e^{\frac {1}{2} \left (-x+2 x^2-x^3-e^x \left (1-2 x+x^2\right )\right )} \left (-2+5 e^{\frac {1}{2} \left (x-2 x^2+x^3+e^x \left (1-2 x+x^2\right )\right )}-x+4 x^2-3 x^3+e^x \left (x-x^3\right )\right )}{x^2} \, dx=\int { -\frac {{\left (3 \, x^{3} - 4 \, x^{2} + {\left (x^{3} - x\right )} e^{x} + x - 5 \, e^{\left (\frac {1}{2} \, x^{3} - x^{2} + \frac {1}{2} \, {\left (x^{2} - 2 \, x + 1\right )} e^{x} + \frac {1}{2} \, x\right )} + 2\right )} e^{\left (-\frac {1}{2} \, x^{3} + x^{2} - \frac {1}{2} \, {\left (x^{2} - 2 \, x + 1\right )} e^{x} - \frac {1}{2} \, x\right )}}{x^{2}} \,d x } \] Input:
integrate((5*exp(1/2*(x^2-2*x+1)*exp(x)+1/2*x^3-x^2+1/2*x)+(-x^3+x)*exp(x) -3*x^3+4*x^2-x-2)/x^2/exp(1/2*(x^2-2*x+1)*exp(x)+1/2*x^3-x^2+1/2*x),x, alg orithm="maxima")
Output:
-5/x - integrate(((x^3 - x)*e^(x^2 + x) + (3*x^3 - 4*x^2 + x + 2)*e^(x^2)) *e^(-1/2*x^3 - 1/2*x^2*e^x + x*e^x - 1/2*x - 1/2*e^x)/x^2, x)
\[ \int \frac {e^{\frac {1}{2} \left (-x+2 x^2-x^3-e^x \left (1-2 x+x^2\right )\right )} \left (-2+5 e^{\frac {1}{2} \left (x-2 x^2+x^3+e^x \left (1-2 x+x^2\right )\right )}-x+4 x^2-3 x^3+e^x \left (x-x^3\right )\right )}{x^2} \, dx=\int { -\frac {{\left (3 \, x^{3} - 4 \, x^{2} + {\left (x^{3} - x\right )} e^{x} + x - 5 \, e^{\left (\frac {1}{2} \, x^{3} - x^{2} + \frac {1}{2} \, {\left (x^{2} - 2 \, x + 1\right )} e^{x} + \frac {1}{2} \, x\right )} + 2\right )} e^{\left (-\frac {1}{2} \, x^{3} + x^{2} - \frac {1}{2} \, {\left (x^{2} - 2 \, x + 1\right )} e^{x} - \frac {1}{2} \, x\right )}}{x^{2}} \,d x } \] Input:
integrate((5*exp(1/2*(x^2-2*x+1)*exp(x)+1/2*x^3-x^2+1/2*x)+(-x^3+x)*exp(x) -3*x^3+4*x^2-x-2)/x^2/exp(1/2*(x^2-2*x+1)*exp(x)+1/2*x^3-x^2+1/2*x),x, alg orithm="giac")
Output:
integrate(-(3*x^3 - 4*x^2 + (x^3 - x)*e^x + x - 5*e^(1/2*x^3 - x^2 + 1/2*( x^2 - 2*x + 1)*e^x + 1/2*x) + 2)*e^(-1/2*x^3 + x^2 - 1/2*(x^2 - 2*x + 1)*e ^x - 1/2*x)/x^2, x)
Time = 1.64 (sec) , antiderivative size = 39, normalized size of antiderivative = 1.15 \[ \int \frac {e^{\frac {1}{2} \left (-x+2 x^2-x^3-e^x \left (1-2 x+x^2\right )\right )} \left (-2+5 e^{\frac {1}{2} \left (x-2 x^2+x^3+e^x \left (1-2 x+x^2\right )\right )}-x+4 x^2-3 x^3+e^x \left (x-x^3\right )\right )}{x^2} \, dx=\frac {2\,{\mathrm {e}}^{x\,{\mathrm {e}}^x-\frac {{\mathrm {e}}^x}{2}-\frac {x^2\,{\mathrm {e}}^x}{2}-\frac {x}{2}+x^2-\frac {x^3}{2}}}{x}-\frac {5}{x} \] Input:
int(-(exp(x^2 - (exp(x)*(x^2 - 2*x + 1))/2 - x/2 - x^3/2)*(x - 5*exp(x/2 + (exp(x)*(x^2 - 2*x + 1))/2 - x^2 + x^3/2) - exp(x)*(x - x^3) - 4*x^2 + 3* x^3 + 2))/x^2,x)
Output:
(2*exp(x*exp(x) - exp(x)/2 - (x^2*exp(x))/2 - x/2 + x^2 - x^3/2))/x - 5/x
Time = 0.18 (sec) , antiderivative size = 70, normalized size of antiderivative = 2.06 \[ \int \frac {e^{\frac {1}{2} \left (-x+2 x^2-x^3-e^x \left (1-2 x+x^2\right )\right )} \left (-2+5 e^{\frac {1}{2} \left (x-2 x^2+x^3+e^x \left (1-2 x+x^2\right )\right )}-x+4 x^2-3 x^3+e^x \left (x-x^3\right )\right )}{x^2} \, dx=\frac {2 e^{e^{x} x +x^{2}}-5 e^{\frac {e^{x} x^{2}}{2}+\frac {e^{x}}{2}+\frac {x^{3}}{2}+\frac {x}{2}}}{e^{\frac {e^{x} x^{2}}{2}+\frac {e^{x}}{2}+\frac {x^{3}}{2}+\frac {x}{2}} x} \] Input:
int((5*exp(1/2*(x^2-2*x+1)*exp(x)+1/2*x^3-x^2+1/2*x)+(-x^3+x)*exp(x)-3*x^3 +4*x^2-x-2)/x^2/exp(1/2*(x^2-2*x+1)*exp(x)+1/2*x^3-x^2+1/2*x),x)
Output:
(2*e**(e**x*x + x**2) - 5*e**((e**x*x**2 + e**x + x**3 + x)/2))/(e**((e**x *x**2 + e**x + x**3 + x)/2)*x)