3.92.13 \(\int \frac {x^3+3 x^4+3 x^5+x^6+(-2-2 x) \log (x)+(2+4 x) \log ^2(x)}{x^3+3 x^4+3 x^5+x^6} \, dx\)

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

________________________________________________________________________________________

Rubi [B]  time = 0.47, antiderivative size = 49, normalized size of antiderivative = 3.27, number of steps used = 28, number of rules used = 15, integrand size = 55, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.273, Rules used = {6688, 44, 2351, 2304, 2301, 2314, 31, 2317, 2391, 2357, 2305, 2319, 2347, 2344, 2318} \begin {gather*} -\frac {\log ^2(x)}{x^2}+x+\frac {2 \log ^2(x)}{x}+\frac {2 x \log ^2(x)}{x+1}-\frac {\log ^2(x)}{(x+1)^2}-2 \log ^2(x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 31

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

Rule 44

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}, x] && NeQ[b*c - a*d, 0] && ILtQ[m, 0] && IntegerQ[n] &&  !(IGtQ[n, 0] && L
tQ[m + n + 2, 0])

Rule 2301

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))/(x_), x_Symbol] :> Simp[(a + b*Log[c*x^n])^2/(2*b*n), x] /; FreeQ[{a
, b, c, n}, x]

Rule 2304

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[((d*x)^(m + 1)*(a + b*Log[c*x^
n]))/(d*(m + 1)), x] - Simp[(b*n*(d*x)^(m + 1))/(d*(m + 1)^2), x] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[m, -1
]

Rule 2305

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[((d*x)^(m + 1)*(a + b*Lo
g[c*x^n])^p)/(d*(m + 1)), x] - Dist[(b*n*p)/(m + 1), Int[(d*x)^m*(a + b*Log[c*x^n])^(p - 1), x], x] /; FreeQ[{
a, b, c, d, m, n}, x] && NeQ[m, -1] && GtQ[p, 0]

Rule 2314

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

Rule 2317

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/((d_) + (e_.)*(x_)), x_Symbol] :> Simp[(Log[1 + (e*x)/d]*(a +
b*Log[c*x^n])^p)/e, x] - Dist[(b*n*p)/e, Int[(Log[1 + (e*x)/d]*(a + b*Log[c*x^n])^(p - 1))/x, x], x] /; FreeQ[
{a, b, c, d, e, n}, x] && IGtQ[p, 0]

Rule 2318

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/((d_) + (e_.)*(x_))^2, x_Symbol] :> Simp[(x*(a + b*Log[c*x^n])
^p)/(d*(d + e*x)), x] - Dist[(b*n*p)/d, Int[(a + b*Log[c*x^n])^(p - 1)/(d + e*x), x], x] /; FreeQ[{a, b, c, d,
 e, n, p}, x] && GtQ[p, 0]

Rule 2319

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_) + (e_.)*(x_))^(q_.), x_Symbol] :> Simp[((d + e*x)^(q + 1
)*(a + b*Log[c*x^n])^p)/(e*(q + 1)), x] - Dist[(b*n*p)/(e*(q + 1)), Int[((d + e*x)^(q + 1)*(a + b*Log[c*x^n])^
(p - 1))/x, x], x] /; FreeQ[{a, b, c, d, e, n, p, q}, x] && GtQ[p, 0] && NeQ[q, -1] && (EqQ[p, 1] || (Integers
Q[2*p, 2*q] &&  !IGtQ[q, 0]) || (EqQ[p, 2] && NeQ[q, 1]))

Rule 2344

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/((x_)*((d_) + (e_.)*(x_))), x_Symbol] :> Dist[1/d, Int[(a + b*
Log[c*x^n])^p/x, x], x] - Dist[e/d, Int[(a + b*Log[c*x^n])^p/(d + e*x), x], x] /; FreeQ[{a, b, c, d, e, n}, x]
 && IGtQ[p, 0]

Rule 2347

Int[(((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_) + (e_.)*(x_))^(q_))/(x_), x_Symbol] :> Dist[1/d, Int[((
d + e*x)^(q + 1)*(a + b*Log[c*x^n])^p)/x, x], x] - Dist[e/d, Int[(d + e*x)^q*(a + b*Log[c*x^n])^p, x], x] /; F
reeQ[{a, b, c, d, e, n}, x] && IGtQ[p, 0] && LtQ[q, -1] && IntegerQ[2*q]

