3.46.70 \(\int \frac {4+3 x+4 x^2}{x+2 x^2+x^3} \, dx\)

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

________________________________________________________________________________________

Rubi [A]  time = 0.02, antiderivative size = 12, normalized size of antiderivative = 0.38, number of steps used = 4, number of rules used = 3, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.130, Rules used = {1594, 27, 893} \begin {gather*} \frac {5}{x+1}+4 \log (x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

5/(1 + x) + 4*Log[x]

Rule 27

Int[(u_.)*((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[u*Cancel[(b/2 + c*x)^(2*p)/c^p], x] /; Fr
eeQ[{a, b, c}, x] && EqQ[b^2 - 4*a*c, 0] && IntegerQ[p]

Rule 893

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))^(n_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :
> Int[ExpandIntegrand[(d + e*x)^m*(f + g*x)^n*(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, f, g}, x] &
& NeQ[e*f - d*g, 0] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0] && IntegerQ[p] && ((EqQ[p, 1] && I
ntegersQ[m, n]) || (ILtQ[m, 0] && ILtQ[n, 0]))

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]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 12, normalized size = 0.38 \begin {gather*} \frac {5}{1+x}+4 \log (x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

5/(1 + x) + 4*Log[x]

________________________________________________________________________________________

fricas [A]  time = 0.56, size = 15, normalized size = 0.47 \begin {gather*} \frac {4 \, {\left (x + 1\right )} \log \relax (x) + 5}{x + 1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.15, size = 13, normalized size = 0.41 \begin {gather*} \frac {5}{x + 1} + 4 \, \log \left ({\left | x \right |}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

5/(x + 1) + 4*log(abs(x))

________________________________________________________________________________________

maple [A]  time = 0.02, size = 13, normalized size = 0.41




method result size



default \(4 \ln \relax (x )+\frac {5}{x +1}\) \(13\)
norman \(4 \ln \relax (x )+\frac {5}{x +1}\) \(13\)
risch \(4 \ln \relax (x )+\frac {5}{x +1}\) \(13\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

4*ln(x)+5/(x+1)

________________________________________________________________________________________

maxima [A]  time = 0.36, size = 12, normalized size = 0.38 \begin {gather*} \frac {5}{x + 1} + 4 \, \log \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 3.15, size = 12, normalized size = 0.38 \begin {gather*} 4\,\ln \relax (x)+\frac {5}{x+1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.08, size = 8, normalized size = 0.25 \begin {gather*} 4 \log {\relax (x )} + \frac {5}{x + 1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________