Optimal. Leaf size=20 \[ \frac {16}{x}-\frac {16 e^x}{x+(-3+x) x} \]
________________________________________________________________________________________
Rubi [A] time = 0.46, antiderivative size = 26, normalized size of antiderivative = 1.30, number of steps used = 12, number of rules used = 5, integrand size = 41, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.122, Rules used = {1594, 27, 6742, 2177, 2178} \begin {gather*} \frac {8 e^x}{x}+\frac {16}{x}+\frac {8 e^x}{2-x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 27
Rule 1594
Rule 2177
Rule 2178
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {-64+64 x-16 x^2+e^x \left (-32+64 x-16 x^2\right )}{x^2 \left (4-4 x+x^2\right )} \, dx\\ &=\int \frac {-64+64 x-16 x^2+e^x \left (-32+64 x-16 x^2\right )}{(-2+x)^2 x^2} \, dx\\ &=\int \left (-\frac {16}{x^2}-\frac {16 e^x \left (2-4 x+x^2\right )}{(-2+x)^2 x^2}\right ) \, dx\\ &=\frac {16}{x}-16 \int \frac {e^x \left (2-4 x+x^2\right )}{(-2+x)^2 x^2} \, dx\\ &=\frac {16}{x}-16 \int \left (-\frac {e^x}{2 (-2+x)^2}+\frac {e^x}{2 (-2+x)}+\frac {e^x}{2 x^2}-\frac {e^x}{2 x}\right ) \, dx\\ &=\frac {16}{x}+8 \int \frac {e^x}{(-2+x)^2} \, dx-8 \int \frac {e^x}{-2+x} \, dx-8 \int \frac {e^x}{x^2} \, dx+8 \int \frac {e^x}{x} \, dx\\ &=\frac {8 e^x}{2-x}+\frac {16}{x}+\frac {8 e^x}{x}-8 e^2 \text {Ei}(-2+x)+8 \text {Ei}(x)+8 \int \frac {e^x}{-2+x} \, dx-8 \int \frac {e^x}{x} \, dx\\ &=\frac {8 e^x}{2-x}+\frac {16}{x}+\frac {8 e^x}{x}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.08, size = 18, normalized size = 0.90 \begin {gather*} -\frac {16 \left (2+e^x-x\right )}{(-2+x) x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.85, size = 18, normalized size = 0.90 \begin {gather*} \frac {16 \, {\left (x - e^{x} - 2\right )}}{x^{2} - 2 \, x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.14, size = 18, normalized size = 0.90 \begin {gather*} \frac {16 \, {\left (x - e^{x} - 2\right )}}{x^{2} - 2 \, x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.06, size = 19, normalized size = 0.95
method | result | size |
norman | \(\frac {-32+16 x -16 \,{\mathrm e}^{x}}{\left (x -2\right ) x}\) | \(19\) |
risch | \(\frac {16}{x}-\frac {16 \,{\mathrm e}^{x}}{\left (x -2\right ) x}\) | \(19\) |
default | \(\frac {16}{x}-\frac {8 \,{\mathrm e}^{x}}{x -2}+\frac {8 \,{\mathrm e}^{x}}{x}\) | \(23\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.42, size = 35, normalized size = 1.75 \begin {gather*} \frac {32 \, {\left (x - 1\right )}}{x^{2} - 2 \, x} - \frac {16 \, e^{x}}{x^{2} - 2 \, x} - \frac {16}{x - 2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 3.49, size = 21, normalized size = 1.05 \begin {gather*} -\frac {8\,\left (2\,{\mathrm {e}}^x-x^2+4\right )}{x\,\left (x-2\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.15, size = 14, normalized size = 0.70 \begin {gather*} - \frac {16 e^{x}}{x^{2} - 2 x} + \frac {16}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________