3.108 \(\int \frac{1}{x (1+x) \left (1+x^2\right )} \, dx\)

Optimal. Leaf size=27 \[ -\frac{1}{4} \log \left (x^2+1\right )+\log (x)-\frac{1}{2} \log (x+1)-\frac{1}{2} \tan ^{-1}(x) \]

[Out]

-ArcTan[x]/2 + Log[x] - Log[1 + x]/2 - Log[1 + x^2]/4

_______________________________________________________________________________________

Rubi [A]  time = 0.061534, antiderivative size = 27, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 4, integrand size = 16, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.25 \[ -\frac{1}{4} \log \left (x^2+1\right )+\log (x)-\frac{1}{2} \log (x+1)-\frac{1}{2} \tan ^{-1}(x) \]

Antiderivative was successfully verified.

[In]  Int[1/(x*(1 + x)*(1 + x^2)),x]

[Out]

-ArcTan[x]/2 + Log[x] - Log[1 + x]/2 - Log[1 + x^2]/4

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 3.27409, size = 22, normalized size = 0.81 \[ \log{\left (x \right )} - \frac{\log{\left (x + 1 \right )}}{2} - \frac{\log{\left (x^{2} + 1 \right )}}{4} - \frac{\operatorname{atan}{\left (x \right )}}{2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate(1/x/(1+x)/(x**2+1),x)

[Out]

log(x) - log(x + 1)/2 - log(x**2 + 1)/4 - atan(x)/2

_______________________________________________________________________________________

Mathematica [A]  time = 0.0104167, size = 27, normalized size = 1. \[ -\frac{1}{4} \log \left (x^2+1\right )+\log (x)-\frac{1}{2} \log (x+1)-\frac{1}{2} \tan ^{-1}(x) \]

Antiderivative was successfully verified.

[In]  Integrate[1/(x*(1 + x)*(1 + x^2)),x]

[Out]

-ArcTan[x]/2 + Log[x] - Log[1 + x]/2 - Log[1 + x^2]/4

_______________________________________________________________________________________

Maple [A]  time = 0.01, size = 22, normalized size = 0.8 \[ -{\frac{\arctan \left ( x \right ) }{2}}+\ln \left ( x \right ) -{\frac{\ln \left ( 1+x \right ) }{2}}-{\frac{\ln \left ({x}^{2}+1 \right ) }{4}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int(1/x/(1+x)/(x^2+1),x)

[Out]

-1/2*arctan(x)+ln(x)-1/2*ln(1+x)-1/4*ln(x^2+1)

_______________________________________________________________________________________

Maxima [A]  time = 1.53609, size = 28, normalized size = 1.04 \[ -\frac{1}{2} \, \arctan \left (x\right ) - \frac{1}{4} \, \log \left (x^{2} + 1\right ) - \frac{1}{2} \, \log \left (x + 1\right ) + \log \left (x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(1/((x^2 + 1)*(x + 1)*x),x, algorithm="maxima")

[Out]

-1/2*arctan(x) - 1/4*log(x^2 + 1) - 1/2*log(x + 1) + log(x)

_______________________________________________________________________________________

Fricas [A]  time = 0.213579, size = 28, normalized size = 1.04 \[ -\frac{1}{2} \, \arctan \left (x\right ) - \frac{1}{4} \, \log \left (x^{2} + 1\right ) - \frac{1}{2} \, \log \left (x + 1\right ) + \log \left (x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(1/((x^2 + 1)*(x + 1)*x),x, algorithm="fricas")

[Out]

-1/2*arctan(x) - 1/4*log(x^2 + 1) - 1/2*log(x + 1) + log(x)

_______________________________________________________________________________________

Sympy [A]  time = 0.242739, size = 22, normalized size = 0.81 \[ \log{\left (x \right )} - \frac{\log{\left (x + 1 \right )}}{2} - \frac{\log{\left (x^{2} + 1 \right )}}{4} - \frac{\operatorname{atan}{\left (x \right )}}{2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(1/x/(1+x)/(x**2+1),x)

[Out]

log(x) - log(x + 1)/2 - log(x**2 + 1)/4 - atan(x)/2

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.199496, size = 31, normalized size = 1.15 \[ -\frac{1}{2} \, \arctan \left (x\right ) - \frac{1}{4} \,{\rm ln}\left (x^{2} + 1\right ) - \frac{1}{2} \,{\rm ln}\left ({\left | x + 1 \right |}\right ) +{\rm ln}\left ({\left | x \right |}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(1/((x^2 + 1)*(x + 1)*x),x, algorithm="giac")

[Out]

-1/2*arctan(x) - 1/4*ln(x^2 + 1) - 1/2*ln(abs(x + 1)) + ln(abs(x))