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

Optimal. Leaf size=32 \[ \frac{x^7}{7}-\frac{2 x^6}{3}+x^5-\frac{4 x^3}{3}+4 x-4 \tan ^{-1}(x) \]

[Out]

4*x - (4*x^3)/3 + x^5 - (2*x^6)/3 + x^7/7 - 4*ArcTan[x]

_______________________________________________________________________________________

Rubi [A]  time = 0.0634226, antiderivative size = 32, 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 \[ \frac{x^7}{7}-\frac{2 x^6}{3}+x^5-\frac{4 x^3}{3}+4 x-4 \tan ^{-1}(x) \]

Antiderivative was successfully verified.

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

[Out]

4*x - (4*x^3)/3 + x^5 - (2*x^6)/3 + x^7/7 - 4*ArcTan[x]

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 5.00429, size = 29, normalized size = 0.91 \[ \frac{x^{7}}{7} - \frac{2 x^{6}}{3} + x^{5} - \frac{4 x^{3}}{3} + 4 x - 4 \operatorname{atan}{\left (x \right )} \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

x**7/7 - 2*x**6/3 + x**5 - 4*x**3/3 + 4*x - 4*atan(x)

_______________________________________________________________________________________

Mathematica [A]  time = 0.0365245, size = 32, normalized size = 1. \[ \frac{x^7}{7}-\frac{2 x^6}{3}+x^5-\frac{4 x^3}{3}+4 x-4 \tan ^{-1}(x) \]

Antiderivative was successfully verified.

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

[Out]

4*x - (4*x^3)/3 + x^5 - (2*x^6)/3 + x^7/7 - 4*ArcTan[x]

_______________________________________________________________________________________

Maple [A]  time = 0.004, size = 27, normalized size = 0.8 \[ 4\,x-{\frac{4\,{x}^{3}}{3}}+{x}^{5}-{\frac{2\,{x}^{6}}{3}}+{\frac{{x}^{7}}{7}}-4\,\arctan \left ( x \right ) \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

4*x-4/3*x^3+x^5-2/3*x^6+1/7*x^7-4*arctan(x)

_______________________________________________________________________________________

Maxima [A]  time = 0.901996, size = 35, normalized size = 1.09 \[ \frac{1}{7} \, x^{7} - \frac{2}{3} \, x^{6} + x^{5} - \frac{4}{3} \, x^{3} + 4 \, x - 4 \, \arctan \left (x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

1/7*x^7 - 2/3*x^6 + x^5 - 4/3*x^3 + 4*x - 4*arctan(x)

_______________________________________________________________________________________

Fricas [A]  time = 0.282765, size = 35, normalized size = 1.09 \[ \frac{1}{7} \, x^{7} - \frac{2}{3} \, x^{6} + x^{5} - \frac{4}{3} \, x^{3} + 4 \, x - 4 \, \arctan \left (x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

1/7*x^7 - 2/3*x^6 + x^5 - 4/3*x^3 + 4*x - 4*arctan(x)

_______________________________________________________________________________________

Sympy [A]  time = 0.180476, size = 29, normalized size = 0.91 \[ \frac{x^{7}}{7} - \frac{2 x^{6}}{3} + x^{5} - \frac{4 x^{3}}{3} + 4 x - 4 \operatorname{atan}{\left (x \right )} \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

x**7/7 - 2*x**6/3 + x**5 - 4*x**3/3 + 4*x - 4*atan(x)

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.258654, size = 35, normalized size = 1.09 \[ \frac{1}{7} \, x^{7} - \frac{2}{3} \, x^{6} + x^{5} - \frac{4}{3} \, x^{3} + 4 \, x - 4 \, \arctan \left (x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

1/7*x^7 - 2/3*x^6 + x^5 - 4/3*x^3 + 4*x - 4*arctan(x)