3.4.6 \(\int \frac {(1-x)^2 x^4}{1+x^2} \, dx\) [306]

Optimal. Leaf size=26 \[ x^2-\frac {x^4}{2}+\frac {x^5}{5}-\log \left (1+x^2\right ) \]

[Out]

x^2-1/2*x^4+1/5*x^5-ln(x^2+1)

________________________________________________________________________________________

Rubi [A]
time = 0.03, antiderivative size = 26, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.111, Rules used = {1643, 266} \begin {gather*} \frac {x^5}{5}-\frac {x^4}{2}+x^2-\log \left (x^2+1\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

x^2 - x^4/2 + x^5/5 - Log[1 + x^2]

Rule 266

Int[(x_)^(m_.)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Simp[Log[RemoveContent[a + b*x^n, x]]/(b*n), x] /; FreeQ
[{a, b, m, n}, x] && EqQ[m, n - 1]

Rule 1643

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 {gather*} \begin {aligned} \text {Integral} &=\int \left (2 x-2 x^3+x^4-\frac {2 x}{1+x^2}\right ) \, dx\\ &=x^2-\frac {x^4}{2}+\frac {x^5}{5}-2 \int \frac {x}{1+x^2} \, dx\\ &=x^2-\frac {x^4}{2}+\frac {x^5}{5}-\log \left (1+x^2\right )\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]
time = 0.02, size = 26, normalized size = 1.00 \begin {gather*} x^2-\frac {x^4}{2}+\frac {x^5}{5}-\log \left (1+x^2\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

x^2 - x^4/2 + x^5/5 - Log[1 + x^2]

________________________________________________________________________________________

Maple [A]
time = 0.10, size = 23, normalized size = 0.88

method result size
default \(x^{2}-\frac {x^{4}}{2}+\frac {x^{5}}{5}-\ln \left (x^{2}+1\right )\) \(23\)
norman \(x^{2}-\frac {x^{4}}{2}+\frac {x^{5}}{5}-\ln \left (x^{2}+1\right )\) \(23\)
risch \(x^{2}-\frac {x^{4}}{2}+\frac {x^{5}}{5}-\ln \left (x^{2}+1\right )\) \(23\)
parallelrisch \(x^{2}-\frac {x^{4}}{2}+\frac {x^{5}}{5}-\ln \left (x^{2}+1\right )\) \(23\)
meijerg \(-\frac {x \left (-5 x^{2}+15\right )}{15}+\frac {x^{2} \left (-3 x^{2}+6\right )}{6}-\ln \left (x^{2}+1\right )+\frac {x \left (21 x^{4}-35 x^{2}+105\right )}{105}\) \(47\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x^2-1/2*x^4+1/5*x^5-ln(x^2+1)

________________________________________________________________________________________

Maxima [A]
time = 0.46, size = 22, normalized size = 0.85 \begin {gather*} \frac {1}{5} \, x^{5} - \frac {1}{2} \, x^{4} + x^{2} - \log \left (x^{2} + 1\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/5*x^5 - 1/2*x^4 + x^2 - log(x^2 + 1)

________________________________________________________________________________________

Fricas [A]
time = 0.56, size = 22, normalized size = 0.85 \begin {gather*} \frac {1}{5} \, x^{5} - \frac {1}{2} \, x^{4} + x^{2} - \log \left (x^{2} + 1\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/5*x^5 - 1/2*x^4 + x^2 - log(x^2 + 1)

________________________________________________________________________________________

Sympy [A]
time = 0.02, size = 19, normalized size = 0.73 \begin {gather*} \frac {x^{5}}{5} - \frac {x^{4}}{2} + x^{2} - \log {\left (x^{2} + 1 \right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x**5/5 - x**4/2 + x**2 - log(x**2 + 1)

________________________________________________________________________________________

Giac [A]
time = 0.71, size = 22, normalized size = 0.85 \begin {gather*} \frac {1}{5} \, x^{5} - \frac {1}{2} \, x^{4} + x^{2} - \log \left (x^{2} + 1\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/5*x^5 - 1/2*x^4 + x^2 - log(x^2 + 1)

________________________________________________________________________________________

Mupad [B]
time = 0.03, size = 22, normalized size = 0.85 \begin {gather*} x^2-\ln \left (x^2+1\right )-\frac {x^4}{2}+\frac {x^5}{5} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x^2 - log(x^2 + 1) - x^4/2 + x^5/5

________________________________________________________________________________________

Chatgpt [F] Failed to verify
time = 1.00, size = 36, normalized size = 1.38 \begin {gather*} \frac {\left (x^{2}-2\right ) \arctan \left (x \right )}{2}-\frac {x \left (x^{2}-1\right )}{2}+\frac {x^{5}}{5 x^{2}+5}+\frac {x^{3}}{3} \end {gather*}

Warning: Unable to verify antiderivative.

[In]

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

[Out]

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

________________________________________________________________________________________