Rule 2351

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((f_.)*(x_))^(m_.)*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol] :> Wit
h[{u = ExpandIntegrand[a + b*Log[c*x^n], (f*x)^m*(d + e*x^r)^q, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a, b, c,
d, e, f, m, n, q, r}, x] && IntegerQ[q] && (GtQ[q, 0] || (IntegerQ[m] && IntegerQ[r]))

Rule 2357

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*(RFx_), x_Symbol] :> With[{u = ExpandIntegrand[(a + b*Log[c*x^
n])^p, RFx, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a, b, c, n}, x] && RationalFunctionQ[RFx, x] && IGtQ[p, 0]

Rule 2391

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> -Simp[PolyLog[2, -(c*e*x^n)]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 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 \left (1-\frac {2 \log (x)}{x^3 (1+x)^2}+\frac {(2+4 x) \log ^2(x)}{x^3 (1+x)^3}\right ) \, dx\\ &=x-2 \int \frac {\log (x)}{x^3 (1+x)^2} \, dx+\int \frac {(2+4 x) \log ^2(x)}{x^3 (1+x)^3} \, dx\\ &=x-2 \int \left (\frac {\log (x)}{x^3}-\frac {2 \log (x)}{x^2}+\frac {3 \log (x)}{x}-\frac {\log (x)}{(1+x)^2}-\frac {3 \log (x)}{1+x}\right ) \, dx+\int \left (\frac {2 \log ^2(x)}{x^3}-\frac {2 \log ^2(x)}{x^2}+\frac {2 \log ^2(x)}{(1+x)^3}+\frac {2 \log ^2(x)}{(1+x)^2}\right ) \, dx\\ &=x-2 \int \frac {\log (x)}{x^3} \, dx+2 \int \frac {\log (x)}{(1+x)^2} \, dx+2 \int \frac {\log ^2(x)}{x^3} \, dx-2 \int \frac {\log ^2(x)}{x^2} \, dx+2 \int \frac {\log ^2(x)}{(1+x)^3} \, dx+2 \int \frac {\log ^2(x)}{(1+x)^2} \, dx+4 \int \frac {\log (x)}{x^2} \, dx-6 \int \frac {\log (x)}{x} \, dx+6 \int \frac {\log (x)}{1+x} \, dx\\ &=\frac {1}{2 x^2}-\frac {4}{x}+x+\frac {\log (x)}{x^2}-\frac {4 \log (x)}{x}+\frac {2 x \log (x)}{1+x}-3 \log ^2(x)-\frac {\log ^2(x)}{x^2}+\frac {2 \log ^2(x)}{x}-\frac {\log ^2(x)}{(1+x)^2}+\frac {2 x \log ^2(x)}{1+x}+6 \log (x) \log (1+x)-2 \int \frac {1}{1+x} \, dx+2 \int \frac {\log (x)}{x^3} \, dx+2 \int \frac {\log (x)}{x (1+x)^2} \, dx-4 \int \frac {\log (x)}{x^2} \, dx-4 \int \frac {\log (x)}{1+x} \, dx-6 \int \frac {\log (1+x)}{x} \, dx\\ &=x+\frac {2 x \log (x)}{1+x}-3 \log ^2(x)-\frac {\log ^2(x)}{x^2}+\frac {2 \log ^2(x)}{x}-\frac {\log ^2(x)}{(1+x)^2}+\frac {2 x \log ^2(x)}{1+x}-2 \log (1+x)+2 \log (x) \log (1+x)+6 \text {Li}_2(-x)-2 \int \frac {\log (x)}{(1+x)^2} \, dx+2 \int \frac {\log (x)}{x (1+x)} \, dx+4 \int \frac {\log (1+x)}{x} \, dx\\ &=x-3 \log ^2(x)-\frac {\log ^2(x)}{x^2}+\frac {2 \log ^2(x)}{x}-\frac {\log ^2(x)}{(1+x)^2}+\frac {2 x \log ^2(x)}{1+x}-2 \log (1+x)+2 \log (x) \log (1+x)+2 \text {Li}_2(-x)+2 \int \frac {1}{1+x} \, dx+2 \int \frac {\log (x)}{x} \, dx-2 \int \frac {\log (x)}{1+x} \, dx\\ &=x-2 \log ^2(x)-\frac {\log ^2(x)}{x^2}+\frac {2 \log ^2(x)}{x}-\frac {\log ^2(x)}{(1+x)^2}+\frac {2 x \log ^2(x)}{1+x}+2 \text {Li}_2(-x)+2 \int \frac {\log (1+x)}{x} \, dx\\ &=x-2 \log ^2(x)-\frac {\log ^2(x)}{x^2}+\frac {2 \log ^2(x)}{x}-\frac {\log ^2(x)}{(1+x)^2}+\frac {2 x \log ^2(x)}{1+x}\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.06, size = 25, normalized size = 1.67 \begin {gather*} \frac {x^3 (1+x)^2-\log ^2(x)}{x^2 (1+x)^2} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [B]  time = 0.63, size = 33, normalized size = 2.20 \begin {gather*} \frac {x^{5} + 2 \, x^{4} + x^{3} - \log \relax (x)^{2}}{x^{4} + 2 \, x^{3} + x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(x^5 + 2*x^4 + x^3 - log(x)^2)/(x^4 + 2*x^3 + x^2)

________________________________________________________________________________________

giac [B]  time = 0.16, size = 35, normalized size = 2.33 \begin {gather*} -{\left (\frac {2 \, x + 3}{x^{2} + 2 \, x + 1} - \frac {2 \, x - 1}{x^{2}}\right )} \log \relax (x)^{2} + x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.15, size = 22, normalized size = 1.47




method result size



risch \(-\frac {\ln \relax (x )^{2}}{x^{2} \left (x^{2}+2 x +1\right )}+x\) \(22\)
norman \(\frac {x^{5}-\frac {x^{2}}{2}+\frac {3 x^{4}}{2}-\ln \relax (x )^{2}}{x^{2} \left (x +1\right )^{2}}\) \(30\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [B]  time = 0.40, size = 85, normalized size = 5.67 \begin {gather*} x - \frac {\log \relax (x)^{2}}{x^{4} + 2 \, x^{3} + x^{2}} - \frac {6 \, x + 5}{2 \, {\left (x^{2} + 2 \, x + 1\right )}} + \frac {3 \, {\left (4 \, x + 3\right )}}{2 \, {\left (x^{2} + 2 \, x + 1\right )}} - \frac {3 \, {\left (2 \, x + 1\right )}}{2 \, {\left (x^{2} + 2 \, x + 1\right )}} - \frac {1}{2 \, {\left (x^{2} + 2 \, x + 1\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 7.53, size = 16, normalized size = 1.07 \begin {gather*} x-\frac {{\ln \relax (x)}^2}{x^2\,{\left (x+1\right )}^2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.15, size = 17, normalized size = 1.13 \begin {gather*} x - \frac {\log {\relax (x )}^{2}}{x^{4} + 2 x^{3} + x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________