Optimal. Leaf size=25 \[ \log \left (\frac {4}{x (2+x) \left (2+x+x^2\right )^2 (-3+\log (5))}\right ) \]
________________________________________________________________________________________
Rubi [A] time = 0.04, antiderivative size = 20, normalized size of antiderivative = 0.80, number of steps used = 3, number of rules used = 2, integrand size = 35, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.057, Rules used = {2074, 628} \begin {gather*} -2 \log \left (x^2+x+2\right )-\log (x)-\log (x+2) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 628
Rule 2074
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \left (\frac {1}{-2-x}-\frac {1}{x}-\frac {2 (1+2 x)}{2+x+x^2}\right ) \, dx\\ &=-\log (x)-\log (2+x)-2 \int \frac {1+2 x}{2+x+x^2} \, dx\\ &=-\log (x)-\log (2+x)-2 \log \left (2+x+x^2\right )\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.01, size = 24, normalized size = 0.96 \begin {gather*} -2 \left (\frac {\log (x)}{2}+\frac {1}{2} \log (2+x)+\log \left (2+x+x^2\right )\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.62, size = 20, normalized size = 0.80 \begin {gather*} -\log \left (x^{2} + 2 \, x\right ) - 2 \, \log \left (x^{2} + x + 2\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.26, size = 22, normalized size = 0.88 \begin {gather*} -2 \, \log \left (x^{2} + x + 2\right ) - \log \left ({\left | x + 2 \right |}\right ) - \log \left ({\left | x \right |}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.03, size = 21, normalized size = 0.84
method | result | size |
default | \(-\ln \left (2+x \right )-\ln \relax (x )-2 \ln \left (x^{2}+x +2\right )\) | \(21\) |
norman | \(-\ln \left (2+x \right )-\ln \relax (x )-2 \ln \left (x^{2}+x +2\right )\) | \(21\) |
risch | \(-2 \ln \left (x^{2}+x +2\right )-\ln \left (x^{2}+2 x \right )\) | \(21\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.81, size = 20, normalized size = 0.80 \begin {gather*} -2 \, \log \left (x^{2} + x + 2\right ) - \log \left (x + 2\right ) - \log \relax (x) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.08, size = 18, normalized size = 0.72 \begin {gather*} -\ln \left (x\,\left (x+2\right )\right )-2\,\ln \left (x^2+x+2\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.12, size = 19, normalized size = 0.76 \begin {gather*} - \log {\left (x^{2} + 2 x \right )} - 2 \log {\left (x^{2} + x + 2 \right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________