Optimal. Leaf size=28 \[ 3-\frac {10+e^{2 x}+x+x^2}{-e^x+e^x x} \]
________________________________________________________________________________________
Rubi [A] time = 0.58, antiderivative size = 41, normalized size of antiderivative = 1.46, number of steps used = 21, number of rules used = 8, integrand size = 40, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {27, 6742, 2177, 2178, 2197, 2199, 2194, 2176} \begin {gather*} -e^{-x} x-2 e^{-x}+\frac {12 e^{-x}}{1-x}+\frac {e^x}{1-x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 27
Rule 2176
Rule 2177
Rule 2178
Rule 2194
Rule 2197
Rule 2199
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {e^{-x} \left (1+e^{2 x} (2-x)+11 x-x^2+x^3\right )}{(-1+x)^2} \, dx\\ &=\int \left (\frac {e^{-x}}{(-1+x)^2}-\frac {e^x (-2+x)}{(-1+x)^2}+\frac {11 e^{-x} x}{(-1+x)^2}-\frac {e^{-x} x^2}{(-1+x)^2}+\frac {e^{-x} x^3}{(-1+x)^2}\right ) \, dx\\ &=11 \int \frac {e^{-x} x}{(-1+x)^2} \, dx+\int \frac {e^{-x}}{(-1+x)^2} \, dx-\int \frac {e^x (-2+x)}{(-1+x)^2} \, dx-\int \frac {e^{-x} x^2}{(-1+x)^2} \, dx+\int \frac {e^{-x} x^3}{(-1+x)^2} \, dx\\ &=\frac {12 e^{-x}}{1-x}+\frac {e^x}{1-x}-\int \left (e^{-x}+\frac {e^{-x}}{(-1+x)^2}+\frac {2 e^{-x}}{-1+x}\right ) \, dx-\int \frac {e^{-x}}{-1+x} \, dx+\int \left (2 e^{-x}+\frac {e^{-x}}{(-1+x)^2}+\frac {3 e^{-x}}{-1+x}+e^{-x} x\right ) \, dx\\ &=\frac {12 e^{-x}}{1-x}+\frac {e^x}{1-x}-\frac {\text {Ei}(1-x)}{e}+2 \int e^{-x} \, dx-2 \int \frac {e^{-x}}{-1+x} \, dx+3 \int \frac {e^{-x}}{-1+x} \, dx-\int e^{-x} \, dx+\int e^{-x} x \, dx\\ &=-e^{-x}+\frac {12 e^{-x}}{1-x}+\frac {e^x}{1-x}-e^{-x} x+\int e^{-x} \, dx\\ &=-2 e^{-x}+\frac {12 e^{-x}}{1-x}+\frac {e^x}{1-x}-e^{-x} x\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.45, size = 23, normalized size = 0.82 \begin {gather*} -\frac {e^{-x} \left (10+e^{2 x}+x+x^2\right )}{-1+x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.54, size = 22, normalized size = 0.79 \begin {gather*} -\frac {{\left ({\left (x^{2} + x + 10\right )} e^{\left (-2 \, x\right )} + 1\right )} e^{x}}{x - 1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.14, size = 30, normalized size = 1.07 \begin {gather*} -\frac {x^{2} e^{\left (-x\right )} + x e^{\left (-x\right )} + 10 \, e^{\left (-x\right )} + e^{x}}{x - 1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.41, size = 27, normalized size = 0.96
method | result | size |
norman | \(\frac {\left (-10-x -x^{2}-{\mathrm e}^{2 x}\right ) {\mathrm e}^{-x}}{x -1}\) | \(27\) |
risch | \(-\frac {{\mathrm e}^{x}}{x -1}-\frac {\left (x^{2}+x +10\right ) {\mathrm e}^{-x}}{x -1}\) | \(28\) |
default | \(-\frac {12 \,{\mathrm e}^{-x}}{x -1}-\left (3+x \right ) {\mathrm e}^{-x}-\frac {{\mathrm e}^{x}}{x -1}+{\mathrm e}^{-x}\) | \(35\) |
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 {e^{\left (-1\right )} E_{2}\left (x - 1\right )}{x - 1} - \frac {{\left (x^{2} + x\right )} e^{\left (-x\right )} + e^{x}}{x - 1} - \frac {11 \, e^{\left (-x\right )}}{x - 1} - \int \frac {{\left (x + 1\right )} e^{\left (-x\right )}}{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.12, size = 27, normalized size = 0.96 \begin {gather*} -{\mathrm {e}}^{-x}\,\left (x+2\right )-\frac {{\mathrm {e}}^{-x}\,\left ({\mathrm {e}}^{2\,x}+12\right )}{x-1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.14, size = 26, normalized size = 0.93 \begin {gather*} \frac {\left (1 - x\right ) e^{x} + \left (- x^{3} - 9 x + 10\right ) e^{- x}}{x^{2} - 2 x + 1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________