Optimal. Leaf size=266 \[ -\frac{1}{2} c^2 h \text{PolyLog}\left (2,\frac{1}{1-c x}\right )-\frac{1}{2} c^2 h \text{PolyLog}(3,c x)-c^2 h \text{PolyLog}(3,1-c x)+\frac{1}{2} c^2 h \log (1-c x) \text{PolyLog}(2,c x)+c^2 h \log (1-c x) \text{PolyLog}(2,1-c x)-\frac{\text{PolyLog}(2,c x) (h \log (1-c x)+g)}{2 x^2}+\frac{c h \text{PolyLog}(2,c x)}{2 x}+\frac{1}{4} c^2 \log \left (1-\frac{1}{1-c x}\right ) (2 h \log (1-c x)+g)+\frac{1}{2} c^2 h \log (c x) \log ^2(1-c x)-c^2 h \log (x)+\frac{1}{2} c^2 h \log (1-c x)+\frac{\log (1-c x) (h \log (1-c x)+g)}{4 x^2}-\frac{c (1-c x) (2 h \log (1-c x)+g)}{4 x}-\frac{c h \log (1-c x)}{2 x} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.496284, antiderivative size = 278, normalized size of antiderivative = 1.05, number of steps used = 31, number of rules used = 22, integrand size = 20, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 1.1, Rules used = {6603, 2439, 2410, 2395, 36, 29, 31, 2391, 2390, 2301, 2411, 2347, 2344, 2316, 2315, 2314, 6591, 6589, 6596, 2396, 2433, 2374} \[ -\frac{1}{2} c^2 h \text{PolyLog}(2,c x)-\frac{1}{2} c^2 h \text{PolyLog}(3,c x)-c^2 h \text{PolyLog}(3,1-c x)+\frac{1}{2} c^2 h \log (1-c x) \text{PolyLog}(2,c x)+c^2 h \log (1-c x) \text{PolyLog}(2,1-c x)-\frac{\text{PolyLog}(2,c x) (h \log (1-c x)+g)}{2 x^2}+\frac{c h \text{PolyLog}(2,c x)}{2 x}-\frac{c^2 (h \log (1-c x)+g)^2}{8 h}+\frac{1}{4} c^2 g \log (x)-\frac{1}{8} c^2 h \log ^2(1-c x)+\frac{1}{2} c^2 h \log (c x) \log ^2(1-c x)-c^2 h \log (x)+\frac{3}{4} c^2 h \log (1-c x)+\frac{\log (1-c x) (h \log (1-c x)+g)}{4 x^2}-\frac{c (1-c x) (h \log (1-c x)+g)}{4 x}-\frac{3 c h \log (1-c x)}{4 x} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 6603
Rule 2439
Rule 2410
Rule 2395
Rule 36
Rule 29
Rule 31
Rule 2391
Rule 2390
Rule 2301
Rule 2411
Rule 2347
Rule 2344
Rule 2316
Rule 2315
Rule 2314
Rule 6591
Rule 6589
Rule 6596
Rule 2396
Rule 2433
Rule 2374
Rubi steps
\begin{align*} \int \frac{(g+h \log (1-c x)) \text{Li}_2(c x)}{x^3} \, dx &=-\frac{(g+h \log (1-c x)) \text{Li}_2(c x)}{2 x^2}-\frac{1}{2} \int \frac{\log (1-c x) (g+h \log (1-c x))}{x^3} \, dx-\frac{1}{2} (c h) \int \left (\frac{\text{Li}_2(c x)}{x^2}+\frac{c \text{Li}_2(c x)}{x}-\frac{c^2 \text{Li}_2(c x)}{-1+c x}\right ) \, dx\\ &=\frac{\log (1-c x) (g+h \log (1-c x))}{4 x^2}-\frac{(g+h \log (1-c x)) \text{Li}_2(c x)}{2 x^2}+\frac{1}{4} c \int \frac{g+h \log (1-c x)}{x^2 (1-c x)} \, dx+\frac{1}{4} (c h) \int \frac{\log (1-c x)}{x^2 (1-c x)} \, dx-\frac{1}{2} (c h) \int \frac{\text{Li}_2(c x)}{x^2} \, dx-\frac{1}{2} \left (c^2 h\right ) \int \frac{\text{Li}_2(c x)}{x} \, dx+\frac{1}{2} \left (c^3 h\right ) \int \frac{\text{Li}_2(c x)}{-1+c x} \, dx\\ &=\frac{\log (1-c x) (g+h \log (1-c x))}{4 x^2}+\frac{c h \text{Li}_2(c x)}{2 x}+\frac{1}{2} c^2 h \log (1-c x) \text{Li}_2(c x)-\frac{(g+h \log (1-c x)) \text{Li}_2(c x)}{2 x^2}-\frac{1}{2} c^2 h \text{Li}_3(c x)-\frac{1}{4} \operatorname{Subst}\left (\int \frac{g+h \log (x)}{x \left (\frac{1}{c}-\frac{x}{c}\right )^2} \, dx,x,1-c x\right )+\frac{1}{4} (c h) \int \left (\frac{\log (1-c x)}{x^2}+\frac{c \log (1-c x)}{x}-\frac{c^2 \log (1-c x)}{-1+c x}\right ) \, dx+\frac{1}{2} (c h) \int \frac{\log (1-c x)}{x^2} \, dx+\frac{1}{2} \left (c^2 h\right ) \int \frac{\log ^2(1-c x)}{x} \, dx\\ &=-\frac{c h \log (1-c x)}{2 x}+\frac{1}{2} c^2 h \log (c x) \log ^2(1-c x)+\frac{\log (1-c x) (g+h \log (1-c x))}{4 x^2}+\frac{c h \text{Li}_2(c x)}{2 x}+\frac{1}{2} c^2 h \log (1-c x) \text{Li}_2(c x)-\frac{(g+h \log (1-c x)) \text{Li}_2(c x)}{2 x^2}-\frac{1}{2} c^2 h \text{Li}_3(c x)-\frac{1}{4} \operatorname{Subst}\left (\int \frac{g+h \log (x)}{\left (\frac{1}{c}-\frac{x}{c}\right )^2} \, dx,x,1-c x\right )-\frac{1}{4} c \operatorname{Subst}\left (\int \frac{g+h \log (x)}{x \left (\frac{1}{c}-\frac{x}{c}\right )} \, dx,x,1-c x\right )+\frac{1}{4} (c h) \int \frac{\log (1-c x)}{x^2} \, dx+\frac{1}{4} \left (c^2 h\right ) \int \frac{\log (1-c x)}{x} \, dx-\frac{1}{2} \left (c^2 h\right ) \int \frac{1}{x (1-c x)} \, dx-\frac{1}{4} \left (c^3 h\right ) \int \frac{\log (1-c x)}{-1+c x} \, dx+\left (c^3 h\right ) \int \frac{\log (c x) \log (1-c x)}{1-c x} \, dx\\ &=-\frac{3 c h \log (1-c x)}{4 x}+\frac{1}{2} c^2 h \log (c x) \log ^2(1-c x)-\frac{c (1-c x) (g+h \log (1-c x))}{4 x}+\frac{\log (1-c x) (g+h \log (1-c x))}{4 x^2}-\frac{1}{4} c^2 h \text{Li}_2(c x)+\frac{c h \text{Li}_2(c x)}{2 x}+\frac{1}{2} c^2 h \log (1-c x) \text{Li}_2(c x)-\frac{(g+h \log (1-c x)) \text{Li}_2(c x)}{2 x^2}-\frac{1}{2} c^2 h \text{Li}_3(c x)-\frac{1}{4} c \operatorname{Subst}\left (\int \frac{g+h \log (x)}{\frac{1}{c}-\frac{x}{c}} \, dx,x,1-c x\right )-\frac{1}{4} c^2 \operatorname{Subst}\left (\int \frac{g+h \log (x)}{x} \, dx,x,1-c x\right )+\frac{1}{4} (c h) \operatorname{Subst}\left (\int \frac{1}{\frac{1}{c}-\frac{x}{c}} \, dx,x,1-c x\right )-\frac{1}{4} \left (c^2 h\right ) \int \frac{1}{x (1-c x)} \, dx-\frac{1}{4} \left (c^2 h\right ) \operatorname{Subst}\left (\int \frac{\log (x)}{x} \, dx,x,1-c x\right )-\frac{1}{2} \left (c^2 h\right ) \int \frac{1}{x} \, dx-\left (c^2 h\right ) \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 )-\frac{1}{2} \left (c^3 h\right ) \int \frac{1}{1-c x} \, dx\\ &=\frac{1}{4} c^2 g \log (x)-\frac{3}{4} c^2 h \log (x)+\frac{1}{2} c^2 h \log (1-c x)-\frac{3 c h \log (1-c x)}{4 x}-\frac{1}{8} c^2 h \log ^2(1-c x)+\frac{1}{2} c^2 h \log (c x) \log ^2(1-c x)-\frac{c (1-c x) (g+h \log (1-c x))}{4 x}+\frac{\log (1-c x) (g+h \log (1-c x))}{4 x^2}-\frac{c^2 (g+h \log (1-c x))^2}{8 h}-\frac{1}{4} c^2 h \text{Li}_2(c x)+\frac{c h \text{Li}_2(c x)}{2 x}+\frac{1}{2} c^2 h \log (1-c x) \text{Li}_2(c x)-\frac{(g+h \log (1-c x)) \text{Li}_2(c x)}{2 x^2}+c^2 h \log (1-c x) \text{Li}_2(1-c x)-\frac{1}{2} c^2 h \text{Li}_3(c x)-\frac{1}{4} (c h) \operatorname{Subst}\left (\int \frac{\log (x)}{\frac{1}{c}-\frac{x}{c}} \, dx,x,1-c x\right )-\frac{1}{4} \left (c^2 h\right ) \int \frac{1}{x} \, dx-\left (c^2 h\right ) \operatorname{Subst}\left (\int \frac{\text{Li}_2(x)}{x} \, dx,x,1-c x\right )-\frac{1}{4} \left (c^3 h\right ) \int \frac{1}{1-c x} \, dx\\ &=\frac{1}{4} c^2 g \log (x)-c^2 h \log (x)+\frac{3}{4} c^2 h \log (1-c x)-\frac{3 c h \log (1-c x)}{4 x}-\frac{1}{8} c^2 h \log ^2(1-c x)+\frac{1}{2} c^2 h \log (c x) \log ^2(1-c x)-\frac{c (1-c x) (g+h \log (1-c x))}{4 x}+\frac{\log (1-c x) (g+h \log (1-c x))}{4 x^2}-\frac{c^2 (g+h \log (1-c x))^2}{8 h}-\frac{1}{2} c^2 h \text{Li}_2(c x)+\frac{c h \text{Li}_2(c x)}{2 x}+\frac{1}{2} c^2 h \log (1-c x) \text{Li}_2(c x)-\frac{(g+h \log (1-c x)) \text{Li}_2(c x)}{2 x^2}+c^2 h \log (1-c x) \text{Li}_2(1-c x)-\frac{1}{2} c^2 h \text{Li}_3(c x)-c^2 h \text{Li}_3(1-c x)\\ \end{align*}
Mathematica [A] time = 0.256103, size = 238, normalized size = 0.89 \[ \frac{g \left (-2 \text{PolyLog}(2,c x)+c^2 x^2 \log (x)-c^2 x^2 \log (1-c x)-c x+\log (1-c x)\right )}{4 x^2}+\frac{1}{4} h \left (\frac{2 \left (\left (c^2 x^2-1\right ) \log (1-c x)+c x\right ) \text{PolyLog}(2,c x)}{x^2}-2 c^2 \text{PolyLog}(3,c x)-4 c^2 \text{PolyLog}(3,1-c x)+2 c^2 (2 \log (1-c x)+1) \text{PolyLog}(2,1-c x)+2 c^2 \log (c x) \log ^2(1-c x)-c^2 \log ^2(1-c x)-2 c^2 \log (x)-2 c^2 \log (c x)+2 c^2 \log (c x) \log (1-c x)+4 c^2 \log (1-c x)+\frac{\log ^2(1-c x)}{x^2}-\frac{4 c \log (1-c x)}{x}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F] time = 0.333, size = 0, normalized size = 0. \begin{align*} \int{\frac{ \left ( g+h\ln \left ( -cx+1 \right ) \right ){\it polylog} \left ( 2,cx \right ) }{{x}^{3}}}\, 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}{4} \,{\left (c^{2} \log \left (x\right ) - \frac{c x +{\left (c^{2} x^{2} - 1\right )} \log \left (-c x + 1\right ) + 2 \,{\rm Li}_2\left (c x\right )}{x^{2}}\right )} g + h \int \frac{{\rm Li}_2\left (c x\right ) \log \left (-c x + 1\right )}{x^{3}}\,{d x} \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 (\frac{h{\rm Li}_2\left (c x\right ) \log \left (-c x + 1\right ) + g{\rm Li}_2\left (c x\right )}{x^{3}}, 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 \frac{{\left (h \log \left (-c x + 1\right ) + g\right )}{\rm Li}_2\left (c x\right )}{x^{3}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]