Optimal. Leaf size=26 \[ 1-e^{\left (-3+\frac {3}{-1+x}\right )^2 x^2}-2 x+\log (2) \]
________________________________________________________________________________________
Rubi [B] time = 0.73, antiderivative size = 57, normalized size of antiderivative = 2.19, number of steps used = 9, number of rules used = 5, integrand size = 80, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.062, Rules used = {6688, 6742, 37, 43, 6706} \begin {gather*} \frac {3 x^2}{(1-x)^2}-e^{\frac {9 (2-x)^2 x^2}{(1-x)^2}}-2 x+\frac {6}{1-x}-\frac {3}{(1-x)^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 37
Rule 43
Rule 6688
Rule 6706
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {-2+6 x-6 x^2+2 x^3+18 e^{\frac {9 (-2+x)^2 x^2}{(-1+x)^2}} x \left (-4+6 x-4 x^2+x^3\right )}{(1-x)^3} \, dx\\ &=\int \left (\frac {2}{(-1+x)^3}-\frac {6 x}{(-1+x)^3}+\frac {6 x^2}{(-1+x)^3}-\frac {2 x^3}{(-1+x)^3}-\frac {18 e^{\frac {9 (-2+x)^2 x^2}{(-1+x)^2}} (-2+x) x \left (2-2 x+x^2\right )}{(-1+x)^3}\right ) \, dx\\ &=-\frac {1}{(1-x)^2}-2 \int \frac {x^3}{(-1+x)^3} \, dx-6 \int \frac {x}{(-1+x)^3} \, dx+6 \int \frac {x^2}{(-1+x)^3} \, dx-18 \int \frac {e^{\frac {9 (-2+x)^2 x^2}{(-1+x)^2}} (-2+x) x \left (2-2 x+x^2\right )}{(-1+x)^3} \, dx\\ &=-e^{\frac {9 (2-x)^2 x^2}{(1-x)^2}}-\frac {1}{(1-x)^2}+\frac {3 x^2}{(1-x)^2}-2 \int \left (1+\frac {1}{(-1+x)^3}+\frac {3}{(-1+x)^2}+\frac {3}{-1+x}\right ) \, dx+6 \int \left (\frac {1}{(-1+x)^3}+\frac {2}{(-1+x)^2}+\frac {1}{-1+x}\right ) \, dx\\ &=-e^{\frac {9 (2-x)^2 x^2}{(1-x)^2}}-\frac {3}{(1-x)^2}+\frac {6}{1-x}-2 x+\frac {3 x^2}{(1-x)^2}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.28, size = 25, normalized size = 0.96 \begin {gather*} -e^{-9+\frac {9}{(-1+x)^2}-18 x+9 x^2}-2 x \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.48, size = 33, normalized size = 1.27 \begin {gather*} -2 \, x - e^{\left (\frac {9 \, {\left (x^{4} - 4 \, x^{3} + 4 \, x^{2}\right )}}{x^{2} - 2 \, x + 1}\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.26, size = 33, normalized size = 1.27 \begin {gather*} -2 \, x - e^{\left (\frac {9 \, {\left (x^{4} - 4 \, x^{3} + 4 \, x^{2}\right )}}{x^{2} - 2 \, x + 1}\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.14, size = 23, normalized size = 0.88
method | result | size |
risch | \(-2 x -{\mathrm e}^{\frac {9 x^{2} \left (x -2\right )^{2}}{\left (x -1\right )^{2}}}\) | \(23\) |
norman | \(\frac {6 x -2 x^{3}+2 x \,{\mathrm e}^{\frac {9 x^{4}-36 x^{3}+36 x^{2}}{x^{2}-2 x +1}}-x^{2} {\mathrm e}^{\frac {9 x^{4}-36 x^{3}+36 x^{2}}{x^{2}-2 x +1}}-{\mathrm e}^{\frac {9 x^{4}-36 x^{3}+36 x^{2}}{x^{2}-2 x +1}}-4}{\left (x -1\right )^{2}}\) | \(111\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.48, size = 91, normalized size = 3.50 \begin {gather*} -2 \, x + \frac {6 \, x - 5}{x^{2} - 2 \, x + 1} - \frac {3 \, {\left (4 \, x - 3\right )}}{x^{2} - 2 \, x + 1} + \frac {3 \, {\left (2 \, x - 1\right )}}{x^{2} - 2 \, x + 1} - \frac {1}{x^{2} - 2 \, x + 1} - e^{\left (9 \, x^{2} - 18 \, x + \frac {9}{x^{2} - 2 \, x + 1} - 9\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 5.16, size = 54, normalized size = 2.08 \begin {gather*} -2\,x-{\mathrm {e}}^{\frac {9\,x^4}{x^2-2\,x+1}}\,{\mathrm {e}}^{\frac {36\,x^2}{x^2-2\,x+1}}\,{\mathrm {e}}^{-\frac {36\,x^3}{x^2-2\,x+1}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.24, size = 29, normalized size = 1.12 \begin {gather*} - 2 x - e^{\frac {9 x^{4} - 36 x^{3} + 36 x^{2}}{x^{2} - 2 x + 1}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________