Optimal. Leaf size=34 \[ x \left (2-x-\left (1+3 e^{\frac {2}{x}-x}+\frac {2}{4-x}\right ) x\right ) \]
________________________________________________________________________________________
Rubi [A] time = 0.26, antiderivative size = 45, normalized size of antiderivative = 1.32, number of steps used = 10, number of rules used = 4, integrand size = 57, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.070, Rules used = {27, 6742, 43, 2288} \begin {gather*} -2 x^2-\frac {3 e^{\frac {2}{x}-x} \left (x^2+2\right )}{\frac {2}{x^2}+1}+4 x-\frac {32}{4-x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 27
Rule 43
Rule 2288
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {32-96 x+36 x^2-4 x^3+3 e^{\frac {2}{x}-x} \left (32-48 x+34 x^2-10 x^3+x^4\right )}{(-4+x)^2} \, dx\\ &=\int \left (\frac {32}{(-4+x)^2}-\frac {96 x}{(-4+x)^2}+\frac {36 x^2}{(-4+x)^2}-\frac {4 x^3}{(-4+x)^2}+3 e^{\frac {2}{x}-x} \left (2-2 x+x^2\right )\right ) \, dx\\ &=\frac {32}{4-x}+3 \int e^{\frac {2}{x}-x} \left (2-2 x+x^2\right ) \, dx-4 \int \frac {x^3}{(-4+x)^2} \, dx+36 \int \frac {x^2}{(-4+x)^2} \, dx-96 \int \frac {x}{(-4+x)^2} \, dx\\ &=\frac {32}{4-x}-\frac {3 e^{\frac {2}{x}-x} \left (2+x^2\right )}{1+\frac {2}{x^2}}-4 \int \left (8+\frac {64}{(-4+x)^2}+\frac {48}{-4+x}+x\right ) \, dx+36 \int \left (1+\frac {16}{(-4+x)^2}+\frac {8}{-4+x}\right ) \, dx-96 \int \left (\frac {4}{(-4+x)^2}+\frac {1}{-4+x}\right ) \, dx\\ &=-\frac {32}{4-x}+4 x-2 x^2-\frac {3 e^{\frac {2}{x}-x} \left (2+x^2\right )}{1+\frac {2}{x^2}}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.04, size = 47, normalized size = 1.38 \begin {gather*} \frac {32}{-4+x}-12 (-4+x)-2 (-4+x)^2+\frac {3 e^{\frac {2}{x}-x} \left (2+x^2\right )}{-1-\frac {2}{x^2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 1.05, size = 48, normalized size = 1.41 \begin {gather*} -\frac {2 \, x^{3} - 12 \, x^{2} + {\left (x^{3} - 4 \, x^{2}\right )} e^{\left (-\frac {x^{2} - x \log \relax (3) - 2}{x}\right )} + 16 \, x - 32}{x - 4} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.33, size = 54, normalized size = 1.59 \begin {gather*} -\frac {3 \, x^{3} e^{\left (-\frac {x^{2} - 2}{x}\right )} + 2 \, x^{3} - 12 \, x^{2} e^{\left (-\frac {x^{2} - 2}{x}\right )} - 12 \, x^{2} + 16 \, x - 32}{x - 4} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.22, size = 36, normalized size = 1.06
method | result | size |
default | \(-{\mathrm e}^{\ln \left (3 \,{\mathrm e}^{\frac {2}{x}}\right )-x} x^{2}-2 x^{2}+4 x +\frac {32}{x -4}\) | \(36\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.40, size = 31, normalized size = 0.91 \begin {gather*} -3 \, x^{2} e^{\left (-x + \frac {2}{x}\right )} - 2 \, x^{2} + 4 \, x + \frac {32}{x - 4} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 7.67, size = 31, normalized size = 0.91 \begin {gather*} 4\,x-3\,x^2\,{\mathrm {e}}^{\frac {2}{x}-x}+\frac {32}{x-4}-2\,x^2 \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 10.36, size = 26, normalized size = 0.76 \begin {gather*} - 3 x^{2} e^{\frac {2}{x}} e^{- x} - 2 x^{2} + 4 x + \frac {32}{x - 4} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________