Optimal. Leaf size=34 \[ e^4-\frac {5}{x}-\frac {-2 e^{-\frac {1}{2} (-1+x)^2 \left (e^x+x\right )}+x}{x} \]
________________________________________________________________________________________
Rubi [B] time = 19.51, antiderivative size = 82, normalized size of antiderivative = 2.41, number of steps used = 4, number of rules used = 3, integrand size = 93, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.032, Rules used = {6741, 6742, 2288} \begin {gather*} \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} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2288
Rule 6741
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {e^{-\frac {1}{2} (-1+x)^2 \left (e^x+x\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 \left (\frac {5}{x^2}-\frac {e^{-\frac {1}{2} (-1+x)^2 \left (e^x+x\right )} \left (2+x-e^x x-4 x^2+3 x^3+e^x x^3\right )}{x^2}\right ) \, dx\\ &=-\frac {5}{x}-\int \frac {e^{-\frac {1}{2} (-1+x)^2 \left (e^x+x\right )} \left (2+x-e^x x-4 x^2+3 x^3+e^x x^3\right )}{x^2} \, dx\\ &=-\frac {5}{x}+\frac {2 e^{-\frac {1}{2} (1-x)^2 \left (e^x+x\right )} \left (x-e^x x-4 x^2+3 x^3+e^x x^3\right )}{x^2 \left (\left (1+e^x\right ) (1-x)^2-2 (1-x) \left (e^x+x\right )\right )}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.22, size = 24, normalized size = 0.71 \begin {gather*} \frac {-5+2 e^{-\frac {1}{2} (-1+x)^2 \left (e^x+x\right )}}{x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.78, size = 61, normalized size = 1.79 \begin {gather*} -\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} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \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} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.08, size = 24, normalized size = 0.71
method | result | size |
risch | \(-\frac {5}{x}+\frac {2 \,{\mathrm e}^{-\frac {\left (x -1\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\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} -\frac {5}{x} - \int \frac {{\left ({\left (x^{3} - x\right )} e^{\left (x^{2} + x\right )} + {\left (3 \, x^{3} - 4 \, x^{2} + x + 2\right )} e^{\left (x^{2}\right )}\right )} e^{\left (-\frac {1}{2} \, x^{3} - \frac {1}{2} \, x^{2} e^{x} + x e^{x} - \frac {1}{2} \, x - \frac {1}{2} \, e^{x}\right )}}{x^{2}}\,{d x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.16, size = 39, normalized size = 1.15 \begin {gather*} \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} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.23, size = 32, normalized size = 0.94 \begin {gather*} \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} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________