Optimal. Leaf size=57 \[ \frac{1}{2} \log \left (1-x^2\right )-\frac{\log \left (\frac{1-x^2}{x^2+1}\right )}{x+1}-\frac{1}{2} \log \left (x^2+1\right )-\frac{1}{x+1}-\tan ^{-1}(x) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0569428, antiderivative size = 57, normalized size of antiderivative = 1., number of steps used = 8, number of rules used = 6, integrand size = 22, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.273, Rules used = {2525, 12, 2074, 260, 635, 203} \[ \frac{1}{2} \log \left (1-x^2\right )-\frac{\log \left (\frac{1-x^2}{x^2+1}\right )}{x+1}-\frac{1}{2} \log \left (x^2+1\right )-\frac{1}{x+1}-\tan ^{-1}(x) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2525
Rule 12
Rule 2074
Rule 260
Rule 635
Rule 203
Rubi steps
\begin{align*} \int \frac{\log \left (\frac{1-x^2}{1+x^2}\right )}{(1+x)^2} \, dx &=-\frac{\log \left (\frac{1-x^2}{1+x^2}\right )}{1+x}+\int \frac{4 x}{-1-x+x^4+x^5} \, dx\\ &=-\frac{\log \left (\frac{1-x^2}{1+x^2}\right )}{1+x}+4 \int \frac{x}{-1-x+x^4+x^5} \, dx\\ &=-\frac{\log \left (\frac{1-x^2}{1+x^2}\right )}{1+x}+4 \int \left (\frac{1}{4 (1+x)^2}+\frac{x}{4 \left (-1+x^2\right )}+\frac{-1-x}{4 \left (1+x^2\right )}\right ) \, dx\\ &=-\frac{1}{1+x}-\frac{\log \left (\frac{1-x^2}{1+x^2}\right )}{1+x}+\int \frac{x}{-1+x^2} \, dx+\int \frac{-1-x}{1+x^2} \, dx\\ &=-\frac{1}{1+x}+\frac{1}{2} \log \left (1-x^2\right )-\frac{\log \left (\frac{1-x^2}{1+x^2}\right )}{1+x}-\int \frac{1}{1+x^2} \, dx-\int \frac{x}{1+x^2} \, dx\\ &=-\frac{1}{1+x}-\tan ^{-1}(x)+\frac{1}{2} \log \left (1-x^2\right )-\frac{\log \left (\frac{1-x^2}{1+x^2}\right )}{1+x}-\frac{1}{2} \log \left (1+x^2\right )\\ \end{align*}
Mathematica [C] time = 0.0461456, size = 60, normalized size = 1.05 \[ \frac{1}{2} \left (\log \left (1-x^2\right )-\frac{2 \left (\log \left (\frac{1-x^2}{x^2+1}\right )+1\right )}{x+1}+(-1+i) \log (-x+i)-(1+i) \log (x+i)\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] time = 0.033, size = 112, normalized size = 2. \begin{align*} -{\frac{1}{1+x}\ln \left ({\frac{-{x}^{2}+1}{{x}^{2}+1}} \right ) }+{\frac{i\ln \left ( x-i \right ) x-i\ln \left ( x+i \right ) x+i\ln \left ( x-i \right ) -i\ln \left ( x+i \right ) -\ln \left ( x-i \right ) x-\ln \left ( x+i \right ) x+\ln \left ({x}^{2}-1 \right ) x-\ln \left ( x-i \right ) -\ln \left ( x+i \right ) +\ln \left ({x}^{2}-1 \right ) -2}{2+2\,x}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.58296, size = 73, normalized size = 1.28 \begin{align*} -\frac{\log \left (-\frac{x^{2} - 1}{x^{2} + 1}\right )}{x + 1} - \frac{1}{x + 1} - \arctan \left (x\right ) - \frac{1}{2} \, \log \left (x^{2} + 1\right ) + \frac{1}{2} \, \log \left (x + 1\right ) + \frac{1}{2} \, \log \left (x - 1\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.11034, size = 157, normalized size = 2.75 \begin{align*} -\frac{2 \,{\left (x + 1\right )} \arctan \left (x\right ) +{\left (x + 1\right )} \log \left (x^{2} + 1\right ) -{\left (x + 1\right )} \log \left (x^{2} - 1\right ) + 2 \, \log \left (-\frac{x^{2} - 1}{x^{2} + 1}\right ) + 2}{2 \,{\left (x + 1\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.194229, size = 41, normalized size = 0.72 \begin{align*} \frac{\log{\left (x^{2} - 1 \right )}}{2} - \frac{\log{\left (x^{2} + 1 \right )}}{2} - \operatorname{atan}{\left (x \right )} - \frac{4}{4 x + 4} - \frac{\log{\left (\frac{1 - x^{2}}{x^{2} + 1} \right )}}{x + 1} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.37203, size = 76, normalized size = 1.33 \begin{align*} -\frac{\log \left (-\frac{x^{2} - 1}{x^{2} + 1}\right )}{x + 1} - \frac{1}{x + 1} - \arctan \left (x\right ) - \frac{1}{2} \, \log \left (x^{2} + 1\right ) + \frac{1}{2} \, \log \left ({\left | x + 1 \right |}\right ) + \frac{1}{2} \, \log \left ({\left | x - 1 \right |}\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]