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

   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 = 18, antiderivative size = 26 \[ \int \frac {(1-x)^2 x^4}{1+x^2} \, dx=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] (verified)

Time = 0.04 (sec) , antiderivative size = 26, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.111, Rules used = {1643, 266} \[ \int \frac {(1-x)^2 x^4}{1+x^2} \, dx=\frac {x^5}{5}-\frac {x^4}{2}+x^2-\log \left (x^2+1\right ) \]

[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{align*} \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{align*}

Mathematica [A] (verified)

Time = 0.03 (sec) , antiderivative size = 26, normalized size of antiderivative = 1.00 \[ \int \frac {(1-x)^2 x^4}{1+x^2} \, dx=x^2-\frac {x^4}{2}+\frac {x^5}{5}-\log \left (1+x^2\right ) \]

[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] (verified)

Time = 0.22 (sec) , antiderivative size = 23, normalized size of antiderivative = 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\)

[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)

Fricas [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 22, normalized size of antiderivative = 0.85 \[ \int \frac {(1-x)^2 x^4}{1+x^2} \, dx=\frac {1}{5} \, x^{5} - \frac {1}{2} \, x^{4} + x^{2} - \log \left (x^{2} + 1\right ) \]

[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] (verification not implemented)

Time = 0.03 (sec) , antiderivative size = 19, normalized size of antiderivative = 0.73 \[ \int \frac {(1-x)^2 x^4}{1+x^2} \, dx=\frac {x^{5}}{5} - \frac {x^{4}}{2} + x^{2} - \log {\left (x^{2} + 1 \right )} \]

[In]

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

[Out]

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

Maxima [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 22, normalized size of antiderivative = 0.85 \[ \int \frac {(1-x)^2 x^4}{1+x^2} \, dx=\frac {1}{5} \, x^{5} - \frac {1}{2} \, x^{4} + x^{2} - \log \left (x^{2} + 1\right ) \]

[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)

Giac [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 22, normalized size of antiderivative = 0.85 \[ \int \frac {(1-x)^2 x^4}{1+x^2} \, dx=\frac {1}{5} \, x^{5} - \frac {1}{2} \, x^{4} + x^{2} - \log \left (x^{2} + 1\right ) \]

[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] (verification not implemented)

Time = 0.05 (sec) , antiderivative size = 22, normalized size of antiderivative = 0.85 \[ \int \frac {(1-x)^2 x^4}{1+x^2} \, dx=x^2-\ln \left (x^2+1\right )-\frac {x^4}{2}+\frac {x^5}{5} \]

[In]

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

[Out]

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