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]
________________________________________________________________________________________
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]
[Out]
Rule 6600
Rule 2364
Rule 2360
Rule 2295
Rule 2296
Rule 6688
Rule 6742
Rule 6586
Rule 2389
Rule 6596
Rule 2396
Rule 2433
Rule 2374
Rule 6589
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]
[Out]
________________________________________________________________________________________
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]
[Out]
________________________________________________________________________________________
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]
[Out]
________________________________________________________________________________________
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]
[Out]
________________________________________________________________________________________
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]
[Out]
________________________________________________________________________________________
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]
[Out]