Optimal. Leaf size=30 \[ e^{x^2}+5 \left (-3+\frac {4}{x}\right )-\frac {(9-x) x}{1-x} \]
________________________________________________________________________________________
Rubi [A] time = 0.40, antiderivative size = 23, normalized size of antiderivative = 0.77, number of steps used = 13, number of rules used = 6, integrand size = 57, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.105, Rules used = {1594, 27, 6742, 44, 2209, 43} \begin {gather*} e^{x^2}-x-\frac {8}{1-x}+\frac {20}{x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 27
Rule 43
Rule 44
Rule 1594
Rule 2209
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {-20+40 x-29 x^2+2 x^3-x^4+e^{x^2} \left (2 x^3-4 x^4+2 x^5\right )}{x^2 \left (1-2 x+x^2\right )} \, dx\\ &=\int \frac {-20+40 x-29 x^2+2 x^3-x^4+e^{x^2} \left (2 x^3-4 x^4+2 x^5\right )}{(-1+x)^2 x^2} \, dx\\ &=\int \left (-\frac {29}{(-1+x)^2}-\frac {20}{(-1+x)^2 x^2}+\frac {40}{(-1+x)^2 x}+2 e^{x^2} x+\frac {2 x}{(-1+x)^2}-\frac {x^2}{(-1+x)^2}\right ) \, dx\\ &=-\frac {29}{1-x}+2 \int e^{x^2} x \, dx+2 \int \frac {x}{(-1+x)^2} \, dx-20 \int \frac {1}{(-1+x)^2 x^2} \, dx+40 \int \frac {1}{(-1+x)^2 x} \, dx-\int \frac {x^2}{(-1+x)^2} \, dx\\ &=e^{x^2}-\frac {29}{1-x}+2 \int \left (\frac {1}{(-1+x)^2}+\frac {1}{-1+x}\right ) \, dx-20 \int \left (\frac {1}{(-1+x)^2}-\frac {2}{-1+x}+\frac {1}{x^2}+\frac {2}{x}\right ) \, dx+40 \int \left (\frac {1}{1-x}+\frac {1}{(-1+x)^2}+\frac {1}{x}\right ) \, dx-\int \left (1+\frac {1}{(-1+x)^2}+\frac {2}{-1+x}\right ) \, dx\\ &=e^{x^2}-\frac {8}{1-x}+\frac {20}{x}-x\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.14, size = 23, normalized size = 0.77 \begin {gather*} e^{x^2}-\frac {8}{1-x}+\frac {20}{x}-x \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.61, size = 37, normalized size = 1.23 \begin {gather*} -\frac {x^{3} - x^{2} - {\left (x^{2} - x\right )} e^{\left (x^{2}\right )} - 28 \, x + 20}{x^{2} - x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.39, size = 39, normalized size = 1.30 \begin {gather*} -\frac {x^{3} - x^{2} e^{\left (x^{2}\right )} - x^{2} + x e^{\left (x^{2}\right )} - 28 \, x + 20}{x^{2} - x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.11, size = 23, normalized size = 0.77
method | result | size |
risch | \(-x +\frac {28 x -20}{x \left (x -1\right )}+{\mathrm e}^{x^{2}}\) | \(23\) |
norman | \(\frac {-20+x^{2} {\mathrm e}^{x^{2}}+29 x -x^{3}-{\mathrm e}^{x^{2}} x}{x \left (x -1\right )}\) | \(35\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.40, size = 31, normalized size = 1.03 \begin {gather*} -x + \frac {20 \, {\left (2 \, x - 1\right )}}{x^{2} - x} - \frac {12}{x - 1} + e^{\left (x^{2}\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 4.21, size = 22, normalized size = 0.73 \begin {gather*} {\mathrm {e}}^{x^2}-x+\frac {28\,x-20}{x\,\left (x-1\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.16, size = 15, normalized size = 0.50 \begin {gather*} - x - \frac {20 - 28 x}{x^{2} - x} + e^{x^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________