3.5.83 \(\int \frac {1+x+(1+2 x+x^2) \log (x)+(-2-4 x) \log (x) \log (x+x^2)}{(x+x^2) \log (x)} \, dx\)

Optimal. Leaf size=20 \[ -\log ^2\left (x+x^2\right )+\log \left (4 e^x x \log (x)\right ) \]

________________________________________________________________________________________

Rubi [B]  time = 0.53, antiderivative size = 47, normalized size of antiderivative = 2.35, number of steps used = 19, number of rules used = 11, integrand size = 40, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.275, Rules used = {1593, 6742, 43, 2302, 29, 2514, 2494, 2301, 2317, 2391, 2390} \begin {gather*} x+\log ^2(x)+\log ^2(x+1)+2 \log (x+1) \log (x)-2 \log (x (x+1)) \log (x)+\log (x)-2 \log (x+1) \log (x (x+1))+\log (\log (x)) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 29

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

Rule 43

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, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 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 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 2302

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/(x_), x_Symbol] :> Dist[1/(b*n), Subst[Int[x^p, x], x, a + b*L
og[c*x^n]], x] /; FreeQ[{a, b, c, n, p}, x]

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 2390

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*((f_) + (g_.)*(x_))^(q_.), x_Symbol] :> Dist[1/
e, Subst[Int[((f*x)/d)^q*(a + b*Log[c*x^n])^p, x], x, d + e*x], x] /; FreeQ[{a, b, c, d, e, f, g, n, p, q}, x]
 && EqQ[e*f - d*g, 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 2494

Int[Log[(e_.)*((f_.)*((a_.) + (b_.)*(x_))^(p_.)*((c_.) + (d_.)*(x_))^(q_.))^(r_.)]/((g_.) + (h_.)*(x_)), x_Sym
bol] :> Simp[(Log[g + h*x]*Log[e*(f*(a + b*x)^p*(c + d*x)^q)^r])/h, x] + (-Dist[(b*p*r)/h, Int[Log[g + h*x]/(a
 + b*x), x], x] - Dist[(d*q*r)/h, Int[Log[g + h*x]/(c + d*x), x], x]) /; FreeQ[{a, b, c, d, e, f, g, h, p, q,
r}, x] && NeQ[b*c - a*d, 0]

Rule 2514

Int[Log[(e_.)*((f_.)*((a_.) + (b_.)*(x_))^(p_.)*((c_.) + (d_.)*(x_))^(q_.))^(r_.)]^(s_.)*(RFx_), x_Symbol] :>
With[{u = ExpandIntegrand[Log[e*(f*(a + b*x)^p*(c + d*x)^q)^r]^s, RFx, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a,
 b, c, d, e, f, p, q, r, s}, x] && RationalFunctionQ[RFx, x] && IGtQ[s, 0]

Rule 6742

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

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.08, size = 17, normalized size = 0.85 \begin {gather*} x+\log (x)-\log ^2(x (1+x))+\log (\log (x)) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.89, size = 17, normalized size = 0.85 \begin {gather*} -\log \left (x^{2} + x\right )^{2} + x + \log \relax (x) + \log \left (\log \relax (x)\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-log(x^2 + x)^2 + x + log(x) + log(log(x))

________________________________________________________________________________________

giac [A]  time = 0.27, size = 32, normalized size = 1.60 \begin {gather*} -2 \, {\left (\log \left (x + 1\right ) + \log \relax (x)\right )} \log \left (x + 1\right ) + \log \left (x + 1\right )^{2} - \log \relax (x)^{2} + x + \log \relax (x) + \log \left (\log \relax (x)\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.29, size = 28, normalized size = 1.40




method result size



norman \(x +\ln \left (x^{2}+x \right )-\ln \left (x^{2}+x \right )^{2}-\ln \left (x +1\right )+\ln \left (\ln \relax (x )\right )\) \(28\)
default \(\ln \left (\ln \relax (x )\right )+x +\ln \relax (x )-2 \ln \relax (x ) \ln \left (x^{2}+x \right )+\ln \relax (x )^{2}+2 \ln \relax (x ) \ln \left (x +1\right )-2 \ln \left (x +1\right ) \ln \left (x^{2}+x \right )+\ln \left (x +1\right )^{2}\) \(48\)
risch \(\ln \left (\ln \relax (x )\right )+x +i \pi \,\mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i \left (x +1\right )\right ) \mathrm {csgn}\left (i x \left (x +1\right )\right ) \ln \relax (x )-i \pi \,\mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i x \left (x +1\right )\right )^{2} \ln \relax (x )-i \pi \,\mathrm {csgn}\left (i \left (x +1\right )\right ) \mathrm {csgn}\left (i x \left (x +1\right )\right )^{2} \ln \relax (x )+i \pi \mathrm {csgn}\left (i x \left (x +1\right )\right )^{3} \ln \relax (x )+\ln \relax (x )+i \pi \ln \left (x +1\right ) \mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i \left (x +1\right )\right ) \mathrm {csgn}\left (i x \left (x +1\right )\right )-i \pi \ln \left (x +1\right ) \mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i x \left (x +1\right )\right )^{2}-i \pi \ln \left (x +1\right ) \mathrm {csgn}\left (i \left (x +1\right )\right ) \mathrm {csgn}\left (i x \left (x +1\right )\right )^{2}+i \pi \ln \left (x +1\right ) \mathrm {csgn}\left (i x \left (x +1\right )\right )^{3}-\ln \relax (x )^{2}-2 \ln \relax (x ) \ln \left (x +1\right )-\ln \left (x +1\right )^{2}\) \(210\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.48, size = 29, normalized size = 1.45 \begin {gather*} -\log \left (x + 1\right )^{2} - 2 \, \log \left (x + 1\right ) \log \relax (x) - \log \relax (x)^{2} + x + \log \relax (x) + \log \left (\log \relax (x)\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 0.66, size = 17, normalized size = 0.85 \begin {gather*} -{\ln \left (x^2+x\right )}^2+x+\ln \left (\ln \relax (x)\right )+\ln \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x + log(log(x)) + log(x) - log(x + x^2)^2

________________________________________________________________________________________

sympy [A]  time = 0.36, size = 17, normalized size = 0.85 \begin {gather*} x + \log {\relax (x )} - \log {\left (x^{2} + x \right )}^{2} + \log {\left (\log {\relax (x )} \right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x + log(x) - log(x**2 + x)**2 + log(log(x))

________________________________________________________________________________________