3.290 \(\int \frac{2-x+x^3}{-7-6 x+x^2} \, dx\)

Optimal. Leaf size=29 \[ \frac{x^2}{2}+6 x+\frac{169}{4} \log (7-x)-\frac{1}{4} \log (x+1) \]

[Out]

6*x + x^2/2 + (169*Log[7 - x])/4 - Log[1 + x]/4

_______________________________________________________________________________________

Rubi [A]  time = 0.0392552, antiderivative size = 29, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 3, integrand size = 19, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.158 \[ \frac{x^2}{2}+6 x+\frac{169}{4} \log (7-x)-\frac{1}{4} \log (x+1) \]

Antiderivative was successfully verified.

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

[Out]

6*x + x^2/2 + (169*Log[7 - x])/4 - Log[1 + x]/4

_______________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

6*x + 169*log(-x + 7)/4 - log(x + 1)/4 + Integral(x, x)

_______________________________________________________________________________________

Mathematica [A]  time = 0.00925839, size = 29, normalized size = 1. \[ \frac{x^2}{2}+6 x+\frac{169}{4} \log (7-x)-\frac{1}{4} \log (x+1) \]

Antiderivative was successfully verified.

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

[Out]

6*x + x^2/2 + (169*Log[7 - x])/4 - Log[1 + x]/4

_______________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

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

_______________________________________________________________________________________

Maxima [A]  time = 0.802924, size = 28, normalized size = 0.97 \[ \frac{1}{2} \, x^{2} + 6 \, x - \frac{1}{4} \, \log \left (x + 1\right ) + \frac{169}{4} \, \log \left (x - 7\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

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

_______________________________________________________________________________________

Fricas [A]  time = 0.249926, size = 28, normalized size = 0.97 \[ \frac{1}{2} \, x^{2} + 6 \, x - \frac{1}{4} \, \log \left (x + 1\right ) + \frac{169}{4} \, \log \left (x - 7\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

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

_______________________________________________________________________________________

Sympy [A]  time = 0.213654, size = 22, normalized size = 0.76 \[ \frac{x^{2}}{2} + 6 x + \frac{169 \log{\left (x - 7 \right )}}{4} - \frac{\log{\left (x + 1 \right )}}{4} \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

x**2/2 + 6*x + 169*log(x - 7)/4 - log(x + 1)/4

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.264865, size = 31, normalized size = 1.07 \[ \frac{1}{2} \, x^{2} + 6 \, x - \frac{1}{4} \,{\rm ln}\left ({\left | x + 1 \right |}\right ) + \frac{169}{4} \,{\rm ln}\left ({\left | x - 7 \right |}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

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