3.172 \(\int (g+h \log (1-c x)) \text{PolyLog}(2,c x) \, dx\)

Optimal. Leaf size=167 \[ x \text{PolyLog}(2,c x) (h \log (1-c x)+g)-h x \text{PolyLog}(2,c x)+\frac{2 h \text{PolyLog}(3,1-c x)}{c}-\frac{h \log (1-c x) \text{PolyLog}(2,c x)}{c}-\frac{2 h \log (1-c x) \text{PolyLog}(2,1-c x)}{c}-\frac{g (1-c x) \log (1-c x)}{c}-\frac{h (1-c x) \log ^2(1-c x)}{c}-\frac{h \log (c x) \log ^2(1-c x)}{c}+\frac{3 h (1-c x) \log (1-c x)}{c}-g x+3 h x \]

[Out]

-(g*x) + 3*h*x - (g*(1 - c*x)*Log[1 - c*x])/c + (3*h*(1 - c*x)*Log[1 - c*x])/c - (h*(1 - c*x)*Log[1 - c*x]^2)/
c - (h*Log[c*x]*Log[1 - c*x]^2)/c - h*x*PolyLog[2, c*x] - (h*Log[1 - c*x]*PolyLog[2, c*x])/c + x*(g + h*Log[1
- c*x])*PolyLog[2, c*x] - (2*h*Log[1 - c*x]*PolyLog[2, 1 - c*x])/c + (2*h*PolyLog[3, 1 - c*x])/c

________________________________________________________________________________________

Rubi [A]  time = 0.210957, antiderivative size = 167, normalized size of antiderivative = 1., number of steps used = 18, number of rules used = 14, integrand size = 17, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.824, Rules used = {6600, 2364, 2360, 2295, 2296, 6688, 6742, 6586, 2389, 6596, 2396, 2433, 2374, 6589} \[ x \text{PolyLog}(2,c x) (h \log (1-c x)+g)-h x \text{PolyLog}(2,c x)+\frac{2 h \text{PolyLog}(3,1-c x)}{c}-\frac{h \log (1-c x) \text{PolyLog}(2,c x)}{c}-\frac{2 h \log (1-c x) \text{PolyLog}(2,1-c x)}{c}-\frac{g (1-c x) \log (1-c x)}{c}-\frac{h (1-c x) \log ^2(1-c x)}{c}-\frac{h \log (c x) \log ^2(1-c x)}{c}+\frac{3 h (1-c x) \log (1-c x)}{c}-g x+3 h x \]

Antiderivative was successfully verified.

[In]

Int[(g + h*Log[1 - c*x])*PolyLog[2, c*x],x]

[Out]

-(g*x) + 3*h*x - (g*(1 - c*x)*Log[1 - c*x])/c + (3*h*(1 - c*x)*Log[1 - c*x])/c - (h*(1 - c*x)*Log[1 - c*x]^2)/
c - (h*Log[c*x]*Log[1 - c*x]^2)/c - h*x*PolyLog[2, c*x] - (h*Log[1 - c*x]*PolyLog[2, c*x])/c + x*(g + h*Log[1
- c*x])*PolyLog[2, c*x] - (2*h*Log[1 - c*x]*PolyLog[2, 1 - c*x])/c + (2*h*PolyLog[3, 1 - c*x])/c

Rule 6600

Int[((g_.) + Log[(f_.)*((d_.) + (e_.)*(x_))^(n_.)]*(h_.))*PolyLog[2, (c_.)*((a_.) + (b_.)*(x_))], x_Symbol] :>
 Simp[x*(g + h*Log[f*(d + e*x)^n])*PolyLog[2, c*(a + b*x)], x] + (Dist[b, Int[(g + h*Log[f*(d + e*x)^n])*Log[1
 - a*c - b*c*x]*ExpandIntegrand[x/(a + b*x), x], x], x] - Dist[e*h*n, Int[PolyLog[2, c*(a + b*x)]*ExpandIntegr
and[x/(d + e*x), x], x], x]) /; FreeQ[{a, b, c, d, e, f, g, h, n}, x]

Rule 2364

Int[((a_.) + Log[v_]*(b_.))^(p_.)*((c_.) + Log[v_]*(d_.))^(q_.), x_Symbol] :> Dist[1/Coeff[v, x, 1], Subst[Int
[(a + b*Log[x])^p*(c + d*Log[x])^q, x], x, v], x] /; FreeQ[{a, b, c, d, p, q}, x] && LinearQ[v, x] && NeQ[Coef
f[v, x, 0], 0]

Rule 2360

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*(Log[(c_.)*(x_)^(n_.)]*(e_.) + (d_))^(q_.), x_Symbol] :> Int[E
xpandIntegrand[(a + b*Log[c*x^n])^p*(d + e*Log[c*x^n])^q, x], x] /; FreeQ[{a, b, c, d, e, n}, x] && IntegerQ[p
] && IntegerQ[q]

Rule 2295

