Optimal. Leaf size=16 \[ 3 \left (-1+e^{\frac {2}{-1+x}}\right ) x^3 \]
[Out]
________________________________________________________________________________________
Rubi [B] Leaf count is larger than twice the leaf count of optimal. \(77\) vs. \(2(16)=32\).
time = 0.38, 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, 6820, 12,
14, 6874, 2237, 2241, 2240, 2258, 2245} \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 2237
Rule 2240
Rule 2241
Rule 2245
Rule 2258
Rule 6820
Rule 6874
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.05, 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]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(72\) vs.
\(2(15)=30\).
time = 2.67, size = 73, normalized size = 4.56
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.34, 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]
________________________________________________________________________________________
Fricas [A]
time = 0.39, 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]
________________________________________________________________________________________
Sympy [A]
time = 0.06, 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]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 75 vs.
\(2 (15) = 30\).
time = 0.41, 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]
________________________________________________________________________________________
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]
________________________________________________________________________________________