3.315 \(\int \frac{1-12 x+x^2+x^3}{-12+x+x^2} \, dx\)

Optimal. Leaf size=22 \[ \frac{x^2}{2}-\frac{2}{7} \tanh ^{-1}\left (\frac{1}{7} (2 x+1)\right ) \]

[Out]

x^2/2 - (2*ArcTanh[(1 + 2*x)/7])/7

_______________________________________________________________________________________

Rubi [A]  time = 0.0304985, antiderivative size = 26, normalized size of antiderivative = 1.18, number of steps used = 5, number of rules used = 3, integrand size = 20, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.15 \[ \frac{x^2}{2}+\frac{1}{7} \log (3-x)-\frac{1}{7} \log (x+4) \]

Antiderivative was successfully verified.

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

[Out]

x^2/2 + Log[3 - x]/7 - Log[4 + x]/7

_______________________________________________________________________________________

Rubi in Sympy [F]  time = 0., size = 0, normalized size = 0. \[ \frac{\log{\left (- x + 3 \right )}}{7} - \frac{\log{\left (x + 4 \right )}}{7} + \int x\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

log(-x + 3)/7 - log(x + 4)/7 + Integral(x, x)

_______________________________________________________________________________________

Mathematica [A]  time = 0.00839475, size = 26, normalized size = 1.18 \[ \frac{x^2}{2}+\frac{1}{7} \log (3-x)-\frac{1}{7} \log (x+4) \]

Antiderivative was successfully verified.

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

[Out]

x^2/2 + Log[3 - x]/7 - Log[4 + x]/7

_______________________________________________________________________________________

Maple [A]  time = 0.008, size = 19, normalized size = 0.9 \[{\frac{{x}^{2}}{2}}+{\frac{\ln \left ( -3+x \right ) }{7}}-{\frac{\ln \left ( 4+x \right ) }{7}} \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

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

_______________________________________________________________________________________

Maxima [A]  time = 0.79174, size = 24, normalized size = 1.09 \[ \frac{1}{2} \, x^{2} - \frac{1}{7} \, \log \left (x + 4\right ) + \frac{1}{7} \, \log \left (x - 3\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

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

_______________________________________________________________________________________

Fricas [A]  time = 0.251206, size = 24, normalized size = 1.09 \[ \frac{1}{2} \, x^{2} - \frac{1}{7} \, \log \left (x + 4\right ) + \frac{1}{7} \, \log \left (x - 3\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

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

_______________________________________________________________________________________

Sympy [A]  time = 0.172967, size = 17, normalized size = 0.77 \[ \frac{x^{2}}{2} + \frac{\log{\left (x - 3 \right )}}{7} - \frac{\log{\left (x + 4 \right )}}{7} \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

x**2/2 + log(x - 3)/7 - log(x + 4)/7

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.260745, size = 27, normalized size = 1.23 \[ \frac{1}{2} \, x^{2} - \frac{1}{7} \,{\rm ln}\left ({\left | x + 4 \right |}\right ) + \frac{1}{7} \,{\rm ln}\left ({\left | x - 3 \right |}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

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