Optimal. Leaf size=28 \[ -4-\log (1-x)+\left (2-e^5+x\right ) \left (e^2+x+\log \left (\frac {1}{x^2}\right )\right ) \]
________________________________________________________________________________________
Rubi [A] time = 0.32, antiderivative size = 44, normalized size of antiderivative = 1.57, number of steps used = 6, number of rules used = 4, integrand size = 62, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.065, Rules used = {1593, 6742, 1620, 2295} \begin {gather*} x^2+x \log \left (\frac {1}{x^2}\right )+e^2 \left (1-e^3\right ) x+2 x-\log (1-x)-2 \left (2-e^5\right ) \log (x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 1593
Rule 1620
Rule 2295
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {4-5 x-2 x^2+2 x^3+e^5 \left (-2+3 x-x^2\right )+e^2 \left (-x+x^2\right )+\left (-x+x^2\right ) \log \left (\frac {1}{x^2}\right )}{(-1+x) x} \, dx\\ &=\int \left (\frac {-2 \left (2-e^5\right )+\left (5+e^2-3 e^5\right ) x+\left (2-e^2+e^5\right ) x^2-2 x^3}{(1-x) x}+\log \left (\frac {1}{x^2}\right )\right ) \, dx\\ &=\int \frac {-2 \left (2-e^5\right )+\left (5+e^2-3 e^5\right ) x+\left (2-e^2+e^5\right ) x^2-2 x^3}{(1-x) x} \, dx+\int \log \left (\frac {1}{x^2}\right ) \, dx\\ &=2 x+x \log \left (\frac {1}{x^2}\right )+\int \left (e^2 \left (1-e^3\right )+\frac {1}{1-x}+\frac {2 \left (-2+e^5\right )}{x}+2 x\right ) \, dx\\ &=2 x+e^2 \left (1-e^3\right ) x+x^2-\log (1-x)+x \log \left (\frac {1}{x^2}\right )-2 \left (2-e^5\right ) \log (x)\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.07, size = 43, normalized size = 1.54 \begin {gather*} 2 x+e^2 x-e^5 x+x^2-\log (1-x)+x \log \left (\frac {1}{x^2}\right )-4 \log (x)+2 e^5 \log (x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.54, size = 36, normalized size = 1.29 \begin {gather*} x^{2} - x e^{5} + x e^{2} + 2 \, {\left (e^{5} - 2\right )} \log \relax (x) + x \log \left (\frac {1}{x^{2}}\right ) + 2 \, x - \log \left (x - 1\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.13, size = 39, normalized size = 1.39 \begin {gather*} x^{2} - x e^{5} + x e^{2} - x \log \left (x^{2}\right ) + 2 \, e^{5} \log \relax (x) + 2 \, x - \log \left (x - 1\right ) - 4 \, \log \relax (x) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.24, size = 38, normalized size = 1.36
method | result | size |
norman | \(x^{2}+x \ln \left (\frac {1}{x^{2}}\right )+\left (2-{\mathrm e}^{5}\right ) \ln \left (\frac {1}{x^{2}}\right )+\left (2-{\mathrm e}^{5}+{\mathrm e}^{2}\right ) x -\ln \left (x -1\right )\) | \(38\) |
risch | \(x \ln \left (\frac {1}{x^{2}}\right )+2 \ln \left (-x \right ) {\mathrm e}^{5}-x \,{\mathrm e}^{5}+{\mathrm e}^{2} x +x^{2}-4 \ln \left (-x \right )-\ln \left (x -1\right )+2 x\) | \(43\) |
derivativedivides | \(x \ln \left (\frac {1}{x^{2}}\right )+2 x -\ln \left (\frac {1}{x}-1\right )-x \,{\mathrm e}^{5}+{\mathrm e}^{2} x -2 \ln \left (\frac {1}{x}\right ) {\mathrm e}^{5}+5 \ln \left (\frac {1}{x}\right )+x^{2}\) | \(45\) |
default | \(x \ln \left (\frac {1}{x^{2}}\right )+2 x -\ln \left (\frac {1}{x}-1\right )-x \,{\mathrm e}^{5}+{\mathrm e}^{2} x -2 \ln \left (\frac {1}{x}\right ) {\mathrm e}^{5}+5 \ln \left (\frac {1}{x}\right )+x^{2}\) | \(45\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.43, size = 72, normalized size = 2.57 \begin {gather*} x^{2} - x {\left (e^{5} - e^{2} - 2\right )} - 2 \, {\left (\log \left (x - 1\right ) - \log \relax (x)\right )} e^{5} - {\left (e^{5} - e^{2}\right )} \log \left (x - 1\right ) + 3 \, e^{5} \log \left (x - 1\right ) - e^{2} \log \left (x - 1\right ) - 2 \, x \log \relax (x) - \log \left (x - 1\right ) - 4 \, \log \relax (x) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 3.18, size = 48, normalized size = 1.71 \begin {gather*} \frac {x^3\,\ln \left (\frac {1}{x^2}\right )+x^3\,\left ({\mathrm {e}}^2-{\mathrm {e}}^5+2\right )+x^4-x^2\,\ln \left (\frac {1}{x^2}\right )\,\left ({\mathrm {e}}^5-2\right )}{x^2}-\ln \left (x-1\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.47, size = 48, normalized size = 1.71 \begin {gather*} x^{2} + x \log {\left (\frac {1}{x^{2}} \right )} + x \left (- e^{5} + 2 + e^{2}\right ) + \left (-4 + 2 e^{5}\right ) \log {\relax (x )} - \log {\left (x + \frac {3 - 2 e^{5}}{-3 + 2 e^{5}} \right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________