Optimal. Leaf size=25 \[ -x+\frac {1}{2} \left (-2+\frac {e^x}{3}+\frac {2}{-1+x}\right ) x \]
________________________________________________________________________________________
Rubi [A] time = 0.12, antiderivative size = 30, normalized size of antiderivative = 1.20, number of steps used = 8, number of rules used = 6, integrand size = 40, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.150, Rules used = {27, 12, 6742, 2176, 2194, 683} \begin {gather*} -2 x-\frac {e^x}{6}+\frac {1}{6} e^x (x+1)-\frac {1}{1-x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 27
Rule 683
Rule 2176
Rule 2194
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {-18+24 x-12 x^2+e^x \left (1-x-x^2+x^3\right )}{6 (-1+x)^2} \, dx\\ &=\frac {1}{6} \int \frac {-18+24 x-12 x^2+e^x \left (1-x-x^2+x^3\right )}{(-1+x)^2} \, dx\\ &=\frac {1}{6} \int \left (e^x (1+x)-\frac {6 \left (3-4 x+2 x^2\right )}{(-1+x)^2}\right ) \, dx\\ &=\frac {1}{6} \int e^x (1+x) \, dx-\int \frac {3-4 x+2 x^2}{(-1+x)^2} \, dx\\ &=\frac {1}{6} e^x (1+x)-\frac {\int e^x \, dx}{6}-\int \left (2+\frac {1}{(-1+x)^2}\right ) \, dx\\ &=-\frac {e^x}{6}-\frac {1}{1-x}-2 x+\frac {1}{6} e^x (1+x)\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.02, size = 19, normalized size = 0.76 \begin {gather*} \frac {1}{-1+x}-2 (-1+x)+\frac {e^x x}{6} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 1.02, size = 28, normalized size = 1.12 \begin {gather*} -\frac {12 \, x^{2} - {\left (x^{2} - x\right )} e^{x} - 12 \, x - 6}{6 \, {\left (x - 1\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.25, size = 28, normalized size = 1.12 \begin {gather*} \frac {x^{2} e^{x} - 12 \, x^{2} - x e^{x} + 12 \, x + 6}{6 \, {\left (x - 1\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.24, size = 15, normalized size = 0.60
method | result | size |
default | \(\frac {{\mathrm e}^{x} x}{6}+\frac {1}{x -1}-2 x\) | \(15\) |
risch | \(\frac {{\mathrm e}^{x} x}{6}+\frac {1}{x -1}-2 x\) | \(15\) |
norman | \(\frac {-2 x^{2}-\frac {{\mathrm e}^{x} x}{6}+\frac {{\mathrm e}^{x} x^{2}}{6}+3}{x -1}\) | \(26\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {1}{6} \, x e^{x} - 2 \, x - \frac {e E_{2}\left (-x + 1\right )}{6 \, {\left (x - 1\right )}} + \frac {1}{x - 1} - \frac {1}{6} \, \int \frac {e^{x}}{x^{2} - 2 \, x + 1}\,{d x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.92, size = 18, normalized size = 0.72 \begin {gather*} x\,\left (\frac {{\mathrm {e}}^x}{6}-2\right )+\frac {6}{6\,x-6} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.14, size = 14, normalized size = 0.56 \begin {gather*} \frac {x e^{x}}{6} - 2 x + \frac {1}{x - 1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________