Optimal. Leaf size=423 \[ -\frac{h x \text{PolyLog}(2,c x)}{3 c^2}+\frac{2 h \text{PolyLog}(3,1-c x)}{3 c^3}-\frac{h \log (1-c x) \text{PolyLog}(2,c x)}{3 c^3}-\frac{2 h \log (1-c x) \text{PolyLog}(2,1-c x)}{3 c^3}+\frac{1}{3} x^3 \text{PolyLog}(2,c x) (h \log (1-c x)+g)-\frac{1}{9} h x^3 \text{PolyLog}(2,c x)-\frac{h x^2 \text{PolyLog}(2,c x)}{6 c}+\frac{(1-c x)^3 (2 h \log (1-c x)+g)}{27 c^3}-\frac{(1-c x)^2 (2 h \log (1-c x)+g)}{6 c^3}+\frac{(1-c x) (2 h \log (1-c x)+g)}{3 c^3}-\frac{\log (1-c x) (2 h \log (1-c x)+g)}{9 c^3}+\frac{121 h x}{108 c^2}-\frac{2 h (1-c x)^3}{81 c^3}+\frac{h (1-c x)^2}{6 c^3}+\frac{h \log ^2(1-c x)}{9 c^3}-\frac{h \log (c x) \log ^2(1-c x)}{3 c^3}+\frac{13 h \log (1-c x)}{108 c^3}+\frac{h (1-c x) \log (1-c x)}{3 c^3}+\frac{1}{9} x^3 \log (1-c x) (h \log (1-c x)+g)+\frac{13 h x^2}{216 c}-\frac{1}{27} h x^3 \log (1-c x)-\frac{h x^2 \log (1-c x)}{12 c}+\frac{h x^3}{81} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.611175, antiderivative size = 366, normalized size of antiderivative = 0.87, number of steps used = 37, number of rules used = 20, integrand size = 20, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 1., Rules used = {6603, 2439, 2410, 2389, 2295, 2395, 43, 2390, 2301, 2411, 2334, 12, 14, 6586, 6591, 6596, 2396, 2433, 2374, 6589} \[ -\frac{h x \text{PolyLog}(2,c x)}{3 c^2}+\frac{2 h \text{PolyLog}(3,1-c x)}{3 c^3}-\frac{h \log (1-c x) \text{PolyLog}(2,c x)}{3 c^3}-\frac{2 h \log (1-c x) \text{PolyLog}(2,1-c x)}{3 c^3}+\frac{1}{3} x^3 \text{PolyLog}(2,c x) (h \log (1-c x)+g)-\frac{1}{9} h x^3 \text{PolyLog}(2,c x)-\frac{h x^2 \text{PolyLog}(2,c x)}{6 c}+\frac{1}{54} \left (\frac{2 (1-c x)^3}{c^3}-\frac{9 (1-c x)^2}{c^3}+\frac{18 (1-c x)}{c^3}-\frac{6 \log (1-c x)}{c^3}\right ) (h \log (1-c x)+g)+\frac{107 h x}{108 c^2}-\frac{h (1-c x)^3}{81 c^3}+\frac{h (1-c x)^2}{12 c^3}-\frac{h \log (c x) \log ^2(1-c x)}{3 c^3}+\frac{23 h \log (1-c x)}{108 c^3}+\frac{4 h (1-c x) \log (1-c x)}{9 c^3}+\frac{1}{9} x^3 \log (1-c x) (h \log (1-c x)+g)+\frac{23 h x^2}{216 c}-\frac{2}{27} h x^3 \log (1-c x)-\frac{5 h x^2 \log (1-c x)}{36 c}+\frac{2 h x^3}{81} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 6603
Rule 2439
Rule 2410
Rule 2389
Rule 2295
Rule 2395
Rule 43
Rule 2390
Rule 2301
Rule 2411
Rule 2334
Rule 12
Rule 14
Rule 6586
Rule 6591
Rule 6596
Rule 2396
Rule 2433
Rule 2374
Rule 6589
Rubi steps
\begin{align*} \int x^2 (g+h \log (1-c x)) \text{Li}_2(c x) \, dx &=\frac{1}{3} x^3 (g+h \log (1-c x)) \text{Li}_2(c x)+\frac{1}{3} \int x^2 \log (1-c x) (g+h \log (1-c x)) \, dx+\frac{1}{3} (c h) \int \left (-\frac{\text{Li}_2(c x)}{c^3}-\frac{x \text{Li}_2(c x)}{c^2}-\frac{x^2 \text{Li}_2(c x)}{c}-\frac{\text{Li}_2(c x)}{c^3 (-1+c x)}\right ) \, dx\\ &=\frac{1}{9} x^3 \log (1-c x) (g+h \log (1-c x))+\frac{1}{3} x^3 (g+h \log (1-c x)) \text{Li}_2(c x)+\frac{1}{9} c \int \frac{x^3 (g+h \log (1-c x))}{1-c x} \, dx-\frac{1}{3} h \int x^2 \text{Li}_2(c x) \, dx-\frac{h \int \text{Li}_2(c x) \, dx}{3 c^2}-\frac{h \int \frac{\text{Li}_2(c x)}{-1+c x} \, dx}{3 c^2}-\frac{h \int x \text{Li}_2(c x) \, dx}{3 c}+\frac{1}{9} (c h) \int \frac{x^3 \log (1-c x)}{1-c x} \, dx\\ &=\frac{1}{9} x^3 \log (1-c x) (g+h \log (1-c x))-\frac{h x \text{Li}_2(c x)}{3 c^2}-\frac{h x^2 \text{Li}_2(c x)}{6 c}-\frac{1}{9} h x^3 \text{Li}_2(c x)-\frac{h \log (1-c x) \text{Li}_2(c x)}{3 c^3}+\frac{1}{3} x^3 (g+h \log (1-c x)) \text{Li}_2(c x)-\frac{1}{9} \operatorname{Subst}\left (\int \frac{\left (\frac{1}{c}-\frac{x}{c}\right )^3 (g+h \log (x))}{x} \, dx,x,1-c x\right )-\frac{1}{9} h \int x^2 \log (1-c x) \, dx-\frac{h \int \frac{\log ^2(1-c x)}{x} \, dx}{3 c^3}-\frac{h \int \log (1-c x) \, dx}{3 c^2}-\frac{h \int x \log (1-c x) \, dx}{6 c}+\frac{1}{9} (c h) \int \left (-\frac{\log (1-c x)}{c^3}-\frac{x \log (1-c x)}{c^2}-\frac{x^2 \log (1-c x)}{c}-\frac{\log (1-c x)}{c^3 (-1+c x)}\right ) \, dx\\ &=-\frac{h x^2 \log (1-c x)}{12 c}-\frac{1}{27} h x^3 \log (1-c x)-\frac{h \log (c x) \log ^2(1-c x)}{3 c^3}+\frac{1}{9} x^3 \log (1-c x) (g+h \log (1-c x))+\frac{1}{54} \left (\frac{18 (1-c x)}{c^3}-\frac{9 (1-c x)^2}{c^3}+\frac{2 (1-c x)^3}{c^3}-\frac{6 \log (1-c x)}{c^3}\right ) (g+h \log (1-c x))-\frac{h x \text{Li}_2(c x)}{3 c^2}-\frac{h x^2 \text{Li}_2(c x)}{6 c}-\frac{1}{9} h x^3 \text{Li}_2(c x)-\frac{h \log (1-c x) \text{Li}_2(c x)}{3 c^3}+\frac{1}{3} x^3 (g+h \log (1-c x)) \text{Li}_2(c x)-\frac{1}{12} h \int \frac{x^2}{1-c x} \, dx-\frac{1}{9} h \int x^2 \log (1-c x) \, dx+\frac{1}{9} h \operatorname{Subst}\left (\int \frac{x \left (-18+9 x-2 x^2\right )+6 \log (x)}{6 c^3 x} \, dx,x,1-c x\right )+\frac{h \operatorname{Subst}(\int \log (x) \, dx,x,1-c x)}{3 c^3}-\frac{h \int \log (1-c x) \, dx}{9 c^2}-\frac{h \int \frac{\log (1-c x)}{-1+c x} \, dx}{9 c^2}-\frac{(2 h) \int \frac{\log (c x) \log (1-c x)}{1-c x} \, dx}{3 c^2}-\frac{h \int x \log (1-c x) \, dx}{9 c}-\frac{1}{27} (c h) \int \frac{x^3}{1-c x} \, dx\\ &=\frac{h x}{3 c^2}-\frac{5 h x^2 \log (1-c x)}{36 c}-\frac{2}{27} h x^3 \log (1-c x)+\frac{h (1-c x) \log (1-c x)}{3 c^3}-\frac{h \log (c x) \log ^2(1-c x)}{3 c^3}+\frac{1}{9} x^3 \log (1-c x) (g+h \log (1-c x))+\frac{1}{54} \left (\frac{18 (1-c x)}{c^3}-\frac{9 (1-c x)^2}{c^3}+\frac{2 (1-c x)^3}{c^3}-\frac{6 \log (1-c x)}{c^3}\right ) (g+h \log (1-c x))-\frac{h x \text{Li}_2(c x)}{3 c^2}-\frac{h x^2 \text{Li}_2(c x)}{6 c}-\frac{1}{9} h x^3 \text{Li}_2(c x)-\frac{h \log (1-c x) \text{Li}_2(c x)}{3 c^3}+\frac{1}{3} x^3 (g+h \log (1-c x)) \text{Li}_2(c x)-\frac{1}{18} h \int \frac{x^2}{1-c x} \, dx-\frac{1}{12} h \int \left (-\frac{1}{c^2}-\frac{x}{c}-\frac{1}{c^2 (-1+c x)}\right ) \, dx+\frac{h \operatorname{Subst}\left (\int \frac{x \left (-18+9 x-2 x^2\right )+6 \log (x)}{x} \, dx,x,1-c x\right )}{54 c^3}+\frac{h \operatorname{Subst}(\int \log (x) \, dx,x,1-c x)}{9 c^3}-\frac{h \operatorname{Subst}\left (\int \frac{\log (x)}{x} \, dx,x,1-c x\right )}{9 c^3}+\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 )}{3 c^3}-\frac{1}{27} (c h) \int \frac{x^3}{1-c x} \, dx-\frac{1}{27} (c h) \int \left (-\frac{1}{c^3}-\frac{x}{c^2}-\frac{x^2}{c}-\frac{1}{c^3 (-1+c x)}\right ) \, dx\\ &=\frac{61 h x}{108 c^2}+\frac{13 h x^2}{216 c}+\frac{h x^3}{81}+\frac{13 h \log (1-c x)}{108 c^3}-\frac{5 h x^2 \log (1-c x)}{36 c}-\frac{2}{27} h x^3 \log (1-c x)+\frac{4 h (1-c x) \log (1-c x)}{9 c^3}-\frac{h \log ^2(1-c x)}{18 c^3}-\frac{h \log (c x) \log ^2(1-c x)}{3 c^3}+\frac{1}{9} x^3 \log (1-c x) (g+h \log (1-c x))+\frac{1}{54} \left (\frac{18 (1-c x)}{c^3}-\frac{9 (1-c x)^2}{c^3}+\frac{2 (1-c x)^3}{c^3}-\frac{6 \log (1-c x)}{c^3}\right ) (g+h \log (1-c x))-\frac{h x \text{Li}_2(c x)}{3 c^2}-\frac{h x^2 \text{Li}_2(c x)}{6 c}-\frac{1}{9} h x^3 \text{Li}_2(c x)-\frac{h \log (1-c x) \text{Li}_2(c x)}{3 c^3}+\frac{1}{3} x^3 (g+h \log (1-c x)) \text{Li}_2(c x)-\frac{2 h \log (1-c x) \text{Li}_2(1-c x)}{3 c^3}-\frac{1}{18} h \int \left (-\frac{1}{c^2}-\frac{x}{c}-\frac{1}{c^2 (-1+c x)}\right ) \, dx+\frac{h \operatorname{Subst}\left (\int \left (-18+9 x-2 x^2+\frac{6 \log (x)}{x}\right ) \, dx,x,1-c x\right )}{54 c^3}+\frac{(2 h) \operatorname{Subst}\left (\int \frac{\text{Li}_2(x)}{x} \, dx,x,1-c x\right )}{3 c^3}-\frac{1}{27} (c h) \int \left (-\frac{1}{c^3}-\frac{x}{c^2}-\frac{x^2}{c}-\frac{1}{c^3 (-1+c x)}\right ) \, dx\\ &=\frac{107 h x}{108 c^2}+\frac{23 h x^2}{216 c}+\frac{2 h x^3}{81}+\frac{h (1-c x)^2}{12 c^3}-\frac{h (1-c x)^3}{81 c^3}+\frac{23 h \log (1-c x)}{108 c^3}-\frac{5 h x^2 \log (1-c x)}{36 c}-\frac{2}{27} h x^3 \log (1-c x)+\frac{4 h (1-c x) \log (1-c x)}{9 c^3}-\frac{h \log ^2(1-c x)}{18 c^3}-\frac{h \log (c x) \log ^2(1-c x)}{3 c^3}+\frac{1}{9} x^3 \log (1-c x) (g+h \log (1-c x))+\frac{1}{54} \left (\frac{18 (1-c x)}{c^3}-\frac{9 (1-c x)^2}{c^3}+\frac{2 (1-c x)^3}{c^3}-\frac{6 \log (1-c x)}{c^3}\right ) (g+h \log (1-c x))-\frac{h x \text{Li}_2(c x)}{3 c^2}-\frac{h x^2 \text{Li}_2(c x)}{6 c}-\frac{1}{9} h x^3 \text{Li}_2(c x)-\frac{h \log (1-c x) \text{Li}_2(c x)}{3 c^3}+\frac{1}{3} x^3 (g+h \log (1-c x)) \text{Li}_2(c x)-\frac{2 h \log (1-c x) \text{Li}_2(1-c x)}{3 c^3}+\frac{2 h \text{Li}_3(1-c x)}{3 c^3}+\frac{h \operatorname{Subst}\left (\int \frac{\log (x)}{x} \, dx,x,1-c x\right )}{9 c^3}\\ &=\frac{107 h x}{108 c^2}+\frac{23 h x^2}{216 c}+\frac{2 h x^3}{81}+\frac{h (1-c x)^2}{12 c^3}-\frac{h (1-c x)^3}{81 c^3}+\frac{23 h \log (1-c x)}{108 c^3}-\frac{5 h x^2 \log (1-c x)}{36 c}-\frac{2}{27} h x^3 \log (1-c x)+\frac{4 h (1-c x) \log (1-c x)}{9 c^3}-\frac{h \log (c x) \log ^2(1-c x)}{3 c^3}+\frac{1}{9} x^3 \log (1-c x) (g+h \log (1-c x))+\frac{1}{54} \left (\frac{18 (1-c x)}{c^3}-\frac{9 (1-c x)^2}{c^3}+\frac{2 (1-c x)^3}{c^3}-\frac{6 \log (1-c x)}{c^3}\right ) (g+h \log (1-c x))-\frac{h x \text{Li}_2(c x)}{3 c^2}-\frac{h x^2 \text{Li}_2(c x)}{6 c}-\frac{1}{9} h x^3 \text{Li}_2(c x)-\frac{h \log (1-c x) \text{Li}_2(c x)}{3 c^3}+\frac{1}{3} x^3 (g+h \log (1-c x)) \text{Li}_2(c x)-\frac{2 h \log (1-c x) \text{Li}_2(1-c x)}{3 c^3}+\frac{2 h \text{Li}_3(1-c x)}{3 c^3}\\ \end{align*}
Mathematica [A] time = 0.46092, size = 252, normalized size = 0.6 \[ \frac{g \left (18 c^3 x^3 \text{PolyLog}(2,c x)-c x \left (2 c^2 x^2+3 c x+6\right )+6 \left (c^3 x^3-1\right ) \log (1-c x)\right )}{54 c^3}+\frac{h \left (12 \left (6 \left (c^3 x^3-1\right ) \log (1-c x)-c x \left (2 c^2 x^2+3 c x+6\right )\right ) \text{PolyLog}(2,c x)+144 \text{PolyLog}(3,1-c x)-144 \log (1-c x) \text{PolyLog}(2,1-c x)+8 c^3 x^3+33 c^2 x^2+24 c^3 x^3 \log ^2(1-c x)-24 c^3 x^3 \log (1-c x)-42 c^2 x^2 \log (1-c x)+186 c x-72 \log (c x) \log ^2(1-c x)-24 \log ^2(1-c x)-120 c x \log (1-c x)+186 \log (1-c x)\right )}{216 c^3} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F] time = 0.23, size = 0, normalized size = 0. \begin{align*} \int{x}^{2} \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*} -\frac{1}{18} \, h{\left (\frac{{\left (2 \, c^{3} x^{3} + 3 \, c^{2} x^{2} + 6 \, c x - 6 \,{\left (c^{3} x^{3} - 1\right )} \log \left (-c x + 1\right )\right )}{\rm Li}_2\left (c x\right )}{c^{3}} - \frac{\frac{4}{9} \, c^{3} x^{3} - \frac{1}{9} \,{\left (6 \, x^{3} \log \left (-c x + 1\right ) - c{\left (\frac{2 \, c^{2} x^{3} + 3 \, c x^{2} + 6 \, x}{c^{3}} + \frac{6 \, \log \left (c x - 1\right )}{c^{4}}\right )}\right )} c^{3} + \frac{5}{3} \, c^{2} x^{2} - \frac{3}{4} \,{\left (2 \, x^{2} \log \left (-c x + 1\right ) - c{\left (\frac{c x^{2} + 2 \, x}{c^{2}} + \frac{2 \, \log \left (c x - 1\right )}{c^{3}}\right )}\right )} c^{2} + 2 \,{\left (c^{3} x^{3} - 1\right )} \log \left (-c x + 1\right )^{2} - 6 \, \log \left (c x\right ) \log \left (-c x + 1\right )^{2} + \frac{40}{3} \, c x - \frac{2}{3} \,{\left (2 \, c^{3} x^{3} + 3 \, c^{2} x^{2} + 6 \, c x - 11\right )} \log \left (-c x + 1\right ) - 6 \,{\left (c x - 1\right )} \log \left (-c x + 1\right ) - 12 \,{\rm Li}_2\left (-c x + 1\right ) \log \left (-c x + 1\right ) + 12 \,{\rm Li}_{3}(-c x + 1) - 6}{c^{3}}\right )} + \frac{{\left (18 \, c^{3} x^{3}{\rm Li}_2\left (c x\right ) - 2 \, c^{3} x^{3} - 3 \, c^{2} x^{2} - 6 \, c x + 6 \,{\left (c^{3} x^{3} - 1\right )} \log \left (-c x + 1\right )\right )} g}{54 \, c^{3}} \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 x^{2}{\rm Li}_2\left (c x\right ) \log \left (-c x + 1\right ) + g x^{2}{\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(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \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 )} x^{2}{\rm Li}_2\left (c x\right )\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]