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

Optimal. Leaf size=30 \[ 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]
time = 0.02, antiderivative size = 30, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.034, Rules used = {6820} \begin {gather*} \frac {x^9}{9}+\frac {x^7}{7}+\frac {x^5}{5}+\frac {x^3}{3}+x \end {gather*}

Antiderivative was successfully verified.

[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 {gather*} \begin {aligned} \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 {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]
time = 0.00, size = 30, normalized size = 1.00 \begin {gather*} x+\frac {x^3}{3}+\frac {x^5}{5}+\frac {x^7}{7}+\frac {x^9}{9} \end {gather*}

Antiderivative was successfully verified.

[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]
time = 0.05, size = 23, normalized size = 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\)

Verification of antiderivative is not currently implemented for this CAS.

[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

________________________________________________________________________________________

Maxima [A]
time = 0.34, size = 22, normalized size = 0.73 \begin {gather*} \frac {1}{9} \, x^{9} + \frac {1}{7} \, x^{7} + \frac {1}{5} \, x^{5} + \frac {1}{3} \, x^{3} + x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[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

________________________________________________________________________________________

Fricas [A]
time = 0.55, size = 22, normalized size = 0.73 \begin {gather*} \frac {1}{9} \, x^{9} + \frac {1}{7} \, x^{7} + \frac {1}{5} \, x^{5} + \frac {1}{3} \, x^{3} + x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[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]
time = 0.01, size = 20, normalized size = 0.67 \begin {gather*} \frac {x^{9}}{9} + \frac {x^{7}}{7} + \frac {x^{5}}{5} + \frac {x^{3}}{3} + x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[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

________________________________________________________________________________________

Giac [A]
time = 0.48, size = 22, normalized size = 0.73 \begin {gather*} \frac {1}{9} \, x^{9} + \frac {1}{7} \, x^{7} + \frac {1}{5} \, x^{5} + \frac {1}{3} \, x^{3} + x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[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]
time = 0.02, size = 22, normalized size = 0.73 \begin {gather*} \frac {x^9}{9}+\frac {x^7}{7}+\frac {x^5}{5}+\frac {x^3}{3}+x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[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

________________________________________________________________________________________

Chatgpt [F] Failed to verify
time = 1.00, size = 45, normalized size = 1.50 \begin {gather*} \frac {x^{9}}{9}+\frac {x^{7}}{9}+\frac {2 x^{6}}{9}-\frac {x^{5}}{9}+\frac {2 x^{4}}{9}+\frac {x^{3}}{9}+\frac {x}{9}+\frac {5 \ln \left (x^{2}-x +1\right )}{3} \end {gather*}

Warning: Unable to verify antiderivative.

[In]

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

[Out]

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

________________________________________________________________________________________