3.300 \(\int \frac{x^4}{(-1+x) \left (2+x^2\right )} \, dx\)

Optimal. Leaf size=46 \[ \frac{x^2}{2}-\frac{2}{3} \log \left (x^2+2\right )+x+\frac{1}{3} \log (1-x)-\frac{2}{3} \sqrt{2} \tan ^{-1}\left (\frac{x}{\sqrt{2}}\right ) \]

[Out]

x + x^2/2 - (2*Sqrt[2]*ArcTan[x/Sqrt[2]])/3 + Log[1 - x]/3 - (2*Log[2 + x^2])/3

_______________________________________________________________________________________

Rubi [A]  time = 0.0830231, antiderivative size = 46, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 4, integrand size = 16, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.25 \[ \frac{x^2}{2}-\frac{2}{3} \log \left (x^2+2\right )+x+\frac{1}{3} \log (1-x)-\frac{2}{3} \sqrt{2} \tan ^{-1}\left (\frac{x}{\sqrt{2}}\right ) \]

Antiderivative was successfully verified.

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

[Out]

x + x^2/2 - (2*Sqrt[2]*ArcTan[x/Sqrt[2]])/3 + Log[1 - x]/3 - (2*Log[2 + x^2])/3

_______________________________________________________________________________________

Rubi in Sympy [F]  time = 0., size = 0, normalized size = 0. \[ x + \frac{\log{\left (- x + 1 \right )}}{3} - \frac{2 \log{\left (x^{2} + 2 \right )}}{3} - \frac{2 \sqrt{2} \operatorname{atan}{\left (\frac{\sqrt{2} x}{2} \right )}}{3} + \int x\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

x + log(-x + 1)/3 - 2*log(x**2 + 2)/3 - 2*sqrt(2)*atan(sqrt(2)*x/2)/3 + Integral
(x, x)

_______________________________________________________________________________________

Mathematica [A]  time = 0.0260565, size = 43, normalized size = 0.93 \[ \frac{1}{6} \left (3 x^2-4 \log \left (x^2+2\right )+6 x+2 \log (x-1)-4 \sqrt{2} \tan ^{-1}\left (\frac{x}{\sqrt{2}}\right )-9\right ) \]

Antiderivative was successfully verified.

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

[Out]

(-9 + 6*x + 3*x^2 - 4*Sqrt[2]*ArcTan[x/Sqrt[2]] + 2*Log[-1 + x] - 4*Log[2 + x^2]
)/6

_______________________________________________________________________________________

Maple [A]  time = 0.008, size = 34, normalized size = 0.7 \[ x+{\frac{{x}^{2}}{2}}+{\frac{\ln \left ( -1+x \right ) }{3}}-{\frac{2\,\ln \left ({x}^{2}+2 \right ) }{3}}-{\frac{2\,\sqrt{2}}{3}\arctan \left ({\frac{\sqrt{2}x}{2}} \right ) } \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

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

_______________________________________________________________________________________

Maxima [A]  time = 0.890108, size = 45, normalized size = 0.98 \[ \frac{1}{2} \, x^{2} - \frac{2}{3} \, \sqrt{2} \arctan \left (\frac{1}{2} \, \sqrt{2} x\right ) + x - \frac{2}{3} \, \log \left (x^{2} + 2\right ) + \frac{1}{3} \, \log \left (x - 1\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

1/2*x^2 - 2/3*sqrt(2)*arctan(1/2*sqrt(2)*x) + x - 2/3*log(x^2 + 2) + 1/3*log(x -
 1)

_______________________________________________________________________________________

Fricas [A]  time = 0.254892, size = 45, normalized size = 0.98 \[ \frac{1}{2} \, x^{2} - \frac{2}{3} \, \sqrt{2} \arctan \left (\frac{1}{2} \, \sqrt{2} x\right ) + x - \frac{2}{3} \, \log \left (x^{2} + 2\right ) + \frac{1}{3} \, \log \left (x - 1\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

1/2*x^2 - 2/3*sqrt(2)*arctan(1/2*sqrt(2)*x) + x - 2/3*log(x^2 + 2) + 1/3*log(x -
 1)

_______________________________________________________________________________________

Sympy [A]  time = 0.315118, size = 41, normalized size = 0.89 \[ \frac{x^{2}}{2} + x + \frac{\log{\left (x - 1 \right )}}{3} - \frac{2 \log{\left (x^{2} + 2 \right )}}{3} - \frac{2 \sqrt{2} \operatorname{atan}{\left (\frac{\sqrt{2} x}{2} \right )}}{3} \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

x**2/2 + x + log(x - 1)/3 - 2*log(x**2 + 2)/3 - 2*sqrt(2)*atan(sqrt(2)*x/2)/3

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.261926, size = 46, normalized size = 1. \[ \frac{1}{2} \, x^{2} - \frac{2}{3} \, \sqrt{2} \arctan \left (\frac{1}{2} \, \sqrt{2} x\right ) + x - \frac{2}{3} \,{\rm ln}\left (x^{2} + 2\right ) + \frac{1}{3} \,{\rm ln}\left ({\left | x - 1 \right |}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

1/2*x^2 - 2/3*sqrt(2)*arctan(1/2*sqrt(2)*x) + x - 2/3*ln(x^2 + 2) + 1/3*ln(abs(x
 - 1))