Int[Log[(c_.)*(x_)^(n_.)], x_Symbol] :> Simp[x*Log[c*x^n], x] - Simp[n*x, x] /; FreeQ[{c, n}, x]

Rule 2296

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

Rule 6688

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

Rule 6742

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

Rule 6586

Int[PolyLog[n_, (a_.)*((b_.)*(x_)^(p_.))^(q_.)], x_Symbol] :> Simp[x*PolyLog[n, a*(b*x^p)^q], x] - Dist[p*q, I
nt[PolyLog[n - 1, a*(b*x^p)^q], x], x] /; FreeQ[{a, b, p, q}, x] && GtQ[n, 0]

Rule 2389

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

Rule 6596

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

Rule 2396

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

Rule 2433

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*((f_.) + Log[(h_.)*((i_.) + (j_.)*(x_))^(m_.)]*
(g_.))*((k_.) + (l_.)*(x_))^(r_.), x_Symbol] :> Dist[1/e, Subst[Int[((k*x)/d)^r*(a + b*Log[c*x^n])^p*(f + g*Lo
g[h*((e*i - d*j)/e + (j*x)/e)^m]), x], x, d + e*x], x] /; FreeQ[{a, b, c, d, e, f, g, h, i, j, k, l, n, p, r},
 x] && EqQ[e*k - d*l, 0]

Rule 2374

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

Rule 6589

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

Rubi steps

\begin{align*} \int (g+h \log (1-c x)) \text{Li}_2(c x) \, dx &=x (g+h \log (1-c x)) \text{Li}_2(c x)+(c h) \int \left (-\frac{1}{c}-\frac{1}{c (-1+c x)}\right ) \text{Li}_2(c x) \, dx+\int \log (1-c x) (g+h \log (1-c x)) \, dx\\ &=x (g+h \log (1-c x)) \text{Li}_2(c x)-\frac{\operatorname{Subst}(\int \log (x) (g+h \log (x)) \, dx,x,1-c x)}{c}+(c h) \int \frac{x \text{Li}_2(c x)}{1-c x} \, dx\\ &=x (g+h \log (1-c x)) \text{Li}_2(c x)-\frac{\operatorname{Subst}\left (\int \left (g \log (x)+h \log ^2(x)\right ) \, dx,x,1-c x\right )}{c}+(c h) \int \left (-\frac{\text{Li}_2(c x)}{c}-\frac{\text{Li}_2(c x)}{c (-1+c x)}\right ) \, dx\\ &=x (g+h \log (1-c x)) \text{Li}_2(c x)-\frac{g \operatorname{Subst}(\int \log (x) \, dx,x,1-c x)}{c}-h \int \text{Li}_2(c x) \, dx-h \int \frac{\text{Li}_2(c x)}{-1+c x} \, dx-\frac{h \operatorname{Subst}\left (\int \log ^2(x) \, dx,x,1-c x\right )}{c}\\ &=-g x-\frac{g (1-c x) \log (1-c x)}{c}-\frac{h (1-c x) \log ^2(1-c x)}{c}-h x \text{Li}_2(c x)-\frac{h \log (1-c x) \text{Li}_2(c x)}{c}+x (g+h \log (1-c x)) \text{Li}_2(c x)-h \int \log (1-c x) \, dx-\frac{h \int \frac{\log ^2(1-c x)}{x} \, dx}{c}+\frac{(2 h) \operatorname{Subst}(\int \log (x) \, dx,x,1-c x)}{c}\\ &=-g x+2 h x-\frac{g (1-c x) \log (1-c x)}{c}+\frac{2 h (1-c x) \log (1-c x)}{c}-\frac{h (1-c x) \log ^2(1-c x)}{c}-\frac{h \log (c x) \log ^2(1-c x)}{c}-h x \text{Li}_2(c x)-\frac{h \log (1-c x) \text{Li}_2(c x)}{c}+x (g+h \log (1-c x)) \text{Li}_2(c x)-(2 h) \int \frac{\log (c x) \log (1-c x)}{1-c x} \, dx+\frac{h \operatorname{Subst}(\int \log (x) \, dx,x,1-c x)}{c}\\ &=-g x+3 h x-\frac{g (1-c x) \log (1-c x)}{c}+\frac{3 h (1-c x) \log (1-c x)}{c}-\frac{h (1-c x) \log ^2(1-c x)}{c}-\frac{h \log (c x) \log ^2(1-c x)}{c}-h x \text{Li}_2(c x)-\frac{h \log (1-c x) \text{Li}_2(c x)}{c}+x (g+h \log (1-c x)) \text{Li}_2(c x)+\frac{(2 h) \operatorname{Subst}\left (\int \frac{\log (x) \log \left (c \left (\frac{1}{c}-\frac{x}{c}\right )\right )}{x} \, dx,x,1-c x\right )}{c}\\ &=-g x+3 h x-\frac{g (1-c x) \log (1-c x)}{c}+\frac{3 h (1-c x) \log (1-c x)}{c}-\frac{h (1-c x) \log ^2(1-c x)}{c}-\frac{h \log (c x) \log ^2(1-c x)}{c}-h x \text{Li}_2(c x)-\frac{h \log (1-c x) \text{Li}_2(c x)}{c}+x (g+h \log (1-c x)) \text{Li}_2(c x)-\frac{2 h \log (1-c x) \text{Li}_2(1-c x)}{c}+\frac{(2 h) \operatorname{Subst}\left (\int \frac{\text{Li}_2(x)}{x} \, dx,x,1-c x\right )}{c}\\ &=-g x+3 h x-\frac{g (1-c x) \log (1-c x)}{c}+\frac{3 h (1-c x) \log (1-c x)}{c}-\frac{h (1-c x) \log ^2(1-c x)}{c}-\frac{h \log (c x) \log ^2(1-c x)}{c}-h x \text{Li}_2(c x)-\frac{h \log (1-c x) \text{Li}_2(c x)}{c}+x (g+h \log (1-c x)) \text{Li}_2(c x)-\frac{2 h \log (1-c x) \text{Li}_2(1-c x)}{c}+\frac{2 h \text{Li}_3(1-c x)}{c}\\ \end{align*}

