Optimal. Leaf size=16 \[ 3 \left (-1+e^{\frac {2}{-1+x}}\right ) x^3 \]
________________________________________________________________________________________
Rubi [B] time = 0.61, antiderivative size = 77, normalized size of antiderivative = 4.81, number of steps used = 29, number of rules used = 10, integrand size = 53, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.189, Rules used = {27, 6688, 12, 14, 6742, 2206, 2210, 2209, 2226, 2214} \begin {gather*} -3 x^3-3 e^{-\frac {2}{1-x}} (1-x)^3+9 e^{-\frac {2}{1-x}} (1-x)^2-9 e^{-\frac {2}{1-x}} (1-x)+3 e^{-\frac {2}{1-x}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 14
Rule 27
Rule 2206
Rule 2209
Rule 2210
Rule 2214
Rule 2226
Rule 6688
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {-9 x^2+18 x^3-9 x^4+e^{\frac {2}{-1+x}} \left (9 x^2-24 x^3+9 x^4\right )}{(-1+x)^2} \, dx\\ &=\int 3 x^2 \left (-3+\frac {e^{\frac {2}{-1+x}} \left (3-8 x+3 x^2\right )}{(-1+x)^2}\right ) \, dx\\ &=3 \int x^2 \left (-3+\frac {e^{\frac {2}{-1+x}} \left (3-8 x+3 x^2\right )}{(-1+x)^2}\right ) \, dx\\ &=3 \int \left (-3 x^2+\frac {e^{\frac {2}{-1+x}} x^2 \left (3-8 x+3 x^2\right )}{(-1+x)^2}\right ) \, dx\\ &=-3 x^3+3 \int \frac {e^{\frac {2}{-1+x}} x^2 \left (3-8 x+3 x^2\right )}{(-1+x)^2} \, dx\\ &=-3 x^3+3 \int \left (-4 e^{\frac {2}{-1+x}}-\frac {2 e^{\frac {2}{-1+x}}}{(-1+x)^2}-\frac {6 e^{\frac {2}{-1+x}}}{-1+x}-2 e^{\frac {2}{-1+x}} x+3 e^{\frac {2}{-1+x}} x^2\right ) \, dx\\ &=-3 x^3-6 \int \frac {e^{\frac {2}{-1+x}}}{(-1+x)^2} \, dx-6 \int e^{\frac {2}{-1+x}} x \, dx+9 \int e^{\frac {2}{-1+x}} x^2 \, dx-12 \int e^{\frac {2}{-1+x}} \, dx-18 \int \frac {e^{\frac {2}{-1+x}}}{-1+x} \, dx\\ &=3 e^{-\frac {2}{1-x}}+12 e^{-\frac {2}{1-x}} (1-x)-3 x^3+18 \text {Ei}\left (-\frac {2}{1-x}\right )-6 \int \left (e^{\frac {2}{-1+x}}+e^{\frac {2}{-1+x}} (-1+x)\right ) \, dx+9 \int \left (e^{\frac {2}{-1+x}}+2 e^{\frac {2}{-1+x}} (-1+x)+e^{\frac {2}{-1+x}} (-1+x)^2\right ) \, dx-24 \int \frac {e^{\frac {2}{-1+x}}}{-1+x} \, dx\\ &=3 e^{-\frac {2}{1-x}}+12 e^{-\frac {2}{1-x}} (1-x)-3 x^3+42 \text {Ei}\left (-\frac {2}{1-x}\right )-6 \int e^{\frac {2}{-1+x}} \, dx-6 \int e^{\frac {2}{-1+x}} (-1+x) \, dx+9 \int e^{\frac {2}{-1+x}} \, dx+9 \int e^{\frac {2}{-1+x}} (-1+x)^2 \, dx+18 \int e^{\frac {2}{-1+x}} (-1+x) \, dx\\ &=3 e^{-\frac {2}{1-x}}+9 e^{-\frac {2}{1-x}} (1-x)+6 e^{-\frac {2}{1-x}} (1-x)^2-3 e^{-\frac {2}{1-x}} (1-x)^3-3 x^3+42 \text {Ei}\left (-\frac {2}{1-x}\right )-6 \int e^{\frac {2}{-1+x}} \, dx+6 \int e^{\frac {2}{-1+x}} (-1+x) \, dx-12 \int \frac {e^{\frac {2}{-1+x}}}{-1+x} \, dx+18 \int e^{\frac {2}{-1+x}} \, dx+18 \int \frac {e^{\frac {2}{-1+x}}}{-1+x} \, dx\\ &=3 e^{-\frac {2}{1-x}}-3 e^{-\frac {2}{1-x}} (1-x)+9 e^{-\frac {2}{1-x}} (1-x)^2-3 e^{-\frac {2}{1-x}} (1-x)^3-3 x^3+36 \text {Ei}\left (-\frac {2}{1-x}\right )+6 \int e^{\frac {2}{-1+x}} \, dx-12 \int \frac {e^{\frac {2}{-1+x}}}{-1+x} \, dx+36 \int \frac {e^{\frac {2}{-1+x}}}{-1+x} \, dx\\ &=3 e^{-\frac {2}{1-x}}-9 e^{-\frac {2}{1-x}} (1-x)+9 e^{-\frac {2}{1-x}} (1-x)^2-3 e^{-\frac {2}{1-x}} (1-x)^3-3 x^3+12 \text {Ei}\left (-\frac {2}{1-x}\right )+12 \int \frac {e^{\frac {2}{-1+x}}}{-1+x} \, dx\\ &=3 e^{-\frac {2}{1-x}}-9 e^{-\frac {2}{1-x}} (1-x)+9 e^{-\frac {2}{1-x}} (1-x)^2-3 e^{-\frac {2}{1-x}} (1-x)^3-3 x^3\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.12, size = 19, normalized size = 1.19 \begin {gather*} 3 \left (1+\left (-1+e^{\frac {2}{-1+x}}\right ) x^3\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.62, size = 19, normalized size = 1.19 \begin {gather*} 3 \, x^{3} e^{\left (\frac {2}{x - 1}\right )} - 3 \, x^{3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.24, size = 75, normalized size = 4.69 \begin {gather*} 3 \, {\left (x - 1\right )}^{3} {\left (\frac {3 \, e^{\left (\frac {2}{x - 1}\right )}}{x - 1} - \frac {3}{x - 1} + \frac {3 \, e^{\left (\frac {2}{x - 1}\right )}}{{\left (x - 1\right )}^{2}} - \frac {3}{{\left (x - 1\right )}^{2}} + \frac {e^{\left (\frac {2}{x - 1}\right )}}{{\left (x - 1\right )}^{3}} + e^{\left (\frac {2}{x - 1}\right )} - 1\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.52, size = 20, normalized size = 1.25
method | result | size |
risch | \(3 x^{3} {\mathrm e}^{\frac {2}{x -1}}-3 x^{3}\) | \(20\) |
norman | \(\frac {3 x^{3}-3 x^{4}-3 x^{3} {\mathrm e}^{\frac {2}{x -1}}+3 x^{4} {\mathrm e}^{\frac {2}{x -1}}}{x -1}\) | \(44\) |
derivativedivides | \(-3 \left (x -1\right )^{3}-9 \left (x -1\right )^{2}-9 x +9+3 \,{\mathrm e}^{\frac {2}{x -1}} \left (x -1\right )^{3}+9 \,{\mathrm e}^{\frac {2}{x -1}} \left (x -1\right )^{2}+9 \,{\mathrm e}^{\frac {2}{x -1}} \left (x -1\right )+3 \,{\mathrm e}^{\frac {2}{x -1}}\) | \(73\) |
default | \(-3 \left (x -1\right )^{3}-9 \left (x -1\right )^{2}-9 x +9+3 \,{\mathrm e}^{\frac {2}{x -1}} \left (x -1\right )^{3}+9 \,{\mathrm e}^{\frac {2}{x -1}} \left (x -1\right )^{2}+9 \,{\mathrm e}^{\frac {2}{x -1}} \left (x -1\right )+3 \,{\mathrm e}^{\frac {2}{x -1}}\) | \(73\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.48, size = 19, normalized size = 1.19 \begin {gather*} 3 \, x^{3} e^{\left (\frac {2}{x - 1}\right )} - 3 \, x^{3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 4.16, size = 15, normalized size = 0.94 \begin {gather*} 3\,x^3\,\left ({\mathrm {e}}^{\frac {2}{x-1}}-1\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.15, size = 15, normalized size = 0.94 \begin {gather*} 3 x^{3} e^{\frac {2}{x - 1}} - 3 x^{3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________