Optimal. Leaf size=172 \[ -\frac {b \text {Li}_2\left (1-\frac {2}{c x+1}\right ) \left (a+b \tanh ^{-1}(c x)\right )}{c^2 d}+\frac {\left (a+b \tanh ^{-1}(c x)\right )^2}{c^2 d}-\frac {2 b \log \left (\frac {2}{1-c x}\right ) \left (a+b \tanh ^{-1}(c x)\right )}{c^2 d}+\frac {\log \left (\frac {2}{c x+1}\right ) \left (a+b \tanh ^{-1}(c x)\right )^2}{c^2 d}+\frac {x \left (a+b \tanh ^{-1}(c x)\right )^2}{c d}-\frac {b^2 \text {Li}_2\left (1-\frac {2}{1-c x}\right )}{c^2 d}-\frac {b^2 \text {Li}_3\left (1-\frac {2}{c x+1}\right )}{2 c^2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.31, antiderivative size = 172, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 9, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.450, Rules used = {5930, 5910, 5984, 5918, 2402, 2315, 5948, 6056, 6610} \[ -\frac {b \text {PolyLog}\left (2,1-\frac {2}{c x+1}\right ) \left (a+b \tanh ^{-1}(c x)\right )}{c^2 d}-\frac {b^2 \text {PolyLog}\left (2,1-\frac {2}{1-c x}\right )}{c^2 d}-\frac {b^2 \text {PolyLog}\left (3,1-\frac {2}{c x+1}\right )}{2 c^2 d}+\frac {\left (a+b \tanh ^{-1}(c x)\right )^2}{c^2 d}-\frac {2 b \log \left (\frac {2}{1-c x}\right ) \left (a+b \tanh ^{-1}(c x)\right )}{c^2 d}+\frac {\log \left (\frac {2}{c x+1}\right ) \left (a+b \tanh ^{-1}(c x)\right )^2}{c^2 d}+\frac {x \left (a+b \tanh ^{-1}(c x)\right )^2}{c d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2315
Rule 2402
Rule 5910
Rule 5918
Rule 5930
Rule 5948
Rule 5984
Rule 6056
Rule 6610
Rubi steps
\begin {align*} \int \frac {x \left (a+b \tanh ^{-1}(c x)\right )^2}{d+c d x} \, dx &=-\frac {\int \frac {\left (a+b \tanh ^{-1}(c x)\right )^2}{d+c d x} \, dx}{c}+\frac {\int \left (a+b \tanh ^{-1}(c x)\right )^2 \, dx}{c d}\\ &=\frac {x \left (a+b \tanh ^{-1}(c x)\right )^2}{c d}+\frac {\left (a+b \tanh ^{-1}(c x)\right )^2 \log \left (\frac {2}{1+c x}\right )}{c^2 d}-\frac {(2 b) \int \frac {x \left (a+b \tanh ^{-1}(c x)\right )}{1-c^2 x^2} \, dx}{d}-\frac {(2 b) \int \frac {\left (a+b \tanh ^{-1}(c x)\right ) \log \left (\frac {2}{1+c x}\right )}{1-c^2 x^2} \, dx}{c d}\\ &=\frac {\left (a+b \tanh ^{-1}(c x)\right )^2}{c^2 d}+\frac {x \left (a+b \tanh ^{-1}(c x)\right )^2}{c d}+\frac {\left (a+b \tanh ^{-1}(c x)\right )^2 \log \left (\frac {2}{1+c x}\right )}{c^2 d}-\frac {b \left (a+b \tanh ^{-1}(c x)\right ) \text {Li}_2\left (1-\frac {2}{1+c x}\right )}{c^2 d}-\frac {(2 b) \int \frac {a+b \tanh ^{-1}(c x)}{1-c x} \, dx}{c d}+\frac {b^2 \int \frac {\text {Li}_2\left (1-\frac {2}{1+c x}\right )}{1-c^2 x^2} \, dx}{c d}\\ &=\frac {\left (a+b \tanh ^{-1}(c x)\right )^2}{c^2 d}+\frac {x \left (a+b \tanh ^{-1}(c x)\right )^2}{c d}-\frac {2 b \left (a+b \tanh ^{-1}(c x)\right ) \log \left (\frac {2}{1-c x}\right )}{c^2 d}+\frac {\left (a+b \tanh ^{-1}(c x)\right )^2 \log \left (\frac {2}{1+c x}\right )}{c^2 d}-\frac {b \left (a+b \tanh ^{-1}(c x)\right ) \text {Li}_2\left (1-\frac {2}{1+c x}\right )}{c^2 d}-\frac {b^2 \text {Li}_3\left (1-\frac {2}{1+c x}\right )}{2 c^2 d}+\frac {\left (2 b^2\right ) \int \frac {\log \left (\frac {2}{1-c x}\right )}{1-c^2 x^2} \, dx}{c d}\\ &=\frac {\left (a+b \tanh ^{-1}(c x)\right )^2}{c^2 d}+\frac {x \left (a+b \tanh ^{-1}(c x)\right )^2}{c d}-\frac {2 b \left (a+b \tanh ^{-1}(c x)\right ) \log \left (\frac {2}{1-c x}\right )}{c^2 d}+\frac {\left (a+b \tanh ^{-1}(c x)\right )^2 \log \left (\frac {2}{1+c x}\right )}{c^2 d}-\frac {b \left (a+b \tanh ^{-1}(c x)\right ) \text {Li}_2\left (1-\frac {2}{1+c x}\right )}{c^2 d}-\frac {b^2 \text {Li}_3\left (1-\frac {2}{1+c x}\right )}{2 c^2 d}-\frac {\left (2 b^2\right ) \operatorname {Subst}\left (\int \frac {\log (2 x)}{1-2 x} \, dx,x,\frac {1}{1-c x}\right )}{c^2 d}\\ &=\frac {\left (a+b \tanh ^{-1}(c x)\right )^2}{c^2 d}+\frac {x \left (a+b \tanh ^{-1}(c x)\right )^2}{c d}-\frac {2 b \left (a+b \tanh ^{-1}(c x)\right ) \log \left (\frac {2}{1-c x}\right )}{c^2 d}+\frac {\left (a+b \tanh ^{-1}(c x)\right )^2 \log \left (\frac {2}{1+c x}\right )}{c^2 d}-\frac {b^2 \text {Li}_2\left (1-\frac {2}{1-c x}\right )}{c^2 d}-\frac {b \left (a+b \tanh ^{-1}(c x)\right ) \text {Li}_2\left (1-\frac {2}{1+c x}\right )}{c^2 d}-\frac {b^2 \text {Li}_3\left (1-\frac {2}{1+c x}\right )}{2 c^2 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.49, size = 140, normalized size = 0.81 \[ \frac {2 a \left (a c x-a \log (c x+1)+b \log \left (1-c^2 x^2\right )\right )-2 b \text {Li}_2\left (-e^{-2 \tanh ^{-1}(c x)}\right ) \left (a+b \tanh ^{-1}(c x)-b\right )+4 b \tanh ^{-1}(c x) \left ((a-b) \log \left (e^{-2 \tanh ^{-1}(c x)}+1\right )+a c x\right )-b^2 \text {Li}_3\left (-e^{-2 \tanh ^{-1}(c x)}\right )+2 b^2 \tanh ^{-1}(c x)^2 \left (c x+\log \left (e^{-2 \tanh ^{-1}(c x)}+1\right )-1\right )}{2 c^2 d} \]
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
fricas [F] time = 0.43, size = 0, normalized size = 0.00 \[ {\rm integral}\left (\frac {b^{2} x \operatorname {artanh}\left (c x\right )^{2} + 2 \, a b x \operatorname {artanh}\left (c x\right ) + a^{2} x}{c d x + d}, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {{\left (b \operatorname {artanh}\left (c x\right ) + a\right )}^{2} x}{c d x + d}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [C] time = 0.57, size = 5361, normalized size = 31.17 \[ \text {output too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ a^{2} {\left (\frac {x}{c d} - \frac {\log \left (c x + 1\right )}{c^{2} d}\right )} + \frac {{\left (b^{2} c x - b^{2} \log \left (c x + 1\right )\right )} \log \left (-c x + 1\right )^{2}}{4 \, c^{2} d} - \int -\frac {{\left (b^{2} c^{2} x^{2} - b^{2} c x\right )} \log \left (c x + 1\right )^{2} + 4 \, {\left (a b c^{2} x^{2} - a b c x\right )} \log \left (c x + 1\right ) - 2 \, {\left ({\left (2 \, a b c^{2} + b^{2} c^{2}\right )} x^{2} - {\left (2 \, a b c - b^{2} c\right )} x + {\left (b^{2} c^{2} x^{2} - 2 \, b^{2} c x - b^{2}\right )} \log \left (c x + 1\right )\right )} \log \left (-c x + 1\right )}{4 \, {\left (c^{3} d x^{2} - c d\right )}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int \frac {x\,{\left (a+b\,\mathrm {atanh}\left (c\,x\right )\right )}^2}{d+c\,d\,x} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \frac {\int \frac {a^{2} x}{c x + 1}\, dx + \int \frac {b^{2} x \operatorname {atanh}^{2}{\left (c x \right )}}{c x + 1}\, dx + \int \frac {2 a b x \operatorname {atanh}{\left (c x \right )}}{c x + 1}\, dx}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________