Optimal. Leaf size=57 \[ -\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 ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.04, antiderivative size = 57, normalized size of antiderivative = 1.00, 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 = {2605, 12, 2099,
266, 649, 209} \begin {gather*} -\text {ArcTan}(x)+\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} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 209
Rule 266
Rule 649
Rule 2099
Rule 2605
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 [A]
time = 0.04, size = 57, normalized size = 1.00 \begin {gather*} \frac {1}{2} \left (-\frac {2}{1+x}-2 \tan ^{-1}(x)+\log (1-x)+\log (1+x)-\frac {2 \log \left (\frac {1-x^2}{1+x^2}\right )}{1+x}-\log \left (1+x^2\right )\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains complex when optimal does not.
time = 0.08, size = 112, normalized size = 1.96
method | result | size |
risch | \(-\frac {\ln \left (\frac {-x^{2}+1}{x^{2}+1}\right )}{1+x}+\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}\) | \(112\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.50, size = 54, normalized size = 0.95 \begin {gather*} -\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 {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.37, size = 54, normalized size = 0.95 \begin {gather*} -\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 {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.21, size = 41, normalized size = 0.72 \begin {gather*} \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 {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 6.30, size = 56, normalized size = 0.98 \begin {gather*} -\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 {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.42, size = 55, normalized size = 0.96 \begin {gather*} \frac {\ln \left (x^2-1\right )}{2}-\frac {\ln \left (x^2+1\right )}{2}-\mathrm {atan}\left (x\right )-\frac {1}{x+1}+\frac {\ln \left (x^2+1\right )}{x+1}-\frac {\ln \left (1-x^2\right )}{x+1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________