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/3*x^3+x^5-2/3*x^6+1/7*x^7-4*arctan(x)

________________________________________________________________________________________

Rubi [A]  time = 0.04, antiderivative size = 32, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {1629, 203} \[ \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]

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 1629

Int[(Pq_)*((d_) + (e_.)*(x_))^(m_.)*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[(d + e*x)^m*
Pq*(a + c*x^2)^p, x], x] /; FreeQ[{a, c, d, e, m}, x] && PolyQ[Pq, x] && IGtQ[p, -2]

Rubi steps

\begin {align*} \int \frac {(-1+x)^4 x^4}{1+x^2} \, dx &=\int \left (4-4 x^2+5 x^4-4 x^5+x^6-\frac {4}{1+x^2}\right ) \, dx\\ &=4 x-\frac {4 x^3}{3}+x^5-\frac {2 x^6}{3}+\frac {x^7}{7}-4 \int \frac {1}{1+x^2} \, dx\\ &=4 x-\frac {4 x^3}{3}+x^5-\frac {2 x^6}{3}+\frac {x^7}{7}-4 \tan ^{-1}(x)\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.02, size = 32, normalized size = 1.00 \[ \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]

________________________________________________________________________________________

fricas [A]  time = 0.81, size = 26, normalized size = 0.81 \[ \frac {1}{7} \, x^{7} - \frac {2}{3} \, x^{6} + x^{5} - \frac {4}{3} \, x^{3} + 4 \, x - 4 \, \arctan \relax (x) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-1+x)^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)

________________________________________________________________________________________

giac [A]  time = 0.37, size = 26, normalized size = 0.81 \[ \frac {1}{7} \, x^{7} - \frac {2}{3} \, x^{6} + x^{5} - \frac {4}{3} \, x^{3} + 4 \, x - 4 \, \arctan \relax (x) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-1+x)^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)

________________________________________________________________________________________

maple [A]  time = 0.00, size = 27, normalized size = 0.84 \[ \frac {x^{7}}{7}-\frac {2 x^{6}}{3}+x^{5}-\frac {4 x^{3}}{3}+4 x -4 \arctan \relax (x ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x-1)^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 = 1.51, size = 26, normalized size = 0.81 \[ \frac {1}{7} \, x^{7} - \frac {2}{3} \, x^{6} + x^{5} - \frac {4}{3} \, x^{3} + 4 \, x - 4 \, \arctan \relax (x) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-1+x)^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)

________________________________________________________________________________________

mupad [B]  time = 0.02, size = 26, normalized size = 0.81 \[ 4\,x-4\,\mathrm {atan}\relax (x)-\frac {4\,x^3}{3}+x^5-\frac {2\,x^6}{3}+\frac {x^7}{7} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.10, 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}{\relax (x )} \]

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)

________________________________________________________________________________________