Optimal. Leaf size=18 \[ x+\log (x)-\log \left (\frac {-2+2 x}{(1+x)^2}\right ) \]
________________________________________________________________________________________
Rubi [A] time = 0.04, antiderivative size = 18, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.087, Rules used = {1593, 1802} \begin {gather*} x-\log (1-x)+\log (x)+2 \log (x+1) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 1593
Rule 1802
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {-1-4 x+2 x^2+x^3}{x \left (-1+x^2\right )} \, dx\\ &=\int \left (1+\frac {1}{1-x}+\frac {1}{x}+\frac {2}{1+x}\right ) \, dx\\ &=x-\log (1-x)+\log (x)+2 \log (1+x)\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.01, size = 18, normalized size = 1.00 \begin {gather*} x-\log (1-x)+\log (x)+2 \log (1+x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.44, size = 16, normalized size = 0.89 \begin {gather*} x + 2 \, \log \left (x + 1\right ) - \log \left (x - 1\right ) + \log \relax (x) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.20, size = 19, normalized size = 1.06 \begin {gather*} x + 2 \, \log \left ({\left | x + 1 \right |}\right ) - \log \left ({\left | x - 1 \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.44, size = 17, normalized size = 0.94
method | result | size |
default | \(x +\ln \relax (x )-\ln \left (x -1\right )+2 \ln \left (x +1\right )\) | \(17\) |
norman | \(x +\ln \relax (x )-\ln \left (x -1\right )+2 \ln \left (x +1\right )\) | \(17\) |
risch | \(x +\ln \relax (x )-\ln \left (x -1\right )+2 \ln \left (x +1\right )\) | \(17\) |
meijerg | \(\ln \relax (x )+\frac {i \pi }{2}+\frac {\ln \left (-x^{2}+1\right )}{2}-\frac {i \left (2 i x -2 i \arctanh \relax (x )\right )}{2}+4 \arctanh \relax (x )\) | \(35\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.35, size = 16, normalized size = 0.89 \begin {gather*} x + 2 \, \log \left (x + 1\right ) - \log \left (x - 1\right ) + \log \relax (x) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 7.17, size = 22, normalized size = 1.22 \begin {gather*} x+2\,\ln \left (x+1\right )-2\,\mathrm {atanh}\left (\frac {48}{2\,x+6}-7\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.12, size = 15, normalized size = 0.83 \begin {gather*} x + \log {\relax (x )} - \log {\left (x - 1 \right )} + 2 \log {\left (x + 1 \right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________