Optimal. Leaf size=23 \[ \left (-\frac {401}{400}+x\right ) \left (\frac {3 e^x}{(2-x)^2 x}+x\right ) \]
________________________________________________________________________________________
Rubi [B] time = 0.46, antiderivative size = 47, normalized size of antiderivative = 2.04, number of steps used = 14, number of rules used = 5, integrand size = 69, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.072, Rules used = {6688, 12, 6742, 2177, 2178} \begin {gather*} x^2-\frac {401 x}{400}-\frac {1203 e^x}{1600 (2-x)}+\frac {1197 e^x}{800 (2-x)^2}-\frac {1203 e^x}{1600 x} \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 {1}{400} \left (-401+800 x+\frac {3 e^x \left (-802+2005 x-2001 x^2+400 x^3\right )}{(-2+x)^3 x^2}\right ) \, dx\\ &=\frac {1}{400} \int \left (-401+800 x+\frac {3 e^x \left (-802+2005 x-2001 x^2+400 x^3\right )}{(-2+x)^3 x^2}\right ) \, dx\\ &=-\frac {401 x}{400}+x^2+\frac {3}{400} \int \frac {e^x \left (-802+2005 x-2001 x^2+400 x^3\right )}{(-2+x)^3 x^2} \, dx\\ &=-\frac {401 x}{400}+x^2+\frac {3}{400} \int \left (-\frac {399 e^x}{(-2+x)^3}+\frac {397 e^x}{4 (-2+x)^2}+\frac {401 e^x}{4 (-2+x)}+\frac {401 e^x}{4 x^2}-\frac {401 e^x}{4 x}\right ) \, dx\\ &=-\frac {401 x}{400}+x^2+\frac {1191 \int \frac {e^x}{(-2+x)^2} \, dx}{1600}+\frac {1203 \int \frac {e^x}{-2+x} \, dx}{1600}+\frac {1203 \int \frac {e^x}{x^2} \, dx}{1600}-\frac {1203 \int \frac {e^x}{x} \, dx}{1600}-\frac {1197}{400} \int \frac {e^x}{(-2+x)^3} \, dx\\ &=\frac {1197 e^x}{800 (2-x)^2}+\frac {1191 e^x}{1600 (2-x)}-\frac {1203 e^x}{1600 x}-\frac {401 x}{400}+x^2+\frac {1203 e^2 \text {Ei}(-2+x)}{1600}-\frac {1203 \text {Ei}(x)}{1600}+\frac {1191 \int \frac {e^x}{-2+x} \, dx}{1600}+\frac {1203 \int \frac {e^x}{x} \, dx}{1600}-\frac {1197}{800} \int \frac {e^x}{(-2+x)^2} \, dx\\ &=\frac {1197 e^x}{800 (2-x)^2}-\frac {1203 e^x}{1600 (2-x)}-\frac {1203 e^x}{1600 x}-\frac {401 x}{400}+x^2+\frac {1197}{800} e^2 \text {Ei}(-2+x)-\frac {1197}{800} \int \frac {e^x}{-2+x} \, dx\\ &=\frac {1197 e^x}{800 (2-x)^2}-\frac {1203 e^x}{1600 (2-x)}-\frac {1203 e^x}{1600 x}-\frac {401 x}{400}+x^2\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.10, size = 32, normalized size = 1.39 \begin {gather*} \frac {(-401+400 x) \left (3 e^x+(-2+x)^2 x^2\right )}{400 (-2+x)^2 x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.52, size = 46, normalized size = 2.00 \begin {gather*} \frac {400 \, x^{5} - 2001 \, x^{4} + 3204 \, x^{3} - 1604 \, x^{2} + 3 \, {\left (400 \, x - 401\right )} e^{x}}{400 \, {\left (x^{3} - 4 \, x^{2} + 4 \, x\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.18, size = 46, normalized size = 2.00 \begin {gather*} \frac {400 \, x^{5} - 2001 \, x^{4} + 3204 \, x^{3} - 1604 \, x^{2} + 1200 \, x e^{x} - 1203 \, e^{x}}{400 \, {\left (x^{3} - 4 \, x^{2} + 4 \, x\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.07, size = 25, normalized size = 1.09
method | result | size |
risch | \(x^{2}-\frac {401 x}{400}+\frac {3 \left (400 x -401\right ) {\mathrm e}^{x}}{400 x \left (x -2\right )^{2}}\) | \(25\) |
default | \(x^{2}-\frac {401 x}{400}+\frac {1197 \,{\mathrm e}^{x}}{800 \left (x -2\right )^{2}}+\frac {1203 \,{\mathrm e}^{x}}{1600 \left (x -2\right )}-\frac {1203 \,{\mathrm e}^{x}}{1600 x}\) | \(33\) |
norman | \(\frac {x^{5}-\frac {801 x}{25}+\frac {2803 x^{2}}{100}-\frac {2001 x^{4}}{400}+3 \,{\mathrm e}^{x} x -\frac {1203 \,{\mathrm e}^{x}}{400}}{x \left (x -2\right )^{2}}\) | \(36\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.40, size = 108, normalized size = 4.70 \begin {gather*} x^{2} - \frac {401}{400} \, x + \frac {3 \, {\left (400 \, x - 401\right )} e^{x}}{400 \, {\left (x^{3} - 4 \, x^{2} + 4 \, x\right )}} - \frac {16 \, {\left (4 \, x - 7\right )}}{x^{2} - 4 \, x + 4} + \frac {5201 \, {\left (3 \, x - 5\right )}}{100 \, {\left (x^{2} - 4 \, x + 4\right )}} - \frac {6003 \, {\left (2 \, x - 3\right )}}{100 \, {\left (x^{2} - 4 \, x + 4\right )}} + \frac {2803 \, {\left (x - 1\right )}}{100 \, {\left (x^{2} - 4 \, x + 4\right )}} - \frac {401}{100 \, {\left (x^{2} - 4 \, x + 4\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 5.56, size = 33, normalized size = 1.43 \begin {gather*} \frac {\left (400\,x-401\right )\,\left (3\,{\mathrm {e}}^x+4\,x^2-4\,x^3+x^4\right )}{400\,x\,{\left (x-2\right )}^2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.13, size = 29, normalized size = 1.26 \begin {gather*} x^{2} - \frac {401 x}{400} + \frac {\left (1200 x - 1203\right ) e^{x}}{400 x^{3} - 1600 x^{2} + 1600 x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________