Optimal. Leaf size=14 \[ -5 x+\frac {\log \left ((1+x)^2\right )}{x} \]
________________________________________________________________________________________
Rubi [A] time = 0.17, antiderivative size = 14, normalized size of antiderivative = 1.00, number of steps used = 10, number of rules used = 8, integrand size = 39, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.205, Rules used = {1593, 6688, 14, 893, 2395, 36, 29, 31} \begin {gather*} \frac {\log \left ((x+1)^2\right )}{x}-5 x \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 14
Rule 29
Rule 31
Rule 36
Rule 893
Rule 1593
Rule 2395
Rule 6688
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {2 x-5 x^2-5 x^3+(-1-x) \log \left (1+2 x+x^2\right )}{x^2 (1+x)} \, dx\\ &=\int \frac {\frac {x \left (2-5 x-5 x^2\right )}{1+x}-\log \left ((1+x)^2\right )}{x^2} \, dx\\ &=\int \left (\frac {2-5 x-5 x^2}{x (1+x)}-\frac {\log \left ((1+x)^2\right )}{x^2}\right ) \, dx\\ &=\int \frac {2-5 x-5 x^2}{x (1+x)} \, dx-\int \frac {\log \left ((1+x)^2\right )}{x^2} \, dx\\ &=\frac {\log \left ((1+x)^2\right )}{x}-2 \int \frac {1}{x (1+x)} \, dx+\int \left (-5+\frac {2}{x}-\frac {2}{1+x}\right ) \, dx\\ &=-5 x+2 \log (x)-2 \log (1+x)+\frac {\log \left ((1+x)^2\right )}{x}-2 \int \frac {1}{x} \, dx+2 \int \frac {1}{1+x} \, dx\\ &=-5 x+\frac {\log \left ((1+x)^2\right )}{x}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.02, size = 14, normalized size = 1.00 \begin {gather*} -5 x+\frac {\log \left ((1+x)^2\right )}{x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.62, size = 22, normalized size = 1.57 \begin {gather*} -\frac {5 \, x^{2} - \log \left (x^{2} + 2 \, x + 1\right )}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.13, size = 17, normalized size = 1.21 \begin {gather*} -5 \, x + \frac {\log \left (x^{2} + 2 \, x + 1\right )}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.07, size = 18, normalized size = 1.29
method | result | size |
default | \(\frac {\ln \left (x^{2}+2 x +1\right )}{x}-5 x\) | \(18\) |
risch | \(\frac {\ln \left (x^{2}+2 x +1\right )}{x}-5 x\) | \(18\) |
norman | \(\frac {-5 x^{2}+\ln \left (x^{2}+2 x +1\right )}{x}\) | \(20\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.41, size = 22, normalized size = 1.57 \begin {gather*} -5 \, x + \frac {2 \, {\left (x + 1\right )} \log \left (x + 1\right )}{x} - 2 \, \log \left (x + 1\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 3.19, size = 17, normalized size = 1.21 \begin {gather*} \frac {\ln \left (x^2+2\,x+1\right )}{x}-5\,x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.11, size = 14, normalized size = 1.00 \begin {gather*} - 5 x + \frac {\log {\left (x^{2} + 2 x + 1 \right )}}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________