Optimal. Leaf size=33 \[ \frac {1}{3} \left (2+(-2+x)^2\right ) \left (-4 x-\frac {3+e^{2/x} x}{5 x}\right ) \]
________________________________________________________________________________________
Rubi [A] time = 0.18, antiderivative size = 64, normalized size of antiderivative = 1.94, number of steps used = 14, number of rules used = 7, integrand size = 47, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.149, Rules used = {12, 14, 6742, 2206, 2210, 2209, 2214} \begin {gather*} -\frac {4 x^3}{3}-\frac {1}{15} e^{2/x} x^2+\frac {16 x^2}{3}+\frac {4}{15} e^{2/x} x-\frac {41 x}{5}-\frac {2 e^{2/x}}{5}-\frac {6}{5 x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 14
Rule 2206
Rule 2209
Rule 2210
Rule 2214
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\frac {1}{15} \int \frac {18-123 x^2+160 x^3-60 x^4+e^{2/x} \left (12-8 x+6 x^2-2 x^3\right )}{x^2} \, dx\\ &=\frac {1}{15} \int \left (-\frac {2 e^{2/x} \left (-6+4 x-3 x^2+x^3\right )}{x^2}+\frac {18-123 x^2+160 x^3-60 x^4}{x^2}\right ) \, dx\\ &=\frac {1}{15} \int \frac {18-123 x^2+160 x^3-60 x^4}{x^2} \, dx-\frac {2}{15} \int \frac {e^{2/x} \left (-6+4 x-3 x^2+x^3\right )}{x^2} \, dx\\ &=\frac {1}{15} \int \left (-123+\frac {18}{x^2}+160 x-60 x^2\right ) \, dx-\frac {2}{15} \int \left (-3 e^{2/x}-\frac {6 e^{2/x}}{x^2}+\frac {4 e^{2/x}}{x}+e^{2/x} x\right ) \, dx\\ &=-\frac {6}{5 x}-\frac {41 x}{5}+\frac {16 x^2}{3}-\frac {4 x^3}{3}-\frac {2}{15} \int e^{2/x} x \, dx+\frac {2}{5} \int e^{2/x} \, dx-\frac {8}{15} \int \frac {e^{2/x}}{x} \, dx+\frac {4}{5} \int \frac {e^{2/x}}{x^2} \, dx\\ &=-\frac {2 e^{2/x}}{5}-\frac {6}{5 x}-\frac {41 x}{5}+\frac {2}{5} e^{2/x} x+\frac {16 x^2}{3}-\frac {1}{15} e^{2/x} x^2-\frac {4 x^3}{3}+\frac {8 \text {Ei}\left (\frac {2}{x}\right )}{15}-\frac {2}{15} \int e^{2/x} \, dx+\frac {4}{5} \int \frac {e^{2/x}}{x} \, dx\\ &=-\frac {2 e^{2/x}}{5}-\frac {6}{5 x}-\frac {41 x}{5}+\frac {4}{15} e^{2/x} x+\frac {16 x^2}{3}-\frac {1}{15} e^{2/x} x^2-\frac {4 x^3}{3}-\frac {4 \text {Ei}\left (\frac {2}{x}\right )}{15}-\frac {4}{15} \int \frac {e^{2/x}}{x} \, dx\\ &=-\frac {2 e^{2/x}}{5}-\frac {6}{5 x}-\frac {41 x}{5}+\frac {4}{15} e^{2/x} x+\frac {16 x^2}{3}-\frac {1}{15} e^{2/x} x^2-\frac {4 x^3}{3}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.06, size = 50, normalized size = 1.52 \begin {gather*} -\frac {6}{5 x}-\frac {41 x}{5}+\frac {16 x^2}{3}-\frac {4 x^3}{3}-\frac {2}{15} e^{2/x} \left (3-2 x+\frac {x^2}{2}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.78, size = 41, normalized size = 1.24 \begin {gather*} -\frac {20 \, x^{4} - 80 \, x^{3} + 123 \, x^{2} + {\left (x^{3} - 4 \, x^{2} + 6 \, x\right )} e^{\frac {2}{x}} + 18}{15 \, x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.24, size = 54, normalized size = 1.64 \begin {gather*} -\frac {1}{15} \, x^{3} {\left (\frac {e^{\frac {2}{x}}}{x} - \frac {80}{x} - \frac {4 \, e^{\frac {2}{x}}}{x^{2}} + \frac {123}{x^{2}} + \frac {6 \, e^{\frac {2}{x}}}{x^{3}} + \frac {18}{x^{4}} + 20\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.06, size = 38, normalized size = 1.15
method | result | size |
risch | \(-\frac {4 x^{3}}{3}+\frac {16 x^{2}}{3}-\frac {41 x}{5}-\frac {6}{5 x}+\frac {\left (-x^{2}+4 x -6\right ) {\mathrm e}^{\frac {2}{x}}}{15}\) | \(38\) |
derivativedivides | \(-\frac {6}{5 x}-\frac {4 x^{3}}{3}+\frac {16 x^{2}}{3}-\frac {41 x}{5}-\frac {x^{2} {\mathrm e}^{\frac {2}{x}}}{15}+\frac {4 x \,{\mathrm e}^{\frac {2}{x}}}{15}-\frac {2 \,{\mathrm e}^{\frac {2}{x}}}{5}\) | \(48\) |
default | \(-\frac {6}{5 x}-\frac {4 x^{3}}{3}+\frac {16 x^{2}}{3}-\frac {41 x}{5}-\frac {x^{2} {\mathrm e}^{\frac {2}{x}}}{15}+\frac {4 x \,{\mathrm e}^{\frac {2}{x}}}{15}-\frac {2 \,{\mathrm e}^{\frac {2}{x}}}{5}\) | \(48\) |
norman | \(\frac {-\frac {6}{5}-\frac {41 x^{2}}{5}+\frac {16 x^{3}}{3}-\frac {4 x^{4}}{3}-\frac {2 x \,{\mathrm e}^{\frac {2}{x}}}{5}+\frac {4 x^{2} {\mathrm e}^{\frac {2}{x}}}{15}-\frac {x^{3} {\mathrm e}^{\frac {2}{x}}}{15}}{x}\) | \(53\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [C] time = 0.40, size = 53, normalized size = 1.61 \begin {gather*} -\frac {4}{3} \, x^{3} + \frac {16}{3} \, x^{2} - \frac {41}{5} \, x - \frac {6}{5 \, x} + \frac {8}{15} \, {\rm Ei}\left (\frac {2}{x}\right ) - \frac {2}{5} \, e^{\frac {2}{x}} - \frac {4}{5} \, \Gamma \left (-1, -\frac {2}{x}\right ) - \frac {8}{15} \, \Gamma \left (-2, -\frac {2}{x}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 3.04, size = 46, normalized size = 1.39 \begin {gather*} x\,\left (\frac {4\,{\mathrm {e}}^{2/x}}{15}-\frac {41}{5}\right )-\frac {2\,{\mathrm {e}}^{2/x}}{5}-x^2\,\left (\frac {{\mathrm {e}}^{2/x}}{15}-\frac {16}{3}\right )-\frac {6}{5\,x}-\frac {4\,x^3}{3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.16, size = 37, normalized size = 1.12 \begin {gather*} - \frac {4 x^{3}}{3} + \frac {16 x^{2}}{3} - \frac {41 x}{5} + \frac {\left (- x^{2} + 4 x - 6\right ) e^{\frac {2}{x}}}{15} - \frac {6}{5 x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________