3.230 \(\int \frac {-1+3 x-3 x^2+x^3}{1+4 x+6 x^2+4 x^3+x^4} \, dx\)

Optimal. Leaf size=28 \[ \frac {6}{x+1}-\frac {6}{(x+1)^2}+\frac {8}{3 (x+1)^3}+\log (x+1) \]

[Out]

8/3/(1+x)^3-6/(1+x)^2+6/(1+x)+ln(1+x)

________________________________________________________________________________________

Rubi [A]  time = 0.03, antiderivative size = 28, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 34, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.059, Rules used = {1680, 43} \[ \frac {6}{x+1}-\frac {6}{(x+1)^2}+\frac {8}{3 (x+1)^3}+\log (x+1) \]

Antiderivative was successfully verified.

[In]

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

[Out]

8/(3*(1 + x)^3) - 6/(1 + x)^2 + 6/(1 + x) + Log[1 + x]

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 1680

Int[(Pq_)*(Q4_)^(p_), x_Symbol] :> With[{a = Coeff[Q4, x, 0], b = Coeff[Q4, x, 1], c = Coeff[Q4, x, 2], d = Co
eff[Q4, x, 3], e = Coeff[Q4, x, 4]}, Subst[Int[SimplifyIntegrand[(Pq /. x -> -(d/(4*e)) + x)*(a + d^4/(256*e^3
) - (b*d)/(8*e) + (c - (3*d^2)/(8*e))*x^2 + e*x^4)^p, x], x], x, d/(4*e) + x] /; EqQ[d^3 - 4*c*d*e + 8*b*e^2,
0] && NeQ[d, 0]] /; FreeQ[p, x] && PolyQ[Pq, x] && PolyQ[Q4, x, 4] &&  !IGtQ[p, 0]

Rubi steps

\begin {align*} \int \frac {-1+3 x-3 x^2+x^3}{1+4 x+6 x^2+4 x^3+x^4} \, dx &=\operatorname {Subst}\left (\int \frac {(-2+x)^3}{x^4} \, dx,x,1+x\right )\\ &=\operatorname {Subst}\left (\int \left (-\frac {8}{x^4}+\frac {12}{x^3}-\frac {6}{x^2}+\frac {1}{x}\right ) \, dx,x,1+x\right )\\ &=\frac {8}{3 (1+x)^3}-\frac {6}{(1+x)^2}+\frac {6}{1+x}+\log (1+x)\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 24, normalized size = 0.86 \[ \frac {2 \left (9 x^2+9 x+4\right )}{3 (x+1)^3}+\log (x+1) \]

Antiderivative was successfully verified.

[In]

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

[Out]

(2*(4 + 9*x + 9*x^2))/(3*(1 + x)^3) + Log[1 + x]

________________________________________________________________________________________

fricas [A]  time = 1.00, size = 46, normalized size = 1.64 \[ \frac {18 \, x^{2} + 3 \, {\left (x^{3} + 3 \, x^{2} + 3 \, x + 1\right )} \log \left (x + 1\right ) + 18 \, x + 8}{3 \, {\left (x^{3} + 3 \, x^{2} + 3 \, x + 1\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/3*(18*x^2 + 3*(x^3 + 3*x^2 + 3*x + 1)*log(x + 1) + 18*x + 8)/(x^3 + 3*x^2 + 3*x + 1)

________________________________________________________________________________________

giac [A]  time = 0.39, size = 23, normalized size = 0.82 \[ \frac {2 \, {\left (9 \, x^{2} + 9 \, x + 4\right )}}{3 \, {\left (x + 1\right )}^{3}} + \log \left ({\left | x + 1 \right |}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

2/3*(9*x^2 + 9*x + 4)/(x + 1)^3 + log(abs(x + 1))

________________________________________________________________________________________

maple [A]  time = 0.01, size = 27, normalized size = 0.96 \[ \ln \left (x +1\right )+\frac {8}{3 \left (x +1\right )^{3}}-\frac {6}{\left (x +1\right )^{2}}+\frac {6}{x +1} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

8/3/(x+1)^3-6/(x+1)^2+6/(x+1)+ln(x+1)

________________________________________________________________________________________

maxima [A]  time = 0.45, size = 32, normalized size = 1.14 \[ \frac {2 \, {\left (9 \, x^{2} + 9 \, x + 4\right )}}{3 \, {\left (x^{3} + 3 \, x^{2} + 3 \, x + 1\right )}} + \log \left (x + 1\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

2/3*(9*x^2 + 9*x + 4)/(x^3 + 3*x^2 + 3*x + 1) + log(x + 1)

________________________________________________________________________________________

mupad [B]  time = 0.04, size = 21, normalized size = 0.75 \[ \ln \left (x+1\right )+\frac {6\,x^2+6\,x+\frac {8}{3}}{{\left (x+1\right )}^3} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

log(x + 1) + (6*x + 6*x^2 + 8/3)/(x + 1)^3

________________________________________________________________________________________

sympy [A]  time = 0.11, size = 29, normalized size = 1.04 \[ \frac {18 x^{2} + 18 x + 8}{3 x^{3} + 9 x^{2} + 9 x + 3} + \log {\left (x + 1 \right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(18*x**2 + 18*x + 8)/(3*x**3 + 9*x**2 + 9*x + 3) + log(x + 1)

________________________________________________________________________________________