Optimal. Leaf size=22 \[ \frac {1}{20} (4+4 x) \log \left (\frac {x}{2-x+x^2}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.34, 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 = {1608, 6860,
1642, 648, 632, 210, 642, 2603, 1671} \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 210
Rule 632
Rule 642
Rule 648
Rule 1608
Rule 1642
Rule 1671
Rule 2603
Rule 6860
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} \text {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} \text {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.04, 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]
________________________________________________________________________________________
Maple [A]
time = 0.14, size = 33, normalized size = 1.50
method | result | size |
default | \(\frac {\ln \left (x \right )}{5}-\frac {\ln \left (x^{2}-x +2\right )}{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 \right )}{5}-\frac {\ln \left (x^{2}-x +2\right )}{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] Leaf count of result is larger than twice the leaf count of optimal. 37 vs.
\(2 (18) = 36\).
time = 0.64, 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 \left (x\right ) - \frac {3}{10} \, \log \left (x^{2} - x + 2\right ) + \frac {1}{5} \, \log \left (x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.43, 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]
________________________________________________________________________________________
Sympy [A]
time = 0.08, size = 27, normalized size = 1.23 \begin {gather*} \frac {x \log {\left (\frac {x}{x^{2} - x + 2} \right )}}{5} + \frac {\log {\left (x \right )}}{5} - \frac {\log {\left (x^{2} - x + 2 \right )}}{5} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.41, 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 \left (x\right ) \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 \left (x\right )}{5}-\frac {\ln \left (x^2-x+2\right )}{5}-\frac {x\,\ln \left (x^2-x+2\right )}{5}+\frac {x\,\ln \left (x\right )}{5} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________