3.43.71 \(\int \frac {28-42 x+20 x^2+8 x^3-8 x^4+(-6 x-8 x^2+8 x^3) \log (x)+(4-6 x-6 x^2+12 x^3-4 x^4+(4-6 x+2 x^2) \log (x)) \log (2-3 x+x^2)}{2+5 x-3 x^2-8 x^3+4 x^4} \, dx\)

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

________________________________________________________________________________________

Rubi [B]  time = 1.55, antiderivative size = 111, normalized size of antiderivative = 4.27, number of steps used = 69, number of rules used = 25, integrand size = 103, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.243, Rules used = {6742, 72, 148, 180, 2357, 2316, 2315, 2317, 2391, 697, 2314, 31, 2525, 2074, 2528, 2523, 773, 632, 2524, 2418, 2394, 2393, 32, 2557, 12} \begin {gather*} -x \log \left (x^2-3 x+2\right )-\frac {\log (x) \log \left (x^2-3 x+2\right )}{2 x+1}+\log (x) \log \left (x^2-3 x+2\right )-\frac {\log \left (x^2-3 x+2\right )}{2 (2 x+1)}-\frac {7}{2 x+1}+\frac {1}{2} \log (1-x)+\frac {1}{2} \log (2-x)+\log (2) \log (x-2)-\log (2) \log (2 x-4) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(28 - 42*x + 20*x^2 + 8*x^3 - 8*x^4 + (-6*x - 8*x^2 + 8*x^3)*Log[x] + (4 - 6*x - 6*x^2 + 12*x^3 - 4*x^4 +
(4 - 6*x + 2*x^2)*Log[x])*Log[2 - 3*x + x^2])/(2 + 5*x - 3*x^2 - 8*x^3 + 4*x^4),x]

[Out]

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

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 31

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

Rule 32

Int[((a_.) + (b_.)*(x_))^(m_), x_Symbol] :> Simp[(a + b*x)^(m + 1)/(b*(m + 1)), x] /; FreeQ[{a, b, m}, x] && N
eQ[m, -1]

Rule 72

Int[((e_.) + (f_.)*(x_))^(p_.)/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :> Int[ExpandIntegrand[(
e + f*x)^p/((a + b*x)*(c + d*x)), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && IntegerQ[p]

Rule 148

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_.)*(x_))^(p_)*((g_.) + (h_.)*(x_)), x_Symb
ol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d*x)^n*(e + f*x)^p*(g + h*x), x], x] /; FreeQ[{a, b, c, d, e, f, g
, h, m}, x] && (IntegersQ[m, n, p] || (IGtQ[n, 0] && IGtQ[p, 0]))

Rule 180

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_.)*(x_))^(p_)*((g_.) + (h_.)*(x_))^(q_), x
_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d*x)^n*(e + f*x)^p*(g + h*x)^q, x], x] /; FreeQ[{a, b, c, d,
e, f, g, h, m, n}, x] && IntegersQ[p, q]

Rule 632

Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> With[{q = Rt[b^2 - 4*a*c, 2]}, Dist[
(c*d - e*(b/2 - q/2))/q, Int[1/(b/2 - q/2 + c*x), x], x] - Dist[(c*d - e*(b/2 + q/2))/q, Int[1/(b/2 + q/2 + c*
x), x], x]] /; FreeQ[{a, b, c, d, e}, x] && NeQ[2*c*d - b*e, 0] && NeQ[b^2 - 4*a*c, 0] && NiceSqrtQ[b^2 - 4*a*
c]

Rule 697

Int[((d_) + (e_.)*(x_))^(m_)*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[(d + e*x)^m*(a + c*
x^2)^p, x], x] /; FreeQ[{a, c, d, e, m}, x] && NeQ[c*d^2 + a*e^2, 0] && IGtQ[p, 0]

Rule 773

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

Rule 2074

Int[(P_)^(p_)*(Q_)^(q_.), x_Symbol] :> With[{PP = Factor[P]}, Int[ExpandIntegrand[PP^p*Q^q, x], x] /;  !SumQ[N
onfreeFactors[PP, x]]] /; FreeQ[q, x] && PolyQ[P, x] && PolyQ[Q, x] && IntegerQ[p] && NeQ[P, x]

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 2315

