Optimal. Leaf size=28 \[ -x+x^2+\left (1+\frac {x^4}{5 (1+x)^2}\right ) (5-\log (x)) \]
________________________________________________________________________________________
Rubi [B] time = 0.51, antiderivative size = 78, normalized size of antiderivative = 2.79, number of steps used = 21, number of rules used = 11, integrand size = 61, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.180, Rules used = {6741, 6742, 44, 37, 43, 2357, 2295, 2304, 2319, 2314, 31} \begin {gather*} -\frac {2 x^2}{(x+1)^2}+2 x^2-\frac {1}{5} x^2 \log (x)-3 x-\frac {8}{x+1}+\frac {3}{(x+1)^2}-\frac {4 x \log (x)}{5 (x+1)}+\frac {2}{5} x \log (x)-\frac {\log (x)}{5 (x+1)^2}-\frac {4 \log (x)}{5} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 31
Rule 37
Rule 43
Rule 44
Rule 2295
Rule 2304
Rule 2314
Rule 2319
Rule 2357
Rule 6741
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {-5-20 x-20 x^2+10 x^3+44 x^4+19 x^5+\left (-4 x^4-2 x^5\right ) \log (x)}{x \left (5+15 x+15 x^2+5 x^3\right )} \, dx\\ &=\int \left (-\frac {4}{(1+x)^3}-\frac {1}{x (1+x)^3}-\frac {4 x}{(1+x)^3}+\frac {2 x^2}{(1+x)^3}+\frac {44 x^3}{5 (1+x)^3}+\frac {19 x^4}{5 (1+x)^3}-\frac {2 x^3 (2+x) \log (x)}{5 (1+x)^3}\right ) \, dx\\ &=\frac {2}{(1+x)^2}-\frac {2}{5} \int \frac {x^3 (2+x) \log (x)}{(1+x)^3} \, dx+2 \int \frac {x^2}{(1+x)^3} \, dx+\frac {19}{5} \int \frac {x^4}{(1+x)^3} \, dx-4 \int \frac {x}{(1+x)^3} \, dx+\frac {44}{5} \int \frac {x^3}{(1+x)^3} \, dx-\int \frac {1}{x (1+x)^3} \, dx\\ &=\frac {2}{(1+x)^2}-\frac {2 x^2}{(1+x)^2}-\frac {2}{5} \int \left (-\log (x)+x \log (x)-\frac {\log (x)}{(1+x)^3}+\frac {2 \log (x)}{(1+x)^2}\right ) \, dx+2 \int \left (\frac {1}{(1+x)^3}-\frac {2}{(1+x)^2}+\frac {1}{1+x}\right ) \, dx+\frac {19}{5} \int \left (-3+x+\frac {1}{(1+x)^3}-\frac {4}{(1+x)^2}+\frac {6}{1+x}\right ) \, dx+\frac {44}{5} \int \left (1-\frac {1}{(1+x)^3}+\frac {3}{(1+x)^2}-\frac {3}{1+x}\right ) \, dx-\int \left (\frac {1}{-1-x}+\frac {1}{x}-\frac {1}{(1+x)^3}-\frac {1}{(1+x)^2}\right ) \, dx\\ &=-\frac {13 x}{5}+\frac {19 x^2}{10}+\frac {3}{(1+x)^2}-\frac {2 x^2}{(1+x)^2}-\frac {41}{5 (1+x)}-\log (x)-\frac {3}{5} \log (1+x)+\frac {2}{5} \int \log (x) \, dx-\frac {2}{5} \int x \log (x) \, dx+\frac {2}{5} \int \frac {\log (x)}{(1+x)^3} \, dx-\frac {4}{5} \int \frac {\log (x)}{(1+x)^2} \, dx\\ &=-3 x+2 x^2+\frac {3}{(1+x)^2}-\frac {2 x^2}{(1+x)^2}-\frac {41}{5 (1+x)}-\log (x)+\frac {2}{5} x \log (x)-\frac {1}{5} x^2 \log (x)-\frac {\log (x)}{5 (1+x)^2}-\frac {4 x \log (x)}{5 (1+x)}-\frac {3}{5} \log (1+x)+\frac {1}{5} \int \frac {1}{x (1+x)^2} \, dx+\frac {4}{5} \int \frac {1}{1+x} \, dx\\ &=-3 x+2 x^2+\frac {3}{(1+x)^2}-\frac {2 x^2}{(1+x)^2}-\frac {41}{5 (1+x)}-\log (x)+\frac {2}{5} x \log (x)-\frac {1}{5} x^2 \log (x)-\frac {\log (x)}{5 (1+x)^2}-\frac {4 x \log (x)}{5 (1+x)}+\frac {1}{5} \log (1+x)+\frac {1}{5} \int \left (\frac {1}{-1-x}+\frac {1}{x}-\frac {1}{(1+x)^2}\right ) \, dx\\ &=-3 x+2 x^2+\frac {3}{(1+x)^2}-\frac {2 x^2}{(1+x)^2}-\frac {8}{1+x}-\frac {4 \log (x)}{5}+\frac {2}{5} x \log (x)-\frac {1}{5} x^2 \log (x)-\frac {\log (x)}{5 (1+x)^2}-\frac {4 x \log (x)}{5 (1+x)}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.08, size = 47, normalized size = 1.68 \begin {gather*} \frac {5 \left (-3-7 x-4 x^2+x^3+2 x^4\right )-\left (5+10 x+5 x^2+x^4\right ) \log (x)}{5 (1+x)^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.52, size = 49, normalized size = 1.75 \begin {gather*} \frac {10 \, x^{4} + 5 \, x^{3} - 20 \, x^{2} - {\left (x^{4} + 5 \, x^{2} + 10 \, x + 5\right )} \log \relax (x) - 35 \, x - 15}{5 \, {\left (x^{2} + 2 \, x + 1\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.14, size = 58, normalized size = 2.07 \begin {gather*} 2 \, x^{2} - \frac {1}{5} \, {\left (x^{2} - 2 \, x - \frac {4 \, x + 3}{x^{2} + 2 \, x + 1}\right )} \log \relax (x) - 3 \, x - \frac {4 \, x + 3}{x^{2} + 2 \, x + 1} - \frac {8}{5} \, \log \relax (x) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.06, size = 34, normalized size = 1.21
method | result | size |
norman | \(\frac {x^{3}-\frac {x^{2}}{2}+2 x^{4}-\frac {x^{4} \ln \relax (x )}{5}+\frac {1}{2}}{\left (x +1\right )^{2}}-\ln \relax (x )\) | \(34\) |
default | \(2 x^{2}-3 x -\ln \relax (x )+\frac {1}{\left (x +1\right )^{2}}-\frac {4}{x +1}-\frac {x^{2} \ln \relax (x )}{5}+\frac {2 x \ln \relax (x )}{5}-\frac {4 \ln \relax (x ) x}{5 \left (x +1\right )}+\frac {\ln \relax (x ) x \left (2+x \right )}{5 \left (x +1\right )^{2}}\) | \(61\) |
risch | \(-\frac {\left (x^{4}-3 x^{2}-6 x -3\right ) \ln \relax (x )}{5 \left (x^{2}+2 x +1\right )}-\frac {-10 x^{4}+8 x^{2} \ln \relax (x )-5 x^{3}+16 x \ln \relax (x )+20 x^{2}+8 \ln \relax (x )+35 x +15}{5 \left (x^{2}+2 x +1\right )}\) | \(77\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.42, size = 148, normalized size = 5.29 \begin {gather*} \frac {19}{10} \, x^{2} - \frac {13}{5} \, x - \frac {2 \, x^{4} \log \relax (x) - x^{4} + 2 \, x^{3} + 7 \, x^{2} + 2 \, x - 2}{10 \, {\left (x^{2} + 2 \, x + 1\right )}} + \frac {19 \, {\left (8 \, x + 7\right )}}{10 \, {\left (x^{2} + 2 \, x + 1\right )}} - \frac {22 \, {\left (6 \, x + 5\right )}}{5 \, {\left (x^{2} + 2 \, x + 1\right )}} + \frac {4 \, x + 3}{x^{2} + 2 \, x + 1} - \frac {2 \, x + 3}{2 \, {\left (x^{2} + 2 \, x + 1\right )}} + \frac {2 \, {\left (2 \, x + 1\right )}}{x^{2} + 2 \, x + 1} + \frac {2}{x^{2} + 2 \, x + 1} - \log \relax (x) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 9.42, size = 42, normalized size = 1.50 \begin {gather*} -\frac {x+\ln \relax (x)+x^2\,\ln \relax (x)+\frac {x^4\,\ln \relax (x)}{5}+2\,x\,\ln \relax (x)+x^2-x^3-2\,x^4}{{\left (x+1\right )}^2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [B] time = 0.23, size = 56, normalized size = 2.00 \begin {gather*} 2 x^{2} - 3 x + \frac {- 4 x - 3}{x^{2} + 2 x + 1} - \frac {8 \log {\relax (x )}}{5} + \frac {\left (- x^{4} + 3 x^{2} + 6 x + 3\right ) \log {\relax (x )}}{5 x^{2} + 10 x + 5} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________