\(\int (1-x+x^2-x^3+x^4) (1+x+x^2+x^3+x^4) \, dx\) [282]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 29, antiderivative size = 30 \[ \int \left (1-x+x^2-x^3+x^4\right ) \left (1+x+x^2+x^3+x^4\right ) \, dx=x+\frac {x^3}{3}+\frac {x^5}{5}+\frac {x^7}{7}+\frac {x^9}{9} \]

[Out]

x+1/3*x^3+1/5*x^5+1/7*x^7+1/9*x^9

Rubi [A] (verified)

Time = 0.03 (sec) , antiderivative size = 30, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.034, Rules used = {6820} \[ \int \left (1-x+x^2-x^3+x^4\right ) \left (1+x+x^2+x^3+x^4\right ) \, dx=\frac {x^9}{9}+\frac {x^7}{7}+\frac {x^5}{5}+\frac {x^3}{3}+x \]

[In]

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

[Out]

x + x^3/3 + x^5/5 + x^7/7 + x^9/9

Rule 6820

Int[u_, x_Symbol] :> With[{v = SimplifyIntegrand[u, x]}, Int[v, x] /; SimplerIntegrandQ[v, u, x]]

Rubi steps \begin{align*} \text {integral}& = \int \left (1+x^2+x^4+x^6+x^8\right ) \, dx \\ & = x+\frac {x^3}{3}+\frac {x^5}{5}+\frac {x^7}{7}+\frac {x^9}{9} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.00 (sec) , antiderivative size = 30, normalized size of antiderivative = 1.00 \[ \int \left (1-x+x^2-x^3+x^4\right ) \left (1+x+x^2+x^3+x^4\right ) \, dx=x+\frac {x^3}{3}+\frac {x^5}{5}+\frac {x^7}{7}+\frac {x^9}{9} \]

[In]

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

[Out]

x + x^3/3 + x^5/5 + x^7/7 + x^9/9

Maple [A] (verified)

Time = 0.08 (sec) , antiderivative size = 23, normalized size of antiderivative = 0.77

method result size
gosper \(x +\frac {1}{3} x^{3}+\frac {1}{5} x^{5}+\frac {1}{7} x^{7}+\frac {1}{9} x^{9}\) \(23\)
default \(x +\frac {1}{3} x^{3}+\frac {1}{5} x^{5}+\frac {1}{7} x^{7}+\frac {1}{9} x^{9}\) \(23\)
norman \(x +\frac {1}{3} x^{3}+\frac {1}{5} x^{5}+\frac {1}{7} x^{7}+\frac {1}{9} x^{9}\) \(23\)
risch \(x +\frac {1}{3} x^{3}+\frac {1}{5} x^{5}+\frac {1}{7} x^{7}+\frac {1}{9} x^{9}\) \(23\)
parallelrisch \(x +\frac {1}{3} x^{3}+\frac {1}{5} x^{5}+\frac {1}{7} x^{7}+\frac {1}{9} x^{9}\) \(23\)

[In]

int((x^4+x^3+x^2+x+1)*(x^4-x^3+x^2-x+1),x,method=_RETURNVERBOSE)

[Out]

x+1/3*x^3+1/5*x^5+1/7*x^7+1/9*x^9

Fricas [A] (verification not implemented)

none

Time = 0.23 (sec) , antiderivative size = 22, normalized size of antiderivative = 0.73 \[ \int \left (1-x+x^2-x^3+x^4\right ) \left (1+x+x^2+x^3+x^4\right ) \, dx=\frac {1}{9} \, x^{9} + \frac {1}{7} \, x^{7} + \frac {1}{5} \, x^{5} + \frac {1}{3} \, x^{3} + x \]

[In]

integrate((x^4+x^3+x^2+x+1)*(x^4-x^3+x^2-x+1),x, algorithm="fricas")

[Out]

1/9*x^9 + 1/7*x^7 + 1/5*x^5 + 1/3*x^3 + x

Sympy [A] (verification not implemented)

Time = 0.02 (sec) , antiderivative size = 20, normalized size of antiderivative = 0.67 \[ \int \left (1-x+x^2-x^3+x^4\right ) \left (1+x+x^2+x^3+x^4\right ) \, dx=\frac {x^{9}}{9} + \frac {x^{7}}{7} + \frac {x^{5}}{5} + \frac {x^{3}}{3} + x \]

[In]

integrate((x**4+x**3+x**2+x+1)*(x**4-x**3+x**2-x+1),x)

[Out]

x**9/9 + x**7/7 + x**5/5 + x**3/3 + x

Maxima [A] (verification not implemented)

none

Time = 0.19 (sec) , antiderivative size = 22, normalized size of antiderivative = 0.73 \[ \int \left (1-x+x^2-x^3+x^4\right ) \left (1+x+x^2+x^3+x^4\right ) \, dx=\frac {1}{9} \, x^{9} + \frac {1}{7} \, x^{7} + \frac {1}{5} \, x^{5} + \frac {1}{3} \, x^{3} + x \]

[In]

integrate((x^4+x^3+x^2+x+1)*(x^4-x^3+x^2-x+1),x, algorithm="maxima")

[Out]

1/9*x^9 + 1/7*x^7 + 1/5*x^5 + 1/3*x^3 + x

Giac [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 22, normalized size of antiderivative = 0.73 \[ \int \left (1-x+x^2-x^3+x^4\right ) \left (1+x+x^2+x^3+x^4\right ) \, dx=\frac {1}{9} \, x^{9} + \frac {1}{7} \, x^{7} + \frac {1}{5} \, x^{5} + \frac {1}{3} \, x^{3} + x \]

[In]

integrate((x^4+x^3+x^2+x+1)*(x^4-x^3+x^2-x+1),x, algorithm="giac")

[Out]

1/9*x^9 + 1/7*x^7 + 1/5*x^5 + 1/3*x^3 + x

Mupad [B] (verification not implemented)

Time = 0.02 (sec) , antiderivative size = 22, normalized size of antiderivative = 0.73 \[ \int \left (1-x+x^2-x^3+x^4\right ) \left (1+x+x^2+x^3+x^4\right ) \, dx=\frac {x^9}{9}+\frac {x^7}{7}+\frac {x^5}{5}+\frac {x^3}{3}+x \]

[In]

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

[Out]

x + x^3/3 + x^5/5 + x^7/7 + x^9/9