Int[Log[(c_.)*(x_)]/((d_) + (e_.)*(x_)), x_Symbol] :> -Simp[PolyLog[2, 1 - c*x]/e, x] /; FreeQ[{c, d, e}, x] &
& EqQ[e + c*d, 0]

Rule 2316

Int[((a_.) + Log[(c_.)*(x_)]*(b_.))/((d_) + (e_.)*(x_)), x_Symbol] :> Simp[((a + b*Log[-((c*d)/e)])*Log[d + e*
x])/e, x] + Dist[b, Int[Log[-((e*x)/d)]/(d + e*x), x], x] /; FreeQ[{a, b, c, d, e}, x] && GtQ[-((c*d)/e), 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 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 2393

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

Rule 2394

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

Rule 2418

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*(RFx_), x_Symbol] :> With[{u = ExpandIntegrand[
(a + b*Log[c*(d + e*x)^n])^p, RFx, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a, b, c, d, e, n}, x] && RationalFunct
ionQ[RFx, x] && IntegerQ[p]

Rule 2523

Int[((a_.) + Log[(c_.)*(RFx_)^(p_.)]*(b_.))^(n_.), x_Symbol] :> Simp[x*(a + b*Log[c*RFx^p])^n, x] - Dist[b*n*p
, Int[SimplifyIntegrand[(x*(a + b*Log[c*RFx^p])^(n - 1)*D[RFx, x])/RFx, x], x], x] /; FreeQ[{a, b, c, p}, x] &
& RationalFunctionQ[RFx, x] && IGtQ[n, 0]

Rule 2524

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

Rule 2525

Int[((a_.) + Log[(c_.)*(RFx_)^(p_.)]*(b_.))^(n_.)*((d_.) + (e_.)*(x_))^(m_.), x_Symbol] :> Simp[((d + e*x)^(m
+ 1)*(a + b*Log[c*RFx^p])^n)/(e*(m + 1)), x] - Dist[(b*n*p)/(e*(m + 1)), Int[SimplifyIntegrand[((d + e*x)^(m +
 1)*(a + b*Log[c*RFx^p])^(n - 1)*D[RFx, x])/RFx, x], x], x] /; FreeQ[{a, b, c, d, e, m, p}, x] && RationalFunc
tionQ[RFx, x] && IGtQ[n, 0] && (EqQ[n, 1] || IntegerQ[m]) && NeQ[m, -1]

Rule 2528

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

Rule 2557

Int[Log[v_]*Log[w_]*(u_), x_Symbol] :> With[{z = IntHide[u, x]}, Dist[Log[v]*Log[w], z, x] + (-Int[SimplifyInt
egrand[(z*Log[w]*D[v, x])/v, x], x] - Int[SimplifyIntegrand[(z*Log[v]*D[w, x])/w, x], x]) /; InverseFunctionFr
eeQ[z, x]] /; InverseFunctionFreeQ[v, x] && InverseFunctionFreeQ[w, x]

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 \left (\frac {28}{(-2+x) (-1+x) (1+2 x)^2}-\frac {42 x}{(-2+x) (-1+x) (1+2 x)^2}+\frac {20 x^2}{(-2+x) (-1+x) (1+2 x)^2}+\frac {8 x^3}{(-2+x) (-1+x) (1+2 x)^2}-\frac {8 x^4}{(-2+x) (-1+x) (1+2 x)^2}+\frac {2 x (-3+2 x) \log (x)}{(-2+x) (-1+x) (1+2 x)}-\frac {2 \left (-1+2 x^2-\log (x)\right ) \log \left (2-3 x+x^2\right )}{(1+2 x)^2}\right ) \, dx\\ &=2 \int \frac {x (-3+2 x) \log (x)}{(-2+x) (-1+x) (1+2 x)} \, dx-2 \int \frac {\left (-1+2 x^2-\log (x)\right ) \log \left (2-3 x+x^2\right )}{(1+2 x)^2} \, dx+8 \int \frac {x^3}{(-2+x) (-1+x) (1+2 x)^2} \, dx-8 \int \frac {x^4}{(-2+x) (-1+x) (1+2 x)^2} \, dx+20 \int \frac {x^2}{(-2+x) (-1+x) (1+2 x)^2} \, dx+28 \int \frac {1}{(-2+x) (-1+x) (1+2 x)^2} \, dx-42 \int \frac {x}{(-2+x) (-1+x) (1+2 x)^2} \, dx\\ &=2 \int \left (\frac {2 \log (x)}{5 (-2+x)}+\frac {\log (x)}{3 (-1+x)}+\frac {8 \log (x)}{15 (1+2 x)}\right ) \, dx-2 \int \left (-\frac {\log \left (2-3 x+x^2\right )}{(1+2 x)^2}+\frac {2 x^2 \log \left (2-3 x+x^2\right )}{(1+2 x)^2}-\frac {\log (x) \log \left (2-3 x+x^2\right )}{(1+2 x)^2}\right ) \, dx-8 \int \left (\frac {1}{4}+\frac {16}{25 (-2+x)}-\frac {1}{9 (-1+x)}+\frac {1}{60 (1+2 x)^2}-\frac {13}{225 (1+2 x)}\right ) \, dx+8 \int \left (\frac {8}{25 (-2+x)}-\frac {1}{9 (-1+x)}-\frac {1}{30 (1+2 x)^2}+\frac {37}{450 (1+2 x)}\right ) \, dx+20 \int \left (\frac {4}{25 (-2+x)}-\frac {1}{9 (-1+x)}+\frac {1}{15 (1+2 x)^2}-\frac {22}{225 (1+2 x)}\right ) \, dx+28 \int \left (\frac {1}{25 (-2+x)}-\frac {1}{9 (-1+x)}+\frac {4}{15 (1+2 x)^2}+\frac {32}{225 (1+2 x)}\right ) \, dx-42 \int \left (\frac {2}{25 (-2+x)}-\frac {1}{9 (-1+x)}-\frac {2}{15 (1+2 x)^2}+\frac {14}{225 (1+2 x)}\right ) \, dx\\ &=-2 x-\frac {7}{1+2 x}-\frac {2}{3} \log (1-x)-\frac {8}{5} \log (2-x)+\frac {4}{15} \log (1+2 x)+\frac {2}{3} \int \frac {\log (x)}{-1+x} \, dx+\frac {4}{5} \int \frac {\log (x)}{-2+x} \, dx+\frac {16}{15} \int \frac {\log (x)}{1+2 x} \, dx+2 \int \frac {\log \left (2-3 x+x^2\right )}{(1+2 x)^2} \, dx+2 \int \frac {\log (x) \log \left (2-3 x+x^2\right )}{(1+2 x)^2} \, dx-4 \int \frac {x^2 \log \left (2-3 x+x^2\right )}{(1+2 x)^2} \, dx\\ &=-2 x-\frac {7}{1+2 x}-\frac {2}{3} \log (1-x)-\frac {8}{5} \log (2-x)+\frac {4}{5} \log (2) \log (-2+x)+\frac {4}{15} \log (1+2 x)+\frac {8}{15} \log (x) \log (1+2 x)-\frac {\log \left (2-3 x+x^2\right )}{1+2 x}-\frac {\log (x) \log \left (2-3 x+x^2\right )}{1+2 x}-\frac {2 \text {Li}_2(1-x)}{3}-\frac {8}{15} \int \frac {\log (1+2 x)}{x} \, dx+\frac {4}{5} \int \frac {\log \left (\frac {x}{2}\right )}{-2+x} \, dx-2 \int \frac {(3-2 x) \log (x)}{2 \left (2+x-5 x^2+2 x^3\right )} \, dx-2 \int \frac {\log \left (2-3 x+x^2\right )}{(-2-4 x) x} \, dx-4 \int \left (\frac {1}{4} \log \left (2-3 x+x^2\right )+\frac {\log \left (2-3 x+x^2\right )}{4 (1+2 x)^2}-\frac {\log \left (2-3 x+x^2\right )}{2 (1+2 x)}\right ) \, dx+\int \frac {-3+2 x}{2+x-5 x^2+2 x^3} \, dx\\ &=-2 x-\frac {7}{1+2 x}-\frac {2}{3} \log (1-x)-\frac {8}{5} \log (2-x)+\frac {4}{5} \log (2) \log (-2+x)+\frac {4}{15} \log (1+2 x)+\frac {8}{15} \log (x) \log (1+2 x)-\frac {\log \left (2-3 x+x^2\right )}{1+2 x}-\frac {\log (x) \log \left (2-3 x+x^2\right )}{1+2 x}-\frac {2 \text {Li}_2(1-x)}{3}-\frac {4}{5} \text {Li}_2\left (1-\frac {x}{2}\right )+\frac {8 \text {Li}_2(-2 x)}{15}+2 \int \frac {\log \left (2-3 x+x^2\right )}{1+2 x} \, dx-2 \int \left (-\frac {\log \left (2-3 x+x^2\right )}{2 x}+\frac {\log \left (2-3 x+x^2\right )}{1+2 x}\right ) \, dx+\int \left (\frac {1}{5 (-2+x)}+\frac {1}{3 (-1+x)}-\frac {16}{15 (1+2 x)}\right ) \, dx-\int \frac {(3-2 x) \log (x)}{2+x-5 x^2+2 x^3} \, dx-\int \log \left (2-3 x+x^2\right ) \, dx-\int \frac {\log \left (2-3 x+x^2\right )}{(1+2 x)^2} \, dx\\ &=-2 x-\frac {7}{1+2 x}-\frac {1}{3} \log (1-x)-\frac {7}{5} \log (2-x)+\frac {4}{5} \log (2) \log (-2+x)-\frac {4}{15} \log (1+2 x)+\frac {8}{15} \log (x) \log (1+2 x)-x \log \left (2-3 x+x^2\right )-\frac {\log \left (2-3 x+x^2\right )}{2 (1+2 x)}-\frac {\log (x) \log \left (2-3 x+x^2\right )}{1+2 x}+\log (1+2 x) \log \left (2-3 x+x^2\right )-\frac {2 \text {Li}_2(1-x)}{3}-\frac {4}{5} \text {Li}_2\left (1-\frac {x}{2}\right )+\frac {8 \text {Li}_2(-2 x)}{15}-\frac {1}{2} \int \frac {-3+2 x}{2+x-5 x^2+2 x^3} \, dx-2 \int \frac {\log \left (2-3 x+x^2\right )}{1+2 x} \, dx+\int \frac {x (-3+2 x)}{2-3 x+x^2} \, dx-\int \left (-\frac {\log (x)}{5 (-2+x)}-\frac {\log (x)}{3 (-1+x)}+\frac {16 \log (x)}{15 (1+2 x)}\right ) \, dx-\int \frac {(-3+2 x) \log (1+2 x)}{2-3 x+x^2} \, dx+\int \frac {\log \left (2-3 x+x^2\right )}{x} \, dx\\ &=-\frac {7}{1+2 x}-\frac {1}{3} \log (1-x)-\frac {7}{5} \log (2-x)+\frac {4}{5} \log (2) \log (-2+x)-\frac {4}{15} \log (1+2 x)+\frac {8}{15} \log (x) \log (1+2 x)-x \log \left (2-3 x+x^2\right )-\frac {\log \left (2-3 x+x^2\right )}{2 (1+2 x)}+\log (x) \log \left (2-3 x+x^2\right )-\frac {\log (x) \log \left (2-3 x+x^2\right )}{1+2 x}-\frac {2 \text {Li}_2(1-x)}{3}-\frac {4}{5} \text {Li}_2\left (1-\frac {x}{2}\right )+\frac {8 \text {Li}_2(-2 x)}{15}+\frac {1}{5} \int \frac {\log (x)}{-2+x} \, dx+\frac {1}{3} \int \frac {\log (x)}{-1+x} \, dx-\frac {1}{2} \int \left (\frac {1}{5 (-2+x)}+\frac {1}{3 (-1+x)}-\frac {16}{15 (1+2 x)}\right ) \, dx-\frac {16}{15} \int \frac {\log (x)}{1+2 x} \, dx+\int \frac {-4+3 x}{2-3 x+x^2} \, dx-\int \frac {(-3+2 x) \log (x)}{2-3 x+x^2} \, dx+\int \frac {(-3+2 x) \log (1+2 x)}{2-3 x+x^2} \, dx-\int \left (\frac {2 \log (1+2 x)}{-4+2 x}+\frac {2 \log (1+2 x)}{-2+2 x}\right ) \, dx\\ &=-\frac {7}{1+2 x}-\frac {1}{2} \log (1-x)-\frac {3}{2} \log (2-x)+\log (2) \log (-2+x)-x \log \left (2-3 x+x^2\right )-\frac {\log \left (2-3 x+x^2\right )}{2 (1+2 x)}+\log (x) \log \left (2-3 x+x^2\right )-\frac {\log (x) \log \left (2-3 x+x^2\right )}{1+2 x}-\text {Li}_2(1-x)-\frac {4}{5} \text {Li}_2\left (1-\frac {x}{2}\right )+\frac {8 \text {Li}_2(-2 x)}{15}+\frac {1}{5} \int \frac {\log \left (\frac {x}{2}\right )}{-2+x} \, dx+\frac {8}{15} \int \frac {\log (1+2 x)}{x} \, dx+2 \int \frac {1}{-2+x} \, dx-2 \int \frac {\log (1+2 x)}{-4+2 x} \, dx-2 \int \frac {\log (1+2 x)}{-2+2 x} \, dx+\int \frac {1}{-1+x} \, dx-\int \left (\frac {2 \log (x)}{-4+2 x}+\frac {2 \log (x)}{-2+2 x}\right ) \, dx+\int \left (\frac {2 \log (1+2 x)}{-4+2 x}+\frac {2 \log (1+2 x)}{-2+2 x}\right ) \, dx\\ &=-\frac {7}{1+2 x}+\frac {1}{2} \log (1-x)+\frac {1}{2} \log (2-x)+\log (2) \log (-2+x)-\log \left (\frac {2 (1-x)}{3}\right ) \log (1+2 x)-\log \left (\frac {2 (2-x)}{5}\right ) \log (1+2 x)-x \log \left (2-3 x+x^2\right )-\frac {\log \left (2-3 x+x^2\right )}{2 (1+2 x)}+\log (x) \log \left (2-3 x+x^2\right )-\frac {\log (x) \log \left (2-3 x+x^2\right )}{1+2 x}-\text {Li}_2(1-x)-\text {Li}_2\left (1-\frac {x}{2}\right )+2 \int \frac {\log \left (\frac {1}{3} (2-2 x)\right )}{1+2 x} \, dx+2 \int \frac {\log \left (\frac {1}{5} (4-2 x)\right )}{1+2 x} \, dx-2 \int \frac {\log (x)}{-4+2 x} \, dx-2 \int \frac {\log (x)}{-2+2 x} \, dx+2 \int \frac {\log (1+2 x)}{-4+2 x} \, dx+2 \int \frac {\log (1+2 x)}{-2+2 x} \, dx\\ &=-\frac {7}{1+2 x}+\frac {1}{2} \log (1-x)+\frac {1}{2} \log (2-x)+\log (2) \log (-2+x)-\log (2) \log (-4+2 x)-x \log \left (2-3 x+x^2\right )-\frac {\log \left (2-3 x+x^2\right )}{2 (1+2 x)}+\log (x) \log \left (2-3 x+x^2\right )-\frac {\log (x) \log \left (2-3 x+x^2\right )}{1+2 x}-\text {Li}_2\left (1-\frac {x}{2}\right )-2 \int \frac {\log \left (\frac {1}{3} (2-2 x)\right )}{1+2 x} \, dx-2 \int \frac {\log \left (\frac {1}{5} (4-2 x)\right )}{1+2 x} \, dx-2 \int \frac {\log \left (\frac {x}{2}\right )}{-4+2 x} \, dx+\operatorname {Subst}\left (\int \frac {\log \left (1-\frac {x}{3}\right )}{x} \, dx,x,1+2 x\right )+\operatorname {Subst}\left (\int \frac {\log \left (1-\frac {x}{5}\right )}{x} \, dx,x,1+2 x\right )\\ &=-\frac {7}{1+2 x}+\frac {1}{2} \log (1-x)+\frac {1}{2} \log (2-x)+\log (2) \log (-2+x)-\log (2) \log (-4+2 x)-x \log \left (2-3 x+x^2\right )-\frac {\log \left (2-3 x+x^2\right )}{2 (1+2 x)}+\log (x) \log \left (2-3 x+x^2\right )-\frac {\log (x) \log \left (2-3 x+x^2\right )}{1+2 x}-\text {Li}_2\left (\frac {1}{5} (1+2 x)\right )-\text {Li}_2\left (\frac {1}{3} (1+2 x)\right )-\operatorname {Subst}\left (\int \frac {\log \left (1-\frac {x}{3}\right )}{x} \, dx,x,1+2 x\right )-\operatorname {Subst}\left (\int \frac {\log \left (1-\frac {x}{5}\right )}{x} \, dx,x,1+2 x\right )\\ &=-\frac {7}{1+2 x}+\frac {1}{2} \log (1-x)+\frac {1}{2} \log (2-x)+\log (2) \log (-2+x)-\log (2) \log (-4+2 x)-x \log \left (2-3 x+x^2\right )-\frac {\log \left (2-3 x+x^2\right )}{2 (1+2 x)}+\log (x) \log \left (2-3 x+x^2\right )-\frac {\log (x) \log \left (2-3 x+x^2\right )}{1+2 x}\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.08, size = 28, normalized size = 1.08 \begin {gather*} \frac {-7-2 x (x-\log (x)) \log \left (2-3 x+x^2\right )}{1+2 x} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(28 - 42*x + 20*x^2 + 8*x^3 - 8*x^4 + (-6*x - 8*x^2 + 8*x^3)*Log[x] + (4 - 6*x - 6*x^2 + 12*x^3 - 4*
x^4 + (4 - 6*x + 2*x^2)*Log[x])*Log[2 - 3*x + x^2])/(2 + 5*x - 3*x^2 - 8*x^3 + 4*x^4),x]

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.59, size = 31, normalized size = 1.19 \begin {gather*} -\frac {2 \, {\left (x^{2} - x \log \relax (x)\right )} \log \left (x^{2} - 3 \, x + 2\right ) + 7}{2 \, x + 1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [B]  time = 0.05, size = 67, normalized size = 2.58




method result size



risch \(-\frac {\left (4 x^{2}-4 x \ln \relax (x )+2 x +1\right ) \ln \left (x^{2}-3 x +2\right )}{2 \left (2 x +1\right )}+\frac {2 \ln \left (x^{2}-3 x +2\right ) x +\ln \left (x^{2}-3 x +2\right )-14}{4 x +2}\) \(67\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/2*(4*x^2-4*x*ln(x)+2*x+1)/(2*x+1)*ln(x^2-3*x+2)+1/2*(2*ln(x^2-3*x+2)*x+ln(x^2-3*x+2)-14)/(2*x+1)

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-2*x + 1/6*(24*x^2 - 4*(3*x^2 - 3*x*log(x) - 2*x - 1)*log(x - 1) - 3*(4*x^2 - 4*x*log(x) + 2*x + 1)*log(x - 2)
 + 12*x)/(2*x + 1) - 7/(2*x + 1) - 2/3*log(x - 1) + 1/2*log(x - 2)

________________________________________________________________________________________

mupad [B]  time = 3.36, size = 61, normalized size = 2.35 \begin {gather*} \ln \left (x^2-3\,x+2\right )\,\ln \relax (x)-\frac {7}{2\,\left (x+\frac {1}{2}\right )}-\frac {x^2\,\ln \left (x^2-3\,x+2\right )}{x+\frac {1}{2}}-\frac {\ln \left (x^2-3\,x+2\right )\,\ln \relax (x)}{2\,\left (x+\frac {1}{2}\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-(42*x + log(x^2 - 3*x + 2)*(6*x - log(x)*(2*x^2 - 6*x + 4) + 6*x^2 - 12*x^3 + 4*x^4 - 4) - 20*x^2 - 8*x^3
 + 8*x^4 + log(x)*(6*x + 8*x^2 - 8*x^3) - 28)/(5*x - 3*x^2 - 8*x^3 + 4*x^4 + 2),x)

[Out]

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

________________________________________________________________________________________

sympy [B]  time = 0.71, size = 49, normalized size = 1.88 \begin {gather*} \frac {\log {\left (x^{2} - 3 x + 2 \right )}}{2} + \frac {\left (- 4 x^{2} + 4 x \log {\relax (x )} - 2 x - 1\right ) \log {\left (x^{2} - 3 x + 2 \right )}}{4 x + 2} - \frac {7}{2 x + 1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((((2*x**2-6*x+4)*ln(x)-4*x**4+12*x**3-6*x**2-6*x+4)*ln(x**2-3*x+2)+(8*x**3-8*x**2-6*x)*ln(x)-8*x**4+
8*x**3+20*x**2-42*x+28)/(4*x**4-8*x**3-3*x**2+5*x+2),x)

[Out]

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

________________________________________________________________________________________