Optimal. Leaf size=21 \[ x+\frac {2 \left (e^x+x\right ) \left (e^{4 x}+x\right )}{-1+x} \]
________________________________________________________________________________________
Rubi [B] time = 0.39, antiderivative size = 65, normalized size of antiderivative = 3.10, number of steps used = 18, number of rules used = 8, integrand size = 60, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.133, Rules used = {27, 6742, 2197, 2199, 2194, 2177, 2178, 683} \begin {gather*} 3 x+2 e^x+2 e^{4 x}-\frac {2 e^x}{1-x}-\frac {2 e^{4 x}}{1-x}-\frac {2 e^{5 x}}{1-x}-\frac {2}{1-x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 27
Rule 683
Rule 2177
Rule 2178
Rule 2194
Rule 2197
Rule 2199
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {1-6 x+3 x^2+e^x \left (-2-2 x+2 x^2\right )+e^{4 x} \left (-2-8 x+8 x^2+e^x (-12+10 x)\right )}{(-1+x)^2} \, dx\\ &=\int \left (\frac {2 e^{5 x} (-6+5 x)}{(-1+x)^2}+\frac {2 e^x \left (-1-x+x^2\right )}{(-1+x)^2}+\frac {1-6 x+3 x^2}{(-1+x)^2}+\frac {2 e^{4 x} \left (-1-4 x+4 x^2\right )}{(-1+x)^2}\right ) \, dx\\ &=2 \int \frac {e^{5 x} (-6+5 x)}{(-1+x)^2} \, dx+2 \int \frac {e^x \left (-1-x+x^2\right )}{(-1+x)^2} \, dx+2 \int \frac {e^{4 x} \left (-1-4 x+4 x^2\right )}{(-1+x)^2} \, dx+\int \frac {1-6 x+3 x^2}{(-1+x)^2} \, dx\\ &=-\frac {2 e^{5 x}}{1-x}+2 \int \left (e^x-\frac {e^x}{(-1+x)^2}+\frac {e^x}{-1+x}\right ) \, dx+2 \int \left (4 e^{4 x}-\frac {e^{4 x}}{(-1+x)^2}+\frac {4 e^{4 x}}{-1+x}\right ) \, dx+\int \left (3-\frac {2}{(-1+x)^2}\right ) \, dx\\ &=-\frac {2}{1-x}-\frac {2 e^{5 x}}{1-x}+3 x+2 \int e^x \, dx-2 \int \frac {e^x}{(-1+x)^2} \, dx-2 \int \frac {e^{4 x}}{(-1+x)^2} \, dx+2 \int \frac {e^x}{-1+x} \, dx+8 \int e^{4 x} \, dx+8 \int \frac {e^{4 x}}{-1+x} \, dx\\ &=2 e^x+2 e^{4 x}-\frac {2}{1-x}-\frac {2 e^x}{1-x}-\frac {2 e^{4 x}}{1-x}-\frac {2 e^{5 x}}{1-x}+3 x+8 e^4 \text {Ei}(-4 (1-x))+2 e \text {Ei}(-1+x)-2 \int \frac {e^x}{-1+x} \, dx-8 \int \frac {e^{4 x}}{-1+x} \, dx\\ &=2 e^x+2 e^{4 x}-\frac {2}{1-x}-\frac {2 e^x}{1-x}-\frac {2 e^{4 x}}{1-x}-\frac {2 e^{5 x}}{1-x}+3 x\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.13, size = 37, normalized size = 1.76 \begin {gather*} \frac {2+2 e^{5 x}-3 x+2 e^x x+2 e^{4 x} x+3 x^2}{-1+x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.69, size = 34, normalized size = 1.62 \begin {gather*} \frac {3 \, x^{2} + 2 \, x e^{\left (4 \, x\right )} + 2 \, x e^{x} - 3 \, x + 2 \, e^{\left (5 \, x\right )} + 2}{x - 1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.20, size = 34, normalized size = 1.62 \begin {gather*} \frac {3 \, x^{2} + 2 \, x e^{\left (4 \, x\right )} + 2 \, x e^{x} - 3 \, x + 2 \, e^{\left (5 \, x\right )} + 2}{x - 1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.20, size = 32, normalized size = 1.52
method | result | size |
norman | \(\frac {3 x^{2}+2 \,{\mathrm e}^{5 x}+2 x \,{\mathrm e}^{4 x}+2 \,{\mathrm e}^{x} x -1}{x -1}\) | \(32\) |
risch | \(\frac {2}{x -1}+3 x +\frac {2 \,{\mathrm e}^{5 x}}{x -1}+\frac {2 x \,{\mathrm e}^{4 x}}{x -1}+\frac {2 x \,{\mathrm e}^{x}}{x -1}\) | \(45\) |
default | \(\frac {2}{x -1}+3 x +\frac {2 \,{\mathrm e}^{x}}{x -1}+\frac {2 \,{\mathrm e}^{4 x}}{x -1}+\frac {2 \,{\mathrm e}^{5 x}}{x -1}+2 \,{\mathrm e}^{4 x}+2 \,{\mathrm e}^{x}\) | \(53\) |
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*} 3 \, x + \frac {2 \, e E_{2}\left (-x + 1\right )}{x - 1} + \frac {2 \, {\left (x e^{\left (4 \, x\right )} + x e^{x} + e^{\left (5 \, x\right )}\right )}}{x - 1} + \frac {2}{x - 1} + 2 \, \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.11, size = 33, normalized size = 1.57 \begin {gather*} \frac {2\,{\mathrm {e}}^{5\,x}-x+2\,x\,{\mathrm {e}}^{4\,x}+2\,x\,{\mathrm {e}}^x+3\,x^2}{x-1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [B] time = 0.18, size = 71, normalized size = 3.38 \begin {gather*} 3 x + \frac {\left (2 x^{2} - 4 x + 2\right ) e^{5 x} + \left (2 x^{3} - 4 x^{2} + 2 x\right ) e^{4 x} + \left (2 x^{3} - 4 x^{2} + 2 x\right ) e^{x}}{x^{3} - 3 x^{2} + 3 x - 1} + \frac {2}{x - 1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________