Optimal. Leaf size=22 \[ \frac {1}{20} (4+4 x) \log \left (\frac {x}{2-x+x^2}\right ) \]
________________________________________________________________________________________
Rubi [A] time = 0.30, antiderivative size = 38, normalized size of antiderivative = 1.73, number of steps used = 16, number of rules used = 9, integrand size = 58, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.155, Rules used = {1594, 6728, 1628, 634, 618, 204, 628, 2523, 1657} \begin {gather*} \frac {1}{5} x \log \left (\frac {x}{x^2-x+2}\right )-\frac {1}{5} \log \left (x^2-x+2\right )+\frac {\log (x)}{5} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 204
Rule 618
Rule 628
Rule 634
Rule 1594
Rule 1628
Rule 1657
Rule 2523
Rule 6728
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {2+2 x-x^2-x^3+\left (2 x-x^2+x^3\right ) \log \left (\frac {x}{2-x+x^2}\right )}{x \left (10-5 x+5 x^2\right )} \, dx\\ &=\int \left (\frac {2+2 x-x^2-x^3}{5 x \left (2-x+x^2\right )}+\frac {1}{5} \log \left (\frac {x}{2-x+x^2}\right )\right ) \, dx\\ &=\frac {1}{5} \int \frac {2+2 x-x^2-x^3}{x \left (2-x+x^2\right )} \, dx+\frac {1}{5} \int \log \left (\frac {x}{2-x+x^2}\right ) \, dx\\ &=\frac {1}{5} x \log \left (\frac {x}{2-x+x^2}\right )-\frac {1}{5} \int \frac {2-x^2}{2-x+x^2} \, dx+\frac {1}{5} \int \left (-1+\frac {1}{x}+\frac {5-3 x}{2-x+x^2}\right ) \, dx\\ &=-\frac {x}{5}+\frac {\log (x)}{5}+\frac {1}{5} x \log \left (\frac {x}{2-x+x^2}\right )+\frac {1}{5} \int \frac {5-3 x}{2-x+x^2} \, dx-\frac {1}{5} \int \left (-1+\frac {4-x}{2-x+x^2}\right ) \, dx\\ &=\frac {\log (x)}{5}+\frac {1}{5} x \log \left (\frac {x}{2-x+x^2}\right )-\frac {1}{5} \int \frac {4-x}{2-x+x^2} \, dx-\frac {3}{10} \int \frac {-1+2 x}{2-x+x^2} \, dx+\frac {7}{10} \int \frac {1}{2-x+x^2} \, dx\\ &=\frac {\log (x)}{5}+\frac {1}{5} x \log \left (\frac {x}{2-x+x^2}\right )-\frac {3}{10} \log \left (2-x+x^2\right )+\frac {1}{10} \int \frac {-1+2 x}{2-x+x^2} \, dx-\frac {7}{10} \int \frac {1}{2-x+x^2} \, dx-\frac {7}{5} \operatorname {Subst}\left (\int \frac {1}{-7-x^2} \, dx,x,-1+2 x\right )\\ &=-\frac {1}{5} \sqrt {7} \tan ^{-1}\left (\frac {1-2 x}{\sqrt {7}}\right )+\frac {\log (x)}{5}+\frac {1}{5} x \log \left (\frac {x}{2-x+x^2}\right )-\frac {1}{5} \log \left (2-x+x^2\right )+\frac {7}{5} \operatorname {Subst}\left (\int \frac {1}{-7-x^2} \, dx,x,-1+2 x\right )\\ &=\frac {\log (x)}{5}+\frac {1}{5} x \log \left (\frac {x}{2-x+x^2}\right )-\frac {1}{5} \log \left (2-x+x^2\right )\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.05, size = 33, normalized size = 1.50 \begin {gather*} \frac {1}{5} \left (\log (x)+x \log \left (\frac {x}{2-x+x^2}\right )-\log \left (2-x+x^2\right )\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.77, size = 18, normalized size = 0.82 \begin {gather*} \frac {1}{5} \, {\left (x + 1\right )} \log \left (\frac {x}{x^{2} - x + 2}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.16, size = 32, normalized size = 1.45 \begin {gather*} \frac {1}{5} \, x \log \left (\frac {x}{x^{2} - x + 2}\right ) - \frac {1}{5} \, \log \left (x^{2} - x + 2\right ) + \frac {1}{5} \, \log \relax (x) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.06, size = 33, normalized size = 1.50
method | result | size |
default | \(-\frac {\ln \left (x^{2}-x +2\right )}{5}+\frac {\ln \relax (x )}{5}+\frac {\ln \left (\frac {x}{x^{2}-x +2}\right ) x}{5}\) | \(33\) |
norman | \(\frac {\ln \left (\frac {x}{x^{2}-x +2}\right )}{5}+\frac {\ln \left (\frac {x}{x^{2}-x +2}\right ) x}{5}\) | \(33\) |
risch | \(-\frac {\ln \left (x^{2}-x +2\right )}{5}+\frac {\ln \relax (x )}{5}+\frac {\ln \left (\frac {x}{x^{2}-x +2}\right ) x}{5}\) | \(33\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.58, size = 37, normalized size = 1.68 \begin {gather*} -\frac {1}{10} \, {\left (2 \, x - 1\right )} \log \left (x^{2} - x + 2\right ) + \frac {1}{5} \, x \log \relax (x) - \frac {3}{10} \, \log \left (x^{2} - x + 2\right ) + \frac {1}{5} \, \log \relax (x) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 3.24, size = 33, normalized size = 1.50 \begin {gather*} \frac {\ln \relax (x)}{5}-\frac {\ln \left (x^2-x+2\right )}{5}-\frac {x\,\ln \left (x^2-x+2\right )}{5}+\frac {x\,\ln \relax (x)}{5} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.19, size = 27, normalized size = 1.23 \begin {gather*} \frac {x \log {\left (\frac {x}{x^{2} - x + 2} \right )}}{5} + \frac {\log {\relax (x )}}{5} - \frac {\log {\left (x^{2} - x + 2 \right )}}{5} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________