Optimal. Leaf size=31 \[ 2+x-\frac {e^{x-x^2} \left (4-\frac {x (2-\log (x))}{e^3}\right )}{x} \]
________________________________________________________________________________________
Rubi [F] time = 2.40, antiderivative size = 0, normalized size of antiderivative = 0.00, number of steps used = 0, number of rules used = 0, integrand size = 0, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.000, Rules used = {} \begin {gather*} \int \frac {e^{-3+x-x^2} \left (-x+2 x^2+e^{3-x+x^2} x^2-4 x^3+e^3 \left (4-4 x+8 x^2\right )+\left (-x^2+2 x^3\right ) \log (x)\right )}{x^2} \, dx \end {gather*}
Verification is not applicable to the result.
[In]
[Out]
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \left (1+\frac {e^{-3+x-x^2} \left (4 e^3-\left (1+4 e^3\right ) x+2 \left (1+4 e^3\right ) x^2-4 x^3-x^2 \log (x)+2 x^3 \log (x)\right )}{x^2}\right ) \, dx\\ &=x+\int \frac {e^{-3+x-x^2} \left (4 e^3-\left (1+4 e^3\right ) x+2 \left (1+4 e^3\right ) x^2-4 x^3-x^2 \log (x)+2 x^3 \log (x)\right )}{x^2} \, dx\\ &=x+\int \left (\frac {e^{-3+x-x^2} \left (4 e^3-\left (1+4 e^3\right ) x+2 \left (1+4 e^3\right ) x^2-4 x^3\right )}{x^2}+e^{-3+x-x^2} (-1+2 x) \log (x)\right ) \, dx\\ &=x+\int \frac {e^{-3+x-x^2} \left (4 e^3-\left (1+4 e^3\right ) x+2 \left (1+4 e^3\right ) x^2-4 x^3\right )}{x^2} \, dx+\int e^{-3+x-x^2} (-1+2 x) \log (x) \, dx\\ &=x-e^{-3+x-x^2} \log (x)+\int \frac {e^{-3+x-x^2}}{x} \, dx+\int \left (2 e^{-3+x-x^2} \left (1+4 e^3\right )+\frac {4 e^{x-x^2}}{x^2}+\frac {e^{-3+x-x^2} \left (-1-4 e^3\right )}{x}-4 e^{-3+x-x^2} x\right ) \, dx\\ &=x-e^{-3+x-x^2} \log (x)+4 \int \frac {e^{x-x^2}}{x^2} \, dx-4 \int e^{-3+x-x^2} x \, dx+\left (-1-4 e^3\right ) \int \frac {e^{-3+x-x^2}}{x} \, dx+\left (2 \left (1+4 e^3\right )\right ) \int e^{-3+x-x^2} \, dx+\int \frac {e^{-3+x-x^2}}{x} \, dx\\ &=2 e^{-3+x-x^2}-\frac {4 e^{x-x^2}}{x}+x-e^{-3+x-x^2} \log (x)-2 \int e^{-3+x-x^2} \, dx+4 \int \frac {e^{x-x^2}}{x} \, dx-8 \int e^{x-x^2} \, dx+\left (-1-4 e^3\right ) \int \frac {e^{-3+x-x^2}}{x} \, dx+\frac {\left (2 \left (1+4 e^3\right )\right ) \int e^{-\frac {1}{4} (1-2 x)^2} \, dx}{e^{11/4}}+\int \frac {e^{-3+x-x^2}}{x} \, dx\\ &=2 e^{-3+x-x^2}-\frac {4 e^{x-x^2}}{x}+x-\frac {\left (1+4 e^3\right ) \sqrt {\pi } \text {erf}\left (\frac {1}{2} (1-2 x)\right )}{e^{11/4}}-e^{-3+x-x^2} \log (x)+4 \int \frac {e^{x-x^2}}{x} \, dx-\frac {2 \int e^{-\frac {1}{4} (1-2 x)^2} \, dx}{e^{11/4}}-\left (8 \sqrt [4]{e}\right ) \int e^{-\frac {1}{4} (1-2 x)^2} \, dx+\left (-1-4 e^3\right ) \int \frac {e^{-3+x-x^2}}{x} \, dx+\int \frac {e^{-3+x-x^2}}{x} \, dx\\ &=2 e^{-3+x-x^2}-\frac {4 e^{x-x^2}}{x}+x+\frac {\sqrt {\pi } \text {erf}\left (\frac {1}{2} (1-2 x)\right )}{e^{11/4}}+4 \sqrt [4]{e} \sqrt {\pi } \text {erf}\left (\frac {1}{2} (1-2 x)\right )-\frac {\left (1+4 e^3\right ) \sqrt {\pi } \text {erf}\left (\frac {1}{2} (1-2 x)\right )}{e^{11/4}}-e^{-3+x-x^2} \log (x)+4 \int \frac {e^{x-x^2}}{x} \, dx+\left (-1-4 e^3\right ) \int \frac {e^{-3+x-x^2}}{x} \, dx+\int \frac {e^{-3+x-x^2}}{x} \, dx\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.10, size = 42, normalized size = 1.35 \begin {gather*} 2 e^{-3+x-x^2}-\frac {4 e^{x-x^2}}{x}+x-e^{-3+x-x^2} \log (x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.71, size = 39, normalized size = 1.26 \begin {gather*} \frac {{\left (x^{2} e^{\left (x^{2} - x + 3\right )} - x \log \relax (x) + 2 \, x - 4 \, e^{3}\right )} e^{\left (-x^{2} + x - 3\right )}}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.31, size = 48, normalized size = 1.55 \begin {gather*} \frac {{\left (x^{2} e^{3} - x e^{\left (-x^{2} + x\right )} \log \relax (x) + 2 \, x e^{\left (-x^{2} + x\right )} - 4 \, e^{\left (-x^{2} + x + 3\right )}\right )} e^{\left (-3\right )}}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.10, size = 38, normalized size = 1.23
method | result | size |
default | \({\mathrm e}^{-3} \left (\frac {\left (2 x -x \ln \relax (x )-4 \,{\mathrm e}^{3}\right ) {\mathrm e}^{-x^{2}+x}}{x}+x \,{\mathrm e}^{3}\right )\) | \(38\) |
norman | \(\frac {\left (-4+x^{2} {\mathrm e}^{x^{2}-x}+2 \,{\mathrm e}^{-3} x -x \,{\mathrm e}^{-3} \ln \relax (x )\right ) {\mathrm e}^{-x^{2}+x}}{x}\) | \(45\) |
risch | \(-\ln \relax (x ) {\mathrm e}^{-x^{2}+x -3}+\frac {\left (x^{2} {\mathrm e}^{x^{2}-x +3}-4 \,{\mathrm e}^{3}+2 x \right ) {\mathrm e}^{-x^{2}+x -3}}{x}\) | \(49\) |
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*} \sqrt {\pi } \operatorname {erf}\left (x - \frac {1}{2}\right ) e^{\left (-\frac {11}{4}\right )} + x + \int -\frac {{\left (4 \, x^{3} - 8 \, x^{2} e^{3} + x {\left (4 \, e^{3} + 1\right )} - {\left (2 \, x^{3} - x^{2}\right )} \log \relax (x) - 4 \, e^{3}\right )} e^{\left (-x^{2} + x - 3\right )}}{x^{2}}\,{d x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.64, size = 41, normalized size = 1.32 \begin {gather*} x+2\,{\mathrm {e}}^{-3}\,{\mathrm {e}}^{-x^2}\,{\mathrm {e}}^x-\frac {4\,{\mathrm {e}}^{-x^2}\,{\mathrm {e}}^x}{x}-{\mathrm {e}}^{-3}\,{\mathrm {e}}^{-x^2}\,{\mathrm {e}}^x\,\ln \relax (x) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.32, size = 26, normalized size = 0.84 \begin {gather*} x + \frac {\left (- x \log {\relax (x )} + 2 x - 4 e^{3}\right ) e^{- x^{2} + x}}{x e^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________