Optimal. Leaf size=30 \[ -\frac {3}{5} e^{-x-\frac {x^2}{2}}-3 e \left (1+\frac {3 \log (3)}{x}\right ) \]
________________________________________________________________________________________
Rubi [A] time = 1.11, antiderivative size = 26, normalized size of antiderivative = 0.87, number of steps used = 15, number of rules used = 10, integrand size = 52, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.192, Rules used = {12, 6741, 6742, 2235, 2234, 2205, 2244, 2240, 6688, 30} \begin {gather*} -\frac {3}{5} e^{-\frac {x^2}{2}-x}-\frac {9 e \log (3)}{x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 30
Rule 2205
Rule 2234
Rule 2235
Rule 2240
Rule 2244
Rule 6688
Rule 6741
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\frac {1}{5} \int \frac {e^{\frac {1}{2} \left (-2 x-x^2\right )} \left (3 x^2+3 x^3+45 e^{1+\frac {1}{2} \left (2 x+x^2\right )} \log (3)\right )}{x^2} \, dx\\ &=\frac {1}{5} \int \frac {3 e^{\frac {1}{2} (-2-x) x} \left (x^2+x^3+15 e^{1+x+\frac {x^2}{2}} \log (3)\right )}{x^2} \, dx\\ &=\frac {3}{5} \int \frac {e^{\frac {1}{2} (-2-x) x} \left (x^2+x^3+15 e^{1+x+\frac {x^2}{2}} \log (3)\right )}{x^2} \, dx\\ &=\frac {3}{5} \int \left (e^{\frac {1}{2} (-2-x) x}+e^{\frac {1}{2} (-2-x) x} x+\frac {15 e^{1+x+\frac {1}{2} (-2-x) x+\frac {x^2}{2}} \log (3)}{x^2}\right ) \, dx\\ &=\frac {3}{5} \int e^{\frac {1}{2} (-2-x) x} \, dx+\frac {3}{5} \int e^{\frac {1}{2} (-2-x) x} x \, dx+(9 \log (3)) \int \frac {e^{1+x+\frac {1}{2} (-2-x) x+\frac {x^2}{2}}}{x^2} \, dx\\ &=\frac {3}{5} \int e^{-x-\frac {x^2}{2}} \, dx+\frac {3}{5} \int e^{-x-\frac {x^2}{2}} x \, dx+(9 \log (3)) \int \frac {e}{x^2} \, dx\\ &=-\frac {3}{5} e^{-x-\frac {x^2}{2}}-\frac {3}{5} \int e^{-x-\frac {x^2}{2}} \, dx+\frac {1}{5} \left (3 \sqrt {e}\right ) \int e^{-\frac {1}{2} (-1-x)^2} \, dx+(9 e \log (3)) \int \frac {1}{x^2} \, dx\\ &=-\frac {3}{5} e^{-x-\frac {x^2}{2}}+\frac {3}{5} \sqrt {\frac {e \pi }{2}} \text {erf}\left (\frac {1+x}{\sqrt {2}}\right )-\frac {9 e \log (3)}{x}-\frac {1}{5} \left (3 \sqrt {e}\right ) \int e^{-\frac {1}{2} (-1-x)^2} \, dx\\ &=-\frac {3}{5} e^{-x-\frac {x^2}{2}}-\frac {9 e \log (3)}{x}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.18, size = 25, normalized size = 0.83 \begin {gather*} \frac {3}{5} \left (-e^{-\frac {1}{2} x (2+x)}-\frac {15 e \log (3)}{x}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.86, size = 34, normalized size = 1.13 \begin {gather*} -\frac {3 \, {\left (x e + 15 \, e^{\left (\frac {1}{2} \, x^{2} + x + 2\right )} \log \relax (3)\right )} e^{\left (-\frac {1}{2} \, x^{2} - x - 1\right )}}{5 \, x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.25, size = 24, normalized size = 0.80 \begin {gather*} -\frac {3 \, {\left (x e^{\left (-\frac {1}{2} \, x^{2} - x\right )} + 15 \, e \log \relax (3)\right )}}{5 \, x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.04, size = 20, normalized size = 0.67
method | result | size |
risch | \(-\frac {9 \,{\mathrm e} \ln \relax (3)}{x}-\frac {3 \,{\mathrm e}^{-\frac {x \left (2+x \right )}{2}}}{5}\) | \(20\) |
default | \(-\frac {3 \,{\mathrm e}^{-\frac {1}{2} x^{2}-x}}{5}-\frac {9 \,{\mathrm e} \ln \relax (3)}{x}\) | \(23\) |
norman | \(\frac {\left (-\frac {3 x}{5}-9 \,{\mathrm e} \ln \relax (3) {\mathrm e}^{\frac {1}{2} x^{2}+x}\right ) {\mathrm e}^{-\frac {1}{2} x^{2}-x}}{x}\) | \(33\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [C] time = 0.78, size = 83, normalized size = 2.77 \begin {gather*} \frac {3}{10} \, \sqrt {2} \sqrt {\pi } \operatorname {erf}\left (\frac {1}{2} \, \sqrt {2} x + \frac {1}{2} \, \sqrt {2}\right ) e^{\frac {1}{2}} + \frac {3}{10} i \, \sqrt {2} {\left (\frac {i \, \sqrt {\pi } {\left (x + 1\right )} {\left (\operatorname {erf}\left (\sqrt {\frac {1}{2}} \sqrt {{\left (x + 1\right )}^{2}}\right ) - 1\right )}}{\sqrt {{\left (x + 1\right )}^{2}}} + i \, \sqrt {2} e^{\left (-\frac {1}{2} \, {\left (x + 1\right )}^{2}\right )}\right )} e^{\frac {1}{2}} - \frac {9 \, e \log \relax (3)}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.20, size = 22, normalized size = 0.73 \begin {gather*} -\frac {3\,{\mathrm {e}}^{-\frac {x^2}{2}-x}}{5}-\frac {9\,\mathrm {e}\,\ln \relax (3)}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.12, size = 24, normalized size = 0.80 \begin {gather*} - \frac {3 e^{- \frac {x^{2}}{2} - x}}{5} - \frac {9 e \log {\relax (3 )}}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________