3.284 \(\int \frac{2+2 x+x^4}{x^4+x^5} \, dx\)

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.0320389, antiderivative size = 12, normalized size of antiderivative = 1., 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 = {1593, 1620} \[ \log (x+1)-\frac{2}{3 x^3} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 1593

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

Rule 1620

Int[(Px_)*((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[Px*(a + b*x)
^m*(c + d*x)^n, x], x] /; FreeQ[{a, b, c, d, m, n}, x] && PolyQ[Px, x] && (IntegersQ[m, n] || IGtQ[m, -2]) &&
GtQ[Expon[Px, x], 2]

Rubi steps

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

Mathematica [A]  time = 0.0039845, size = 12, normalized size = 1. \[ \log (x+1)-\frac{2}{3 x^3} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x^4+2*x+2)/(x^5+x^4),x)

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [A]  time = 1.51519, size = 43, normalized size = 3.58 \begin{align*} \frac{3 \, x^{3} \log \left (x + 1\right ) - 2}{3 \, x^{3}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [A]  time = 0.090996, size = 10, normalized size = 0.83 \begin{align*} \log{\left (x + 1 \right )} - \frac{2}{3 x^{3}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x**4+2*x+2)/(x**5+x**4),x)

[Out]

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

________________________________________________________________________________________

Giac [A]  time = 1.13153, size = 15, normalized size = 1.25 \begin{align*} -\frac{2}{3 \, x^{3}} + \log \left ({\left | x + 1 \right |}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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