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

Optimal. Leaf size=14 \[ \frac{1}{3 (x+1)^3}+\log (x+1) \]

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.0502709, antiderivative size = 14, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 33, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.091, Rules used = {1594, 1680, 14} \[ \frac{1}{3 (x+1)^3}+\log (x+1) \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 1594

Int[(u_.)*((a_.)*(x_)^(p_.) + (b_.)*(x_)^(q_.) + (c_.)*(x_)^(r_.))^(n_.), x_Symbol] :> Int[u*x^(n*p)*(a + b*x^
(q - p) + c*x^(r - p))^n, x] /; FreeQ[{a, b, c, p, q, r}, x] && IntegerQ[n] && PosQ[q - p] && PosQ[r - p]

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]

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rubi steps

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

Mathematica [A]  time = 0.0067934, size = 14, normalized size = 1. \[ \frac{1}{3 (x+1)^3}+\log (x+1) \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [A]  time = 0.006, size = 13, normalized size = 0.9 \begin{align*}{\frac{1}{3\, \left ( 1+x \right ) ^{3}}}+\ln \left ( 1+x \right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/3/(1+x)^3+ln(1+x)

________________________________________________________________________________________

Maxima [A]  time = 1.04856, size = 30, normalized size = 2.14 \begin{align*} \frac{1}{3 \,{\left (x^{3} + 3 \, x^{2} + 3 \, x + 1\right )}} + \log \left (x + 1\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [B]  time = 1.49361, size = 97, normalized size = 6.93 \begin{align*} \frac{3 \,{\left (x^{3} + 3 \, x^{2} + 3 \, x + 1\right )} \log \left (x + 1\right ) + 1}{3 \,{\left (x^{3} + 3 \, x^{2} + 3 \, x + 1\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [A]  time = 0.092009, size = 20, normalized size = 1.43 \begin{align*} \log{\left (x + 1 \right )} + \frac{1}{3 x^{3} + 9 x^{2} + 9 x + 3} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [A]  time = 1.16372, size = 18, normalized size = 1.29 \begin{align*} \frac{1}{3 \,{\left (x + 1\right )}^{3}} + \log \left ({\left | x + 1 \right |}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/3/(x + 1)^3 + log(abs(x + 1))