Optimal. Leaf size=18 \[ 25+\frac {4 e^x (-2+x)}{(-4+x)^2 x} \]
________________________________________________________________________________________
Rubi [B] time = 0.41, antiderivative size = 37, normalized size of antiderivative = 2.06, number of steps used = 13, number of rules used = 5, integrand size = 40, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {6688, 12, 6742, 2177, 2178} \begin {gather*} -\frac {e^x}{2 x}-\frac {e^x}{2 (4-x)}+\frac {2 e^x}{(4-x)^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 2177
Rule 2178
Rule 6688
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {4 e^x \left (8-14 x+8 x^2-x^3\right )}{(4-x)^3 x^2} \, dx\\ &=4 \int \frac {e^x \left (8-14 x+8 x^2-x^3\right )}{(4-x)^3 x^2} \, dx\\ &=4 \int \left (-\frac {e^x}{(-4+x)^3}+\frac {3 e^x}{8 (-4+x)^2}+\frac {e^x}{8 (-4+x)}+\frac {e^x}{8 x^2}-\frac {e^x}{8 x}\right ) \, dx\\ &=\frac {1}{2} \int \frac {e^x}{-4+x} \, dx+\frac {1}{2} \int \frac {e^x}{x^2} \, dx-\frac {1}{2} \int \frac {e^x}{x} \, dx+\frac {3}{2} \int \frac {e^x}{(-4+x)^2} \, dx-4 \int \frac {e^x}{(-4+x)^3} \, dx\\ &=\frac {2 e^x}{(4-x)^2}+\frac {3 e^x}{2 (4-x)}-\frac {e^x}{2 x}+\frac {1}{2} e^4 \text {Ei}(-4+x)-\frac {\text {Ei}(x)}{2}+\frac {1}{2} \int \frac {e^x}{x} \, dx+\frac {3}{2} \int \frac {e^x}{-4+x} \, dx-2 \int \frac {e^x}{(-4+x)^2} \, dx\\ &=\frac {2 e^x}{(4-x)^2}-\frac {e^x}{2 (4-x)}-\frac {e^x}{2 x}+2 e^4 \text {Ei}(-4+x)-2 \int \frac {e^x}{-4+x} \, dx\\ &=\frac {2 e^x}{(4-x)^2}-\frac {e^x}{2 (4-x)}-\frac {e^x}{2 x}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.08, size = 16, normalized size = 0.89 \begin {gather*} \frac {4 e^x (-2+x)}{(-4+x)^2 x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.63, size = 21, normalized size = 1.17 \begin {gather*} \frac {4 \, {\left (x - 2\right )} e^{x}}{x^{3} - 8 \, x^{2} + 16 \, x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.15, size = 25, normalized size = 1.39 \begin {gather*} \frac {4 \, {\left (x e^{x} - 2 \, e^{x}\right )}}{x^{3} - 8 \, x^{2} + 16 \, x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.05, size = 16, normalized size = 0.89
method | result | size |
risch | \(\frac {4 \,{\mathrm e}^{x} \left (x -2\right )}{\left (x -4\right )^{2} x}\) | \(16\) |
norman | \(\frac {4 \,{\mathrm e}^{x} x -8 \,{\mathrm e}^{x}}{x \left (x -4\right )^{2}}\) | \(20\) |
gosper | \(\frac {4 \left (x -2\right ) {\mathrm e}^{x}}{x \left (x^{2}-8 x +16\right )}\) | \(21\) |
default | \(\frac {{\mathrm e}^{x}}{2 x -8}+\frac {2 \,{\mathrm e}^{x}}{\left (x -4\right )^{2}}-\frac {{\mathrm e}^{x}}{2 x}\) | \(27\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.39, size = 21, normalized size = 1.17 \begin {gather*} \frac {4 \, {\left (x - 2\right )} e^{x}}{x^{3} - 8 \, x^{2} + 16 \, x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 3.37, size = 15, normalized size = 0.83 \begin {gather*} \frac {4\,{\mathrm {e}}^x\,\left (x-2\right )}{x\,{\left (x-4\right )}^2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.11, size = 19, normalized size = 1.06 \begin {gather*} \frac {\left (4 x - 8\right ) e^{x}}{x^{3} - 8 x^{2} + 16 x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________