Optimal. Leaf size=33 \[ \frac {e^{-1/x} \left (i \pi -x \left (2+x^2\right )+\log (-2 (1-e))\right )}{x} \]
________________________________________________________________________________________
Rubi [B] time = 0.53, antiderivative size = 84, normalized size of antiderivative = 2.55, number of steps used = 11, number of rules used = 7, integrand size = 43, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.163, Rules used = {6741, 6742, 2206, 2210, 2214, 2212, 2209} \begin {gather*} -e^{-1/x} x^2-e^{-1/x} (2+i \pi +\log (-2 (1-e)))+e^{-1/x} (\log (-2 (1-e))+i \pi )+\frac {e^{-1/x} (\log (-2 (1-e))+i \pi )}{x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2206
Rule 2209
Rule 2210
Rule 2212
Rule 2214
Rule 6741
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {e^{-1/x} \left (i \pi -x^3-2 x^4+\log (-2 (1-e))-x (2+i \pi +\log (-2 (1-e)))\right )}{x^3} \, dx\\ &=\int \left (-e^{-1/x}-2 e^{-1/x} x+\frac {i e^{-1/x} (\pi -i \log (-2 (1-e)))}{x^3}-\frac {i e^{-1/x} (\pi -i (2+\log (-2 (1-e))))}{x^2}\right ) \, dx\\ &=-\left (2 \int e^{-1/x} x \, dx\right )+(i \pi +\log (-2 (1-e))) \int \frac {e^{-1/x}}{x^3} \, dx-(2+i \pi +\log (-2 (1-e))) \int \frac {e^{-1/x}}{x^2} \, dx-\int e^{-1/x} \, dx\\ &=-e^{-1/x} x-e^{-1/x} x^2+\frac {e^{-1/x} (i \pi +\log (-2 (1-e)))}{x}-e^{-1/x} (2+i \pi +\log (-2 (1-e)))+(i \pi +\log (-2 (1-e))) \int \frac {e^{-1/x}}{x^2} \, dx+\int e^{-1/x} \, dx+\int \frac {e^{-1/x}}{x} \, dx\\ &=-e^{-1/x} x^2-\text {Ei}\left (-\frac {1}{x}\right )+e^{-1/x} (i \pi +\log (-2 (1-e)))+\frac {e^{-1/x} (i \pi +\log (-2 (1-e)))}{x}-e^{-1/x} (2+i \pi +\log (-2 (1-e)))-\int \frac {e^{-1/x}}{x} \, dx\\ &=-e^{-1/x} x^2+e^{-1/x} (i \pi +\log (-2 (1-e)))+\frac {e^{-1/x} (i \pi +\log (-2 (1-e)))}{x}-e^{-1/x} (2+i \pi +\log (-2 (1-e)))\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.18, size = 31, normalized size = 0.94 \begin {gather*} \frac {e^{-1/x} \left (i \pi -2 x-x^3+\log (2 (-1+e))\right )}{x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 1.94, size = 35, normalized size = 1.06 \begin {gather*} -\frac {{\left (x^{3} + 2 \, x\right )} e^{\left (-\frac {1}{x}\right )} - e^{\left (-\frac {1}{x}\right )} \log \left (-2 \, e + 2\right )}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.14, size = 41, normalized size = 1.24 \begin {gather*} -x^{2} {\left (\frac {2 \, e^{\left (-\frac {1}{x}\right )}}{x^{2}} - \frac {e^{\left (-\frac {1}{x}\right )} \log \left (-2 \, e + 2\right )}{x^{3}} + e^{\left (-\frac {1}{x}\right )}\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.16, size = 27, normalized size = 0.82
method | result | size |
gosper | \(\frac {\left (-x^{3}+\ln \left (-2 \,{\mathrm e}+2\right )-2 x \right ) {\mathrm e}^{-\frac {1}{x}}}{x}\) | \(27\) |
risch | \(\frac {\left (-x^{3}+\ln \relax (2)+\ln \left (1-{\mathrm e}\right )-2 x \right ) {\mathrm e}^{-\frac {1}{x}}}{x}\) | \(29\) |
norman | \(\frac {\left (\left (\ln \relax (2)+\ln \left (1-{\mathrm e}\right )\right ) x -2 x^{2}-x^{4}\right ) {\mathrm e}^{-\frac {1}{x}}}{x^{2}}\) | \(34\) |
derivativedivides | \(\frac {{\mathrm e}^{-\frac {1}{x}} \ln \relax (2)}{x}+\frac {{\mathrm e}^{-\frac {1}{x}} \ln \left (1-{\mathrm e}\right )}{x}-2 \,{\mathrm e}^{-\frac {1}{x}}-x^{2} {\mathrm e}^{-\frac {1}{x}}\) | \(50\) |
default | \(\frac {{\mathrm e}^{-\frac {1}{x}} \ln \relax (2)}{x}+\frac {{\mathrm e}^{-\frac {1}{x}} \ln \left (1-{\mathrm e}\right )}{x}-2 \,{\mathrm e}^{-\frac {1}{x}}-x^{2} {\mathrm e}^{-\frac {1}{x}}\) | \(50\) |
meijerg | \(-\left (-\ln \left (-2 \,{\mathrm e}+2\right )-2\right ) \left (1-{\mathrm e}^{-\frac {1}{x}}\right )+\frac {x^{2} \left (\frac {9}{x^{2}}-\frac {12}{x}+6\right )}{6}-\frac {x^{2} \left (3-\frac {3}{x}\right ) {\mathrm e}^{-\frac {1}{x}}}{3}-\frac {1}{2}+x -x^{2}+\frac {x \left (2-\frac {2}{x}\right )}{2}-x \,{\mathrm e}^{-\frac {1}{x}}-\ln \left (-2 \,{\mathrm e}+2\right ) \left (1-\frac {\left (\frac {2}{x}+2\right ) {\mathrm e}^{-\frac {1}{x}}}{2}\right )\) | \(112\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [C] time = 0.42, size = 51, normalized size = 1.55 \begin {gather*} -e^{\left (-\frac {1}{x}\right )} \log \left (-2 \, e + 2\right ) + \Gamma \left (2, \frac {1}{x}\right ) \log \left (-2 \, e + 2\right ) - 2 \, e^{\left (-\frac {1}{x}\right )} - \Gamma \left (-1, \frac {1}{x}\right ) - 2 \, \Gamma \left (-2, \frac {1}{x}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 3.41, size = 27, normalized size = 0.82 \begin {gather*} -\frac {{\mathrm {e}}^{-\frac {1}{x}}\,\left (x^3+2\,x-\ln \left (2-2\,\mathrm {e}\right )\right )}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.24, size = 27, normalized size = 0.82 \begin {gather*} - \frac {\left (x^{3} + 2 x - \log {\relax (2 )} - \log {\left (-1 + e \right )} - i \pi \right ) e^{- \frac {1}{x}}}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________