Optimal. Leaf size=29 \[ -x+x^2-\log (2)+\log \left (\frac {4}{-x+\frac {-3+x+\log (x)}{x}}\right ) \]
________________________________________________________________________________________
Rubi [A] time = 0.21, antiderivative size = 24, normalized size of antiderivative = 0.83, number of steps used = 5, number of rules used = 3, integrand size = 52, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.058, Rules used = {6742, 14, 6684} \begin {gather*} x^2-\log \left (x^2-x-\log (x)+3\right )-x+\log (x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 14
Rule 6684
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \left (\frac {1-x+2 x^2}{x}+\frac {1+x-2 x^2}{x \left (3-x+x^2-\log (x)\right )}\right ) \, dx\\ &=\int \frac {1-x+2 x^2}{x} \, dx+\int \frac {1+x-2 x^2}{x \left (3-x+x^2-\log (x)\right )} \, dx\\ &=-\log \left (3-x+x^2-\log (x)\right )+\int \left (-1+\frac {1}{x}+2 x\right ) \, dx\\ &=-x+x^2+\log (x)-\log \left (3-x+x^2-\log (x)\right )\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.21, size = 24, normalized size = 0.83 \begin {gather*} -x+x^2+\log (x)-\log \left (3-x+x^2-\log (x)\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.63, size = 22, normalized size = 0.76 \begin {gather*} x^{2} - x - \log \left (-x^{2} + x + \log \relax (x) - 3\right ) + \log \relax (x) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.21, size = 24, normalized size = 0.83 \begin {gather*} x^{2} - x - \log \left (x^{2} - x - \log \relax (x) + 3\right ) + \log \relax (x) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.02, size = 23, normalized size = 0.79
method | result | size |
risch | \(x^{2}-x +\ln \relax (x )-\ln \left (-x^{2}+\ln \relax (x )+x -3\right )\) | \(23\) |
norman | \(x^{2}+\ln \relax (x )-x -\ln \left (x^{2}-x -\ln \relax (x )+3\right )\) | \(25\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.45, size = 22, normalized size = 0.76 \begin {gather*} x^{2} - x - \log \left (-x^{2} + x + \log \relax (x) - 3\right ) + \log \relax (x) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.49, size = 35, normalized size = 1.21 \begin {gather*} \frac {x^2\,\ln \relax (x)-x^3+x^4}{x^2}-\ln \left (x^2-\ln \relax (x)-x+3\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.16, size = 19, normalized size = 0.66 \begin {gather*} x^{2} - x + \log {\relax (x )} - \log {\left (- x^{2} + x + \log {\relax (x )} - 3 \right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________