3.353 \(\int \frac{4+3 x+x^2}{x+x^2} \, dx\)

Optimal. Leaf size=12 \[ x+4 \log (x)-2 \log (x+1) \]

[Out]

x + 4*Log[x] - 2*Log[1 + x]

_______________________________________________________________________________________

Rubi [A]  time = 0.0379996, antiderivative size = 12, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 16, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.125 \[ x+4 \log (x)-2 \log (x+1) \]

Antiderivative was successfully verified.

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

[Out]

x + 4*Log[x] - 2*Log[1 + x]

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 6.11268, size = 12, normalized size = 1. \[ x + 4 \log{\left (x \right )} - 2 \log{\left (x + 1 \right )} \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

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

_______________________________________________________________________________________

Mathematica [A]  time = 0.00510085, size = 12, normalized size = 1. \[ x+4 \log (x)-2 \log (x+1) \]

Antiderivative was successfully verified.

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

[Out]

x + 4*Log[x] - 2*Log[1 + x]

_______________________________________________________________________________________

Maple [A]  time = 0.008, size = 13, normalized size = 1.1 \[ x+4\,\ln \left ( x \right ) -2\,\ln \left ( 1+x \right ) \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

x+4*ln(x)-2*ln(1+x)

_______________________________________________________________________________________

Maxima [A]  time = 0.817265, size = 16, normalized size = 1.33 \[ x - 2 \, \log \left (x + 1\right ) + 4 \, \log \left (x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

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

_______________________________________________________________________________________

Fricas [A]  time = 0.251381, size = 16, normalized size = 1.33 \[ x - 2 \, \log \left (x + 1\right ) + 4 \, \log \left (x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

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

_______________________________________________________________________________________

Sympy [A]  time = 0.198646, size = 12, normalized size = 1. \[ x + 4 \log{\left (x \right )} - 2 \log{\left (x + 1 \right )} \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

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

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.259427, size = 19, normalized size = 1.58 \[ x - 2 \,{\rm ln}\left ({\left | x + 1 \right |}\right ) + 4 \,{\rm ln}\left ({\left | x \right |}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

x - 2*ln(abs(x + 1)) + 4*ln(abs(x))