3.47.15 \(\int \frac {2 x-5 x^2-5 x^3+(-1-x) \log (1+2 x+x^2)}{x^2+x^3} \, dx\)

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

________________________________________________________________________________________

Rubi [A]  time = 0.17, antiderivative size = 14, normalized size of antiderivative = 1.00, number of steps used = 10, number of rules used = 8, integrand size = 39, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.205, Rules used = {1593, 6688, 14, 893, 2395, 36, 29, 31} \begin {gather*} \frac {\log \left ((x+1)^2\right )}{x}-5 x \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

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]]

Rule 29

Int[(x_)^(-1), x_Symbol] :> Simp[Log[x], x]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 36

Int[1/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :> Dist[b/(b*c - a*d), Int[1/(a + b*x), x], x] -
Dist[d/(b*c - a*d), Int[1/(c + d*x), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0]

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 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 2395

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))*((f_.) + (g_.)*(x_))^(q_.), x_Symbol] :> Simp[((f + g
*x)^(q + 1)*(a + b*Log[c*(d + e*x)^n]))/(g*(q + 1)), x] - Dist[(b*e*n)/(g*(q + 1)), Int[(f + g*x)^(q + 1)/(d +
 e*x), x], x] /; FreeQ[{a, b, c, d, e, f, g, n, q}, x] && NeQ[e*f - d*g, 0] && NeQ[q, -1]

Rule 6688

Int[u_, x_Symbol] :> With[{v = SimplifyIntegrand[u, x]}, Int[v, x] /; SimplerIntegrandQ[v, u, x]]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.02, size = 14, normalized size = 1.00 \begin {gather*} -5 x+\frac {\log \left ((1+x)^2\right )}{x} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.62, size = 22, normalized size = 1.57 \begin {gather*} -\frac {5 \, x^{2} - \log \left (x^{2} + 2 \, x + 1\right )}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.13, size = 17, normalized size = 1.21 \begin {gather*} -5 \, x + \frac {\log \left (x^{2} + 2 \, x + 1\right )}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.07, size = 18, normalized size = 1.29




method result size



default \(\frac {\ln \left (x^{2}+2 x +1\right )}{x}-5 x\) \(18\)
risch \(\frac {\ln \left (x^{2}+2 x +1\right )}{x}-5 x\) \(18\)
norman \(\frac {-5 x^{2}+\ln \left (x^{2}+2 x +1\right )}{x}\) \(20\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((-x-1)*ln(x^2+2*x+1)-5*x^3-5*x^2+2*x)/(x^3+x^2),x,method=_RETURNVERBOSE)

[Out]

1/x*ln(x^2+2*x+1)-5*x

________________________________________________________________________________________

maxima [A]  time = 0.41, size = 22, normalized size = 1.57 \begin {gather*} -5 \, x + \frac {2 \, {\left (x + 1\right )} \log \left (x + 1\right )}{x} - 2 \, \log \left (x + 1\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 3.19, size = 17, normalized size = 1.21 \begin {gather*} \frac {\ln \left (x^2+2\,x+1\right )}{x}-5\,x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.11, size = 14, normalized size = 1.00 \begin {gather*} - 5 x + \frac {\log {\left (x^{2} + 2 x + 1 \right )}}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-x-1)*ln(x**2+2*x+1)-5*x**3-5*x**2+2*x)/(x**3+x**2),x)

[Out]

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

________________________________________________________________________________________