Optimal. Leaf size=247 \[ \frac {b \text {Li}_2\left (1-\frac {2}{c x+1}\right ) \left (a+b \tanh ^{-1}(c x)\right )}{c^3 d}-\frac {3 \left (a+b \tanh ^{-1}(c x)\right )^2}{2 c^3 d}+\frac {2 b \log \left (\frac {2}{1-c x}\right ) \left (a+b \tanh ^{-1}(c x)\right )}{c^3 d}-\frac {\log \left (\frac {2}{c x+1}\right ) \left (a+b \tanh ^{-1}(c x)\right )^2}{c^3 d}+\frac {a b x}{c^2 d}-\frac {x \left (a+b \tanh ^{-1}(c x)\right )^2}{c^2 d}+\frac {x^2 \left (a+b \tanh ^{-1}(c x)\right )^2}{2 c d}+\frac {b^2 \text {Li}_2\left (1-\frac {2}{1-c x}\right )}{c^3 d}+\frac {b^2 \text {Li}_3\left (1-\frac {2}{c x+1}\right )}{2 c^3 d}+\frac {b^2 x \tanh ^{-1}(c x)}{c^2 d}+\frac {b^2 \log \left (1-c^2 x^2\right )}{2 c^3 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.53, antiderivative size = 247, normalized size of antiderivative = 1.00, number of steps used = 16, number of rules used = 12, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.546, Rules used = {5930, 5916, 5980, 5910, 260, 5948, 5984, 5918, 2402, 2315, 6056, 6610} \[ \frac {b \text {PolyLog}\left (2,1-\frac {2}{c x+1}\right ) \left (a+b \tanh ^{-1}(c x)\right )}{c^3 d}+\frac {b^2 \text {PolyLog}\left (2,1-\frac {2}{1-c x}\right )}{c^3 d}+\frac {b^2 \text {PolyLog}\left (3,1-\frac {2}{c x+1}\right )}{2 c^3 d}+\frac {a b x}{c^2 d}-\frac {x \left (a+b \tanh ^{-1}(c x)\right )^2}{c^2 d}-\frac {3 \left (a+b \tanh ^{-1}(c x)\right )^2}{2 c^3 d}+\frac {2 b \log \left (\frac {2}{1-c x}\right ) \left (a+b \tanh ^{-1}(c x)\right )}{c^3 d}-\frac {\log \left (\frac {2}{c x+1}\right ) \left (a+b \tanh ^{-1}(c x)\right )^2}{c^3 d}+\frac {x^2 \left (a+b \tanh ^{-1}(c x)\right )^2}{2 c d}+\frac {b^2 \log \left (1-c^2 x^2\right )}{2 c^3 d}+\frac {b^2 x \tanh ^{-1}(c x)}{c^2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 260
Rule 2315
Rule 2402
Rule 5910
Rule 5916
Rule 5918
Rule 5930
Rule 5948
Rule 5980
Rule 5984
Rule 6056
Rule 6610
Rubi steps
\begin {align*} \int \frac {x^2 \left (a+b \tanh ^{-1}(c x)\right )^2}{d+c d x} \, dx &=-\frac {\int \frac {x \left (a+b \tanh ^{-1}(c x)\right )^2}{d+c d x} \, dx}{c}+\frac {\int x \left (a+b \tanh ^{-1}(c x)\right )^2 \, dx}{c d}\\ &=\frac {x^2 \left (a+b \tanh ^{-1}(c x)\right )^2}{2 c d}+\frac {\int \frac {\left (a+b \tanh ^{-1}(c x)\right )^2}{d+c d x} \, dx}{c^2}-\frac {b \int \frac {x^2 \left (a+b \tanh ^{-1}(c x)\right )}{1-c^2 x^2} \, dx}{d}-\frac {\int \left (a+b \tanh ^{-1}(c x)\right )^2 \, dx}{c^2 d}\\ &=-\frac {x \left (a+b \tanh ^{-1}(c x)\right )^2}{c^2 d}+\frac {x^2 \left (a+b \tanh ^{-1}(c x)\right )^2}{2 c d}-\frac {\left (a+b \tanh ^{-1}(c x)\right )^2 \log \left (\frac {2}{1+c x}\right )}{c^3 d}+\frac {b \int \left (a+b \tanh ^{-1}(c x)\right ) \, dx}{c^2 d}-\frac {b \int \frac {a+b \tanh ^{-1}(c x)}{1-c^2 x^2} \, dx}{c^2 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^2 d}+\frac {(2 b) \int \frac {x \left (a+b \tanh ^{-1}(c x)\right )}{1-c^2 x^2} \, dx}{c d}\\ &=\frac {a b x}{c^2 d}-\frac {3 \left (a+b \tanh ^{-1}(c x)\right )^2}{2 c^3 d}-\frac {x \left (a+b \tanh ^{-1}(c x)\right )^2}{c^2 d}+\frac {x^2 \left (a+b \tanh ^{-1}(c x)\right )^2}{2 c d}-\frac {\left (a+b \tanh ^{-1}(c x)\right )^2 \log \left (\frac {2}{1+c x}\right )}{c^3 d}+\frac {b \left (a+b \tanh ^{-1}(c x)\right ) \text {Li}_2\left (1-\frac {2}{1+c x}\right )}{c^3 d}+\frac {(2 b) \int \frac {a+b \tanh ^{-1}(c x)}{1-c x} \, dx}{c^2 d}+\frac {b^2 \int \tanh ^{-1}(c x) \, dx}{c^2 d}-\frac {b^2 \int \frac {\text {Li}_2\left (1-\frac {2}{1+c x}\right )}{1-c^2 x^2} \, dx}{c^2 d}\\ &=\frac {a b x}{c^2 d}+\frac {b^2 x \tanh ^{-1}(c x)}{c^2 d}-\frac {3 \left (a+b \tanh ^{-1}(c x)\right )^2}{2 c^3 d}-\frac {x \left (a+b \tanh ^{-1}(c x)\right )^2}{c^2 d}+\frac {x^2 \left (a+b \tanh ^{-1}(c x)\right )^2}{2 c d}+\frac {2 b \left (a+b \tanh ^{-1}(c x)\right ) \log \left (\frac {2}{1-c x}\right )}{c^3 d}-\frac {\left (a+b \tanh ^{-1}(c x)\right )^2 \log \left (\frac {2}{1+c x}\right )}{c^3 d}+\frac {b \left (a+b \tanh ^{-1}(c x)\right ) \text {Li}_2\left (1-\frac {2}{1+c x}\right )}{c^3 d}+\frac {b^2 \text {Li}_3\left (1-\frac {2}{1+c x}\right )}{2 c^3 d}-\frac {\left (2 b^2\right ) \int \frac {\log \left (\frac {2}{1-c x}\right )}{1-c^2 x^2} \, dx}{c^2 d}-\frac {b^2 \int \frac {x}{1-c^2 x^2} \, dx}{c d}\\ &=\frac {a b x}{c^2 d}+\frac {b^2 x \tanh ^{-1}(c x)}{c^2 d}-\frac {3 \left (a+b \tanh ^{-1}(c x)\right )^2}{2 c^3 d}-\frac {x \left (a+b \tanh ^{-1}(c x)\right )^2}{c^2 d}+\frac {x^2 \left (a+b \tanh ^{-1}(c x)\right )^2}{2 c d}+\frac {2 b \left (a+b \tanh ^{-1}(c x)\right ) \log \left (\frac {2}{1-c x}\right )}{c^3 d}-\frac {\left (a+b \tanh ^{-1}(c x)\right )^2 \log \left (\frac {2}{1+c x}\right )}{c^3 d}+\frac {b^2 \log \left (1-c^2 x^2\right )}{2 c^3 d}+\frac {b \left (a+b \tanh ^{-1}(c x)\right ) \text {Li}_2\left (1-\frac {2}{1+c x}\right )}{c^3 d}+\frac {b^2 \text {Li}_3\left (1-\frac {2}{1+c x}\right )}{2 c^3 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^3 d}\\ &=\frac {a b x}{c^2 d}+\frac {b^2 x \tanh ^{-1}(c x)}{c^2 d}-\frac {3 \left (a+b \tanh ^{-1}(c x)\right )^2}{2 c^3 d}-\frac {x \left (a+b \tanh ^{-1}(c x)\right )^2}{c^2 d}+\frac {x^2 \left (a+b \tanh ^{-1}(c x)\right )^2}{2 c d}+\frac {2 b \left (a+b \tanh ^{-1}(c x)\right ) \log \left (\frac {2}{1-c x}\right )}{c^3 d}-\frac {\left (a+b \tanh ^{-1}(c x)\right )^2 \log \left (\frac {2}{1+c x}\right )}{c^3 d}+\frac {b^2 \log \left (1-c^2 x^2\right )}{2 c^3 d}+\frac {b^2 \text {Li}_2\left (1-\frac {2}{1-c x}\right )}{c^3 d}+\frac {b \left (a+b \tanh ^{-1}(c x)\right ) \text {Li}_2\left (1-\frac {2}{1+c x}\right )}{c^3 d}+\frac {b^2 \text {Li}_3\left (1-\frac {2}{1+c x}\right )}{2 c^3 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.52, size = 260, normalized size = 1.05 \[ \frac {a^2 c^2 x^2-2 a^2 c x+2 a^2 \log (c x+1)-2 a b \log \left (1-c^2 x^2\right )+2 a b c^2 x^2 \tanh ^{-1}(c x)+2 b \text {Li}_2\left (-e^{-2 \tanh ^{-1}(c x)}\right ) \left (a+b \tanh ^{-1}(c x)-b\right )+2 a b c x-2 a b \tanh ^{-1}(c x)-4 a b c x \tanh ^{-1}(c x)-4 a b \tanh ^{-1}(c x) \log \left (e^{-2 \tanh ^{-1}(c x)}+1\right )+b^2 \log \left (1-c^2 x^2\right )+b^2 c^2 x^2 \tanh ^{-1}(c x)^2+b^2 \text {Li}_3\left (-e^{-2 \tanh ^{-1}(c x)}\right )+b^2 \tanh ^{-1}(c x)^2-2 b^2 c x \tanh ^{-1}(c x)^2+2 b^2 c x \tanh ^{-1}(c x)-2 b^2 \tanh ^{-1}(c x)^2 \log \left (e^{-2 \tanh ^{-1}(c x)}+1\right )+4 b^2 \tanh ^{-1}(c x) \log \left (e^{-2 \tanh ^{-1}(c x)}+1\right )}{2 c^3 d} \]
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
fricas [F] time = 0.53, size = 0, normalized size = 0.00 \[ {\rm integral}\left (\frac {b^{2} x^{2} \operatorname {artanh}\left (c x\right )^{2} + 2 \, a b x^{2} \operatorname {artanh}\left (c x\right ) + a^{2} x^{2}}{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^{2}}{c d x + d}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [C] time = 1.46, size = 1192, normalized size = 4.83 \[ \text {result 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 \[ \frac {1}{2} \, a^{2} {\left (\frac {c x^{2} - 2 \, x}{c^{2} d} + \frac {2 \, \log \left (c x + 1\right )}{c^{3} d}\right )} + \frac {{\left (b^{2} c^{2} x^{2} - 2 \, b^{2} c x + 2 \, b^{2} \log \left (c x + 1\right )\right )} \log \left (-c x + 1\right )^{2}}{8 \, c^{3} d} - \int -\frac {{\left (b^{2} c^{3} x^{3} - b^{2} c^{2} x^{2}\right )} \log \left (c x + 1\right )^{2} + 4 \, {\left (a b c^{3} x^{3} - a b c^{2} x^{2}\right )} \log \left (c x + 1\right ) + {\left (2 \, b^{2} c x - {\left (4 \, a b c^{3} + b^{2} c^{3}\right )} x^{3} + {\left (4 \, a b c^{2} + b^{2} c^{2}\right )} x^{2} - 2 \, {\left (b^{2} c^{3} x^{3} - b^{2} c^{2} x^{2} + b^{2} c x + b^{2}\right )} \log \left (c x + 1\right )\right )} \log \left (-c x + 1\right )}{4 \, {\left (c^{4} d x^{2} - c^{2} 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.00 \[ \int \frac {x^2\,{\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^{2}}{c x + 1}\, dx + \int \frac {b^{2} x^{2} \operatorname {atanh}^{2}{\left (c x \right )}}{c x + 1}\, dx + \int \frac {2 a b x^{2} \operatorname {atanh}{\left (c x \right )}}{c x + 1}\, dx}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________