Optimal. Leaf size=330 \[ \frac {13 h x}{8 c}+\frac {h x^2}{16}+\frac {h (1-c x)^2}{8 c^2}+\frac {h \log (1-c x)}{8 c^2}-\frac {1}{8} h x^2 \log (1-c x)+\frac {h (1-c x) \log (1-c x)}{2 c^2}+\frac {h \log ^2(1-c x)}{4 c^2}-\frac {h \log (c x) \log ^2(1-c x)}{2 c^2}+\frac {1}{4} x^2 \log (1-c x) (g+h \log (1-c x))+\frac {(1-c x) (g+2 h \log (1-c x))}{2 c^2}-\frac {(1-c x)^2 (g+2 h \log (1-c x))}{8 c^2}-\frac {\log (1-c x) (g+2 h \log (1-c x))}{4 c^2}-\frac {h x \text {PolyLog}(2,c x)}{2 c}-\frac {1}{4} h x^2 \text {PolyLog}(2,c x)-\frac {h \log (1-c x) \text {PolyLog}(2,c x)}{2 c^2}+\frac {1}{2} x^2 (g+h \log (1-c x)) \text {PolyLog}(2,c x)-\frac {h \log (1-c x) \text {PolyLog}(2,1-c x)}{c^2}+\frac {h \text {PolyLog}(3,1-c x)}{c^2} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.24, antiderivative size = 330, normalized size of antiderivative = 1.00, number of steps
used = 21, number of rules used = 18, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 1.000, Rules used = {6738, 2483,
2458, 45, 2372, 12, 14, 2338, 6721, 2436, 2332, 6726, 2442, 6731, 2443, 2481, 2421, 6724}
\begin {gather*} -\frac {(1-c x)^2 (2 h \log (1-c x)+g)}{8 c^2}+\frac {(1-c x) (2 h \log (1-c x)+g)}{2 c^2}-\frac {\log (1-c x) (2 h \log (1-c x)+g)}{4 c^2}+\frac {h \text {Li}_3(1-c x)}{c^2}-\frac {h \text {Li}_2(c x) \log (1-c x)}{2 c^2}-\frac {h \text {Li}_2(1-c x) \log (1-c x)}{c^2}+\frac {h (1-c x)^2}{8 c^2}+\frac {h \log ^2(1-c x)}{4 c^2}-\frac {h \log (c x) \log ^2(1-c x)}{2 c^2}+\frac {h \log (1-c x)}{8 c^2}+\frac {h (1-c x) \log (1-c x)}{2 c^2}+\frac {1}{2} x^2 \text {Li}_2(c x) (h \log (1-c x)+g)+\frac {1}{4} x^2 \log (1-c x) (h \log (1-c x)+g)-\frac {1}{4} h x^2 \text {Li}_2(c x)-\frac {h x \text {Li}_2(c x)}{2 c}-\frac {1}{8} h x^2 \log (1-c x)+\frac {13 h x}{8 c}+\frac {h x^2}{16} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 14
Rule 45
Rule 2332
Rule 2338
Rule 2372
Rule 2421
Rule 2436
Rule 2442
Rule 2443
Rule 2458
Rule 2481
Rule 2483
Rule 6721
Rule 6724
Rule 6726
Rule 6731
Rule 6738
Rubi steps
\begin {align*} \int x (g+h \log (1-c x)) \text {Li}_2(c x) \, dx &=\frac {1}{2} x^2 (g+h \log (1-c x)) \text {Li}_2(c x)+\frac {1}{2} \int x \log (1-c x) (g+h \log (1-c x)) \, dx+\frac {1}{2} (c h) \int \left (-\frac {\text {Li}_2(c x)}{c^2}-\frac {x \text {Li}_2(c x)}{c}-\frac {\text {Li}_2(c x)}{c^2 (-1+c x)}\right ) \, dx\\ &=\frac {1}{4} x^2 \log (1-c x) (g+h \log (1-c x))+\frac {1}{2} x^2 (g+h \log (1-c x)) \text {Li}_2(c x)+\frac {1}{4} c \int \frac {x^2 (g+h \log (1-c x))}{1-c x} \, dx-\frac {1}{2} h \int x \text {Li}_2(c x) \, dx-\frac {h \int \text {Li}_2(c x) \, dx}{2 c}-\frac {h \int \frac {\text {Li}_2(c x)}{-1+c x} \, dx}{2 c}+\frac {1}{4} (c h) \int \frac {x^2 \log (1-c x)}{1-c x} \, dx\\ &=\frac {1}{4} x^2 \log (1-c x) (g+h \log (1-c x))-\frac {h x \text {Li}_2(c x)}{2 c}-\frac {1}{4} h x^2 \text {Li}_2(c x)-\frac {h \log (1-c x) \text {Li}_2(c x)}{2 c^2}+\frac {1}{2} x^2 (g+h \log (1-c x)) \text {Li}_2(c x)-\frac {1}{4} \text {Subst}\left (\int \frac {\left (\frac {1}{c}-\frac {x}{c}\right )^2 (g+h \log (x))}{x} \, dx,x,1-c x\right )-\frac {1}{4} h \int x \log (1-c x) \, dx-\frac {h \int \frac {\log ^2(1-c x)}{x} \, dx}{2 c^2}-\frac {h \int \log (1-c x) \, dx}{2 c}+\frac {1}{4} (c h) \int \left (-\frac {\log (1-c x)}{c^2}-\frac {x \log (1-c x)}{c}-\frac {\log (1-c x)}{c^2 (-1+c x)}\right ) \, dx\\ &=-\frac {1}{8} h x^2 \log (1-c x)-\frac {h \log (c x) \log ^2(1-c x)}{2 c^2}+\frac {1}{4} x^2 \log (1-c x) (g+h \log (1-c x))+\frac {1}{8} \left (\frac {4 (1-c x)}{c^2}-\frac {(1-c x)^2}{c^2}-\frac {2 \log (1-c x)}{c^2}\right ) (g+h \log (1-c x))-\frac {h x \text {Li}_2(c x)}{2 c}-\frac {1}{4} h x^2 \text {Li}_2(c x)-\frac {h \log (1-c x) \text {Li}_2(c x)}{2 c^2}+\frac {1}{2} x^2 (g+h \log (1-c x)) \text {Li}_2(c x)-\frac {1}{4} h \int x \log (1-c x) \, dx+\frac {1}{4} h \text {Subst}\left (\int \frac {(-4+x) x+2 \log (x)}{2 c^2 x} \, dx,x,1-c x\right )+\frac {h \text {Subst}(\int \log (x) \, dx,x,1-c x)}{2 c^2}-\frac {h \int \log (1-c x) \, dx}{4 c}-\frac {h \int \frac {\log (1-c x)}{-1+c x} \, dx}{4 c}-\frac {h \int \frac {\log (c x) \log (1-c x)}{1-c x} \, dx}{c}-\frac {1}{8} (c h) \int \frac {x^2}{1-c x} \, dx\\ &=\frac {h x}{2 c}-\frac {1}{4} h x^2 \log (1-c x)+\frac {h (1-c x) \log (1-c x)}{2 c^2}-\frac {h \log (c x) \log ^2(1-c x)}{2 c^2}+\frac {1}{4} x^2 \log (1-c x) (g+h \log (1-c x))+\frac {1}{8} \left (\frac {4 (1-c x)}{c^2}-\frac {(1-c x)^2}{c^2}-\frac {2 \log (1-c x)}{c^2}\right ) (g+h \log (1-c x))-\frac {h x \text {Li}_2(c x)}{2 c}-\frac {1}{4} h x^2 \text {Li}_2(c x)-\frac {h \log (1-c x) \text {Li}_2(c x)}{2 c^2}+\frac {1}{2} x^2 (g+h \log (1-c x)) \text {Li}_2(c x)+\frac {h \text {Subst}\left (\int \frac {(-4+x) x+2 \log (x)}{x} \, dx,x,1-c x\right )}{8 c^2}+\frac {h \text {Subst}(\int \log (x) \, dx,x,1-c x)}{4 c^2}-\frac {h \text {Subst}\left (\int \frac {\log (x)}{x} \, dx,x,1-c x\right )}{4 c^2}+\frac {h \text {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^2}-\frac {1}{8} (c h) \int \frac {x^2}{1-c x} \, dx-\frac {1}{8} (c h) \int \left (-\frac {1}{c^2}-\frac {x}{c}-\frac {1}{c^2 (-1+c x)}\right ) \, dx\\ &=\frac {7 h x}{8 c}+\frac {h x^2}{16}+\frac {h \log (1-c x)}{8 c^2}-\frac {1}{4} h x^2 \log (1-c x)+\frac {3 h (1-c x) \log (1-c x)}{4 c^2}-\frac {h \log ^2(1-c x)}{8 c^2}-\frac {h \log (c x) \log ^2(1-c x)}{2 c^2}+\frac {1}{4} x^2 \log (1-c x) (g+h \log (1-c x))+\frac {1}{8} \left (\frac {4 (1-c x)}{c^2}-\frac {(1-c x)^2}{c^2}-\frac {2 \log (1-c x)}{c^2}\right ) (g+h \log (1-c x))-\frac {h x \text {Li}_2(c x)}{2 c}-\frac {1}{4} h x^2 \text {Li}_2(c x)-\frac {h \log (1-c x) \text {Li}_2(c x)}{2 c^2}+\frac {1}{2} x^2 (g+h \log (1-c x)) \text {Li}_2(c x)-\frac {h \log (1-c x) \text {Li}_2(1-c x)}{c^2}+\frac {h \text {Subst}\left (\int \left (-4+x+\frac {2 \log (x)}{x}\right ) \, dx,x,1-c x\right )}{8 c^2}+\frac {h \text {Subst}\left (\int \frac {\text {Li}_2(x)}{x} \, dx,x,1-c x\right )}{c^2}-\frac {1}{8} (c h) \int \left (-\frac {1}{c^2}-\frac {x}{c}-\frac {1}{c^2 (-1+c x)}\right ) \, dx\\ &=\frac {3 h x}{2 c}+\frac {h x^2}{8}+\frac {h (1-c x)^2}{16 c^2}+\frac {h \log (1-c x)}{4 c^2}-\frac {1}{4} h x^2 \log (1-c x)+\frac {3 h (1-c x) \log (1-c x)}{4 c^2}-\frac {h \log ^2(1-c x)}{8 c^2}-\frac {h \log (c x) \log ^2(1-c x)}{2 c^2}+\frac {1}{4} x^2 \log (1-c x) (g+h \log (1-c x))+\frac {1}{8} \left (\frac {4 (1-c x)}{c^2}-\frac {(1-c x)^2}{c^2}-\frac {2 \log (1-c x)}{c^2}\right ) (g+h \log (1-c x))-\frac {h x \text {Li}_2(c x)}{2 c}-\frac {1}{4} h x^2 \text {Li}_2(c x)-\frac {h \log (1-c x) \text {Li}_2(c x)}{2 c^2}+\frac {1}{2} x^2 (g+h \log (1-c x)) \text {Li}_2(c x)-\frac {h \log (1-c x) \text {Li}_2(1-c x)}{c^2}+\frac {h \text {Li}_3(1-c x)}{c^2}+\frac {h \text {Subst}\left (\int \frac {\log (x)}{x} \, dx,x,1-c x\right )}{4 c^2}\\ &=\frac {3 h x}{2 c}+\frac {h x^2}{8}+\frac {h (1-c x)^2}{16 c^2}+\frac {h \log (1-c x)}{4 c^2}-\frac {1}{4} h x^2 \log (1-c x)+\frac {3 h (1-c x) \log (1-c x)}{4 c^2}-\frac {h \log (c x) \log ^2(1-c x)}{2 c^2}+\frac {1}{4} x^2 \log (1-c x) (g+h \log (1-c x))+\frac {1}{8} \left (\frac {4 (1-c x)}{c^2}-\frac {(1-c x)^2}{c^2}-\frac {2 \log (1-c x)}{c^2}\right ) (g+h \log (1-c x))-\frac {h x \text {Li}_2(c x)}{2 c}-\frac {1}{4} h x^2 \text {Li}_2(c x)-\frac {h \log (1-c x) \text {Li}_2(c x)}{2 c^2}+\frac {1}{2} x^2 (g+h \log (1-c x)) \text {Li}_2(c x)-\frac {h \log (1-c x) \text {Li}_2(1-c x)}{c^2}+\frac {h \text {Li}_3(1-c x)}{c^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.24, size = 211, normalized size = 0.64 \begin {gather*} \frac {g \left (-c x (2+c x)+2 \left (-1+c^2 x^2\right ) \log (1-c x)+4 c^2 x^2 \text {PolyLog}(2,c x)\right )}{8 c^2}+\frac {h \left (-14+22 c x+3 c^2 x^2+22 \log (1-c x)-16 c x \log (1-c x)-6 c^2 x^2 \log (1-c x)-4 \log ^2(1-c x)+4 c^2 x^2 \log ^2(1-c x)-8 \log (c x) \log ^2(1-c x)+\left (-4 c x (2+c x)+8 \left (-1+c^2 x^2\right ) \log (1-c x)\right ) \text {PolyLog}(2,c x)-16 \log (1-c x) \text {PolyLog}(2,1-c x)+16 \text {PolyLog}(3,1-c x)\right )}{16 c^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.17, size = 0, normalized size = 0.00 \[\int x \left (g +h \ln \left (-c x +1\right )\right ) \polylog \left (2, c x \right )\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int x \left (g + h \log {\left (- c x + 1 \right )}\right ) \operatorname {Li}_{2}\left (c x\right )\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int x\,\left (g+h\,\ln \left (1-c\,x\right )\right )\,\mathrm {polylog}\left (2,c\,x\right ) \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________