Optimal. Leaf size=20 \[ \frac {16}{x}-\frac {16 e^x}{x+(-3+x) x} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.50, 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 = {1608, 27,
6874, 2208, 2209} \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 1608
Rule 2208
Rule 2209
Rule 6874
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.17, 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]
________________________________________________________________________________________
Maple [A]
time = 0.12, size = 23, normalized size = 1.15
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.33, 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]
________________________________________________________________________________________
Fricas [A]
time = 0.39, 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]
________________________________________________________________________________________
Sympy [A]
time = 0.05, 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]
________________________________________________________________________________________
Giac [A]
time = 0.39, 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]
________________________________________________________________________________________
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]
________________________________________________________________________________________