3.127 \(\int \frac{x^2}{-6+x+x^2} \, dx\)

Optimal. Leaf size=20 \[ x+\frac{4}{5} \log (2-x)-\frac{9}{5} \log (x+3) \]

[Out]

x + (4*Log[2 - x])/5 - (9*Log[3 + x])/5

_______________________________________________________________________________________

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

Antiderivative was successfully verified.

[In]  Int[x^2/(-6 + x + x^2),x]

[Out]

x + (4*Log[2 - x])/5 - (9*Log[3 + x])/5

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 2.59053, size = 17, normalized size = 0.85 \[ x + \frac{4 \log{\left (- x + 2 \right )}}{5} - \frac{9 \log{\left (x + 3 \right )}}{5} \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

x + 4*log(-x + 2)/5 - 9*log(x + 3)/5

_______________________________________________________________________________________

Mathematica [A]  time = 0.00508133, size = 20, normalized size = 1. \[ x+\frac{4}{5} \log (2-x)-\frac{9}{5} \log (x+3) \]

Antiderivative was successfully verified.

[In]  Integrate[x^2/(-6 + x + x^2),x]

[Out]

x + (4*Log[2 - x])/5 - (9*Log[3 + x])/5

_______________________________________________________________________________________

Maple [A]  time = 0.007, size = 15, normalized size = 0.8 \[ x+{\frac{4\,\ln \left ( -2+x \right ) }{5}}-{\frac{9\,\ln \left ( 3+x \right ) }{5}} \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

x+4/5*ln(-2+x)-9/5*ln(3+x)

_______________________________________________________________________________________

Maxima [A]  time = 1.34977, size = 19, normalized size = 0.95 \[ x - \frac{9}{5} \, \log \left (x + 3\right ) + \frac{4}{5} \, \log \left (x - 2\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

x - 9/5*log(x + 3) + 4/5*log(x - 2)

_______________________________________________________________________________________

Fricas [A]  time = 0.194364, size = 19, normalized size = 0.95 \[ x - \frac{9}{5} \, \log \left (x + 3\right ) + \frac{4}{5} \, \log \left (x - 2\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

x - 9/5*log(x + 3) + 4/5*log(x - 2)

_______________________________________________________________________________________

Sympy [A]  time = 0.096395, size = 17, normalized size = 0.85 \[ x + \frac{4 \log{\left (x - 2 \right )}}{5} - \frac{9 \log{\left (x + 3 \right )}}{5} \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

x + 4*log(x - 2)/5 - 9*log(x + 3)/5

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.215049, size = 22, normalized size = 1.1 \[ x - \frac{9}{5} \,{\rm ln}\left ({\left | x + 3 \right |}\right ) + \frac{4}{5} \,{\rm ln}\left ({\left | x - 2 \right |}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

x - 9/5*ln(abs(x + 3)) + 4/5*ln(abs(x - 2))