Mathematica [A]  time = 0.0682036, size = 149, normalized size = 0.89 \[ g \left (x \text{PolyLog}(2,c x)+\left (x-\frac{1}{c}\right ) \log (1-c x)-x\right )+\frac{h \left (2 \text{PolyLog}(3,1-c x)-2 \log (1-c x) \text{PolyLog}(2,1-c x)+((c x-1) \log (1-c x)-c x) \text{PolyLog}(2,c x)+3 c x+c x \log ^2(1-c x)-\log (c x) \log ^2(1-c x)-\log ^2(1-c x)-3 c x \log (1-c x)+3 \log (1-c x)-2\right )}{c} \]

Antiderivative was successfully verified.

[In]

Integrate[(g + h*Log[1 - c*x])*PolyLog[2, c*x],x]

[Out]

g*(-x + (-c^(-1) + x)*Log[1 - c*x] + x*PolyLog[2, c*x]) + (h*(-2 + 3*c*x + 3*Log[1 - c*x] - 3*c*x*Log[1 - c*x]
 - Log[1 - c*x]^2 + c*x*Log[1 - c*x]^2 - Log[c*x]*Log[1 - c*x]^2 + (-(c*x) + (-1 + c*x)*Log[1 - c*x])*PolyLog[
2, c*x] - 2*Log[1 - c*x]*PolyLog[2, 1 - c*x] + 2*PolyLog[3, 1 - c*x]))/c

________________________________________________________________________________________

Maple [F]  time = 0.199, size = 0, normalized size = 0. \begin{align*} \int \left ( g+h\ln \left ( -cx+1 \right ) \right ){\it polylog} \left ( 2,cx \right ) \, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((g+h*ln(-c*x+1))*polylog(2,c*x),x)

[Out]

int((g+h*ln(-c*x+1))*polylog(2,c*x),x)

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} -h{\left (\frac{{\left (c x -{\left (c x - 1\right )} \log \left (-c x + 1\right )\right )}{\rm Li}_2\left (c x\right )}{c} - \frac{{\left (c x - 1\right )}{\left (\log \left (-c x + 1\right )^{2} - 2 \, \log \left (-c x + 1\right ) + 2\right )} + c x -{\left (c x - 1\right )} \log \left (-c x + 1\right ) - \int \frac{\log \left (-c x + 1\right )^{2}}{x}\,{d x} - 1}{c}\right )} + \frac{{\left (c x{\rm Li}_2\left (c x\right ) - c x +{\left (c x - 1\right )} \log \left (-c x + 1\right )\right )} g}{c} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g+h*log(-c*x+1))*polylog(2,c*x),x, algorithm="maxima")

[Out]

-h*((c*x - (c*x - 1)*log(-c*x + 1))*dilog(c*x)/c - integrate(-(c*x*log(-c*x + 1) - (c*x - 1)*log(-c*x + 1)^2)/
x, x)/c) + (c*x*dilog(c*x) - c*x + (c*x - 1)*log(-c*x + 1))*g/c

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (h{\rm Li}_2\left (c x\right ) \log \left (-c x + 1\right ) + g{\rm Li}_2\left (c x\right ), x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g+h*log(-c*x+1))*polylog(2,c*x),x, algorithm="fricas")

[Out]

integral(h*dilog(c*x)*log(-c*x + 1) + g*dilog(c*x), x)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (g + h \log{\left (- c x + 1 \right )}\right ) \operatorname{Li}_{2}\left (c x\right )\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g+h*ln(-c*x+1))*polylog(2,c*x),x)

[Out]

Integral((g + h*log(-c*x + 1))*polylog(2, c*x), x)

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (h \log \left (-c x + 1\right ) + g\right )}{\rm Li}_2\left (c x\right )\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g+h*log(-c*x+1))*polylog(2,c*x),x, algorithm="giac")

[Out]

integrate((h*log(-c*x + 1) + g)*dilog(c*x), x)