3.374 \(\int \frac{1+x^2}{x+2 x^2+x^3} \, dx\)

Optimal. Leaf size=10 \[ \frac{2}{x+1}+\log (x) \]

[Out]

2/(1 + x) + Log[x]

_______________________________________________________________________________________

Rubi [A]  time = 0.0378543, antiderivative size = 10, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 18, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.167 \[ \frac{2}{x+1}+\log (x) \]

Antiderivative was successfully verified.

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

[Out]

2/(1 + x) + Log[x]

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 7.47058, size = 7, normalized size = 0.7 \[ \log{\left (x \right )} + \frac{2}{x + 1} \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

log(x) + 2/(x + 1)

_______________________________________________________________________________________

Mathematica [A]  time = 0.00793174, size = 10, normalized size = 1. \[ \frac{2}{x+1}+\log (x) \]

Antiderivative was successfully verified.

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

[Out]

2/(1 + x) + Log[x]

_______________________________________________________________________________________

Maple [A]  time = 0.008, size = 11, normalized size = 1.1 \[ 2\, \left ( 1+x \right ) ^{-1}+\ln \left ( x \right ) \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

2/(1+x)+ln(x)

_______________________________________________________________________________________

Maxima [A]  time = 0.801148, size = 14, normalized size = 1.4 \[ \frac{2}{x + 1} + \log \left (x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

2/(x + 1) + log(x)

_______________________________________________________________________________________

Fricas [A]  time = 0.287341, size = 19, normalized size = 1.9 \[ \frac{{\left (x + 1\right )} \log \left (x\right ) + 2}{x + 1} \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

((x + 1)*log(x) + 2)/(x + 1)

_______________________________________________________________________________________

Sympy [A]  time = 0.164596, size = 7, normalized size = 0.7 \[ \log{\left (x \right )} + \frac{2}{x + 1} \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

log(x) + 2/(x + 1)

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.260025, size = 15, normalized size = 1.5 \[ \frac{2}{x + 1} +{\rm ln}\left ({\left | x \right |}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

2/(x + 1) + ln(abs(x))