Optimal. Leaf size=204 \[ \frac {x}{3 b^2}-\frac {2 a (a+b x) \coth ^{-1}(a+b x)}{b^3}+\frac {(a+b x)^2 \coth ^{-1}(a+b x)}{3 b^3}+\frac {a \left (3+a^2\right ) \coth ^{-1}(a+b x)^2}{3 b^3}+\frac {\left (1+3 a^2\right ) \coth ^{-1}(a+b x)^2}{3 b^3}+\frac {1}{3} x^3 \coth ^{-1}(a+b x)^2-\frac {\tanh ^{-1}(a+b x)}{3 b^3}-\frac {2 \left (1+3 a^2\right ) \coth ^{-1}(a+b x) \log \left (\frac {2}{1-a-b x}\right )}{3 b^3}-\frac {a \log \left (1-(a+b x)^2\right )}{b^3}-\frac {\left (1+3 a^2\right ) \text {PolyLog}\left (2,-\frac {1+a+b x}{1-a-b x}\right )}{3 b^3} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.20, antiderivative size = 204, normalized size of antiderivative = 1.00, number
of steps used = 15, number of rules used = 13, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 1.083, Rules
used = {6247, 6066, 6022, 266, 6038, 327, 212, 6196, 6096, 6132, 6056, 2449, 2352}
\begin {gather*} -\frac {\left (3 a^2+1\right ) \text {Li}_2\left (-\frac {a+b x+1}{-a-b x+1}\right )}{3 b^3}+\frac {a \left (a^2+3\right ) \coth ^{-1}(a+b x)^2}{3 b^3}+\frac {\left (3 a^2+1\right ) \coth ^{-1}(a+b x)^2}{3 b^3}-\frac {2 \left (3 a^2+1\right ) \log \left (\frac {2}{-a-b x+1}\right ) \coth ^{-1}(a+b x)}{3 b^3}-\frac {a \log \left (1-(a+b x)^2\right )}{b^3}-\frac {\tanh ^{-1}(a+b x)}{3 b^3}+\frac {(a+b x)^2 \coth ^{-1}(a+b x)}{3 b^3}-\frac {2 a (a+b x) \coth ^{-1}(a+b x)}{b^3}+\frac {1}{3} x^3 \coth ^{-1}(a+b x)^2+\frac {x}{3 b^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 212
Rule 266
Rule 327
Rule 2352
Rule 2449
Rule 6022
Rule 6038
Rule 6056
Rule 6066
Rule 6096
Rule 6132
Rule 6196
Rule 6247
Rubi steps
\begin {align*} \int x^2 \coth ^{-1}(a+b x)^2 \, dx &=\frac {\text {Subst}\left (\int \left (-\frac {a}{b}+\frac {x}{b}\right )^2 \coth ^{-1}(x)^2 \, dx,x,a+b x\right )}{b}\\ &=\frac {1}{3} x^3 \coth ^{-1}(a+b x)^2-\frac {2}{3} \text {Subst}\left (\int \left (\frac {3 a \coth ^{-1}(x)}{b^3}-\frac {x \coth ^{-1}(x)}{b^3}-\frac {\left (a \left (3+a^2\right )-\left (1+3 a^2\right ) x\right ) \coth ^{-1}(x)}{b^3 \left (1-x^2\right )}\right ) \, dx,x,a+b x\right )\\ &=\frac {1}{3} x^3 \coth ^{-1}(a+b x)^2+\frac {2 \text {Subst}\left (\int x \coth ^{-1}(x) \, dx,x,a+b x\right )}{3 b^3}+\frac {2 \text {Subst}\left (\int \frac {\left (a \left (3+a^2\right )-\left (1+3 a^2\right ) x\right ) \coth ^{-1}(x)}{1-x^2} \, dx,x,a+b x\right )}{3 b^3}-\frac {(2 a) \text {Subst}\left (\int \coth ^{-1}(x) \, dx,x,a+b x\right )}{b^3}\\ &=-\frac {2 a (a+b x) \coth ^{-1}(a+b x)}{b^3}+\frac {(a+b x)^2 \coth ^{-1}(a+b x)}{3 b^3}+\frac {1}{3} x^3 \coth ^{-1}(a+b x)^2-\frac {\text {Subst}\left (\int \frac {x^2}{1-x^2} \, dx,x,a+b x\right )}{3 b^3}+\frac {2 \text {Subst}\left (\int \left (\frac {a \left (3+a^2\right ) \coth ^{-1}(x)}{1-x^2}-\frac {\left (1+3 a^2\right ) x \coth ^{-1}(x)}{1-x^2}\right ) \, dx,x,a+b x\right )}{3 b^3}+\frac {(2 a) \text {Subst}\left (\int \frac {x}{1-x^2} \, dx,x,a+b x\right )}{b^3}\\ &=\frac {x}{3 b^2}-\frac {2 a (a+b x) \coth ^{-1}(a+b x)}{b^3}+\frac {(a+b x)^2 \coth ^{-1}(a+b x)}{3 b^3}+\frac {1}{3} x^3 \coth ^{-1}(a+b x)^2-\frac {a \log \left (1-(a+b x)^2\right )}{b^3}-\frac {\text {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,a+b x\right )}{3 b^3}+\frac {\left (2 a \left (3+a^2\right )\right ) \text {Subst}\left (\int \frac {\coth ^{-1}(x)}{1-x^2} \, dx,x,a+b x\right )}{3 b^3}-\frac {\left (2 \left (1+3 a^2\right )\right ) \text {Subst}\left (\int \frac {x \coth ^{-1}(x)}{1-x^2} \, dx,x,a+b x\right )}{3 b^3}\\ &=\frac {x}{3 b^2}-\frac {2 a (a+b x) \coth ^{-1}(a+b x)}{b^3}+\frac {(a+b x)^2 \coth ^{-1}(a+b x)}{3 b^3}+\frac {a \left (3+a^2\right ) \coth ^{-1}(a+b x)^2}{3 b^3}+\frac {\left (1+3 a^2\right ) \coth ^{-1}(a+b x)^2}{3 b^3}+\frac {1}{3} x^3 \coth ^{-1}(a+b x)^2-\frac {\tanh ^{-1}(a+b x)}{3 b^3}-\frac {a \log \left (1-(a+b x)^2\right )}{b^3}-\frac {\left (2 \left (1+3 a^2\right )\right ) \text {Subst}\left (\int \frac {\coth ^{-1}(x)}{1-x} \, dx,x,a+b x\right )}{3 b^3}\\ &=\frac {x}{3 b^2}-\frac {2 a (a+b x) \coth ^{-1}(a+b x)}{b^3}+\frac {(a+b x)^2 \coth ^{-1}(a+b x)}{3 b^3}+\frac {a \left (3+a^2\right ) \coth ^{-1}(a+b x)^2}{3 b^3}+\frac {\left (1+3 a^2\right ) \coth ^{-1}(a+b x)^2}{3 b^3}+\frac {1}{3} x^3 \coth ^{-1}(a+b x)^2-\frac {\tanh ^{-1}(a+b x)}{3 b^3}-\frac {2 \left (1+3 a^2\right ) \coth ^{-1}(a+b x) \log \left (\frac {2}{1-a-b x}\right )}{3 b^3}-\frac {a \log \left (1-(a+b x)^2\right )}{b^3}+\frac {\left (2 \left (1+3 a^2\right )\right ) \text {Subst}\left (\int \frac {\log \left (\frac {2}{1-x}\right )}{1-x^2} \, dx,x,a+b x\right )}{3 b^3}\\ &=\frac {x}{3 b^2}-\frac {2 a (a+b x) \coth ^{-1}(a+b x)}{b^3}+\frac {(a+b x)^2 \coth ^{-1}(a+b x)}{3 b^3}+\frac {a \left (3+a^2\right ) \coth ^{-1}(a+b x)^2}{3 b^3}+\frac {\left (1+3 a^2\right ) \coth ^{-1}(a+b x)^2}{3 b^3}+\frac {1}{3} x^3 \coth ^{-1}(a+b x)^2-\frac {\tanh ^{-1}(a+b x)}{3 b^3}-\frac {2 \left (1+3 a^2\right ) \coth ^{-1}(a+b x) \log \left (\frac {2}{1-a-b x}\right )}{3 b^3}-\frac {a \log \left (1-(a+b x)^2\right )}{b^3}-\frac {\left (2 \left (1+3 a^2\right )\right ) \text {Subst}\left (\int \frac {\log (2 x)}{1-2 x} \, dx,x,\frac {1}{1-a-b x}\right )}{3 b^3}\\ &=\frac {x}{3 b^2}-\frac {2 a (a+b x) \coth ^{-1}(a+b x)}{b^3}+\frac {(a+b x)^2 \coth ^{-1}(a+b x)}{3 b^3}+\frac {a \left (3+a^2\right ) \coth ^{-1}(a+b x)^2}{3 b^3}+\frac {\left (1+3 a^2\right ) \coth ^{-1}(a+b x)^2}{3 b^3}+\frac {1}{3} x^3 \coth ^{-1}(a+b x)^2-\frac {\tanh ^{-1}(a+b x)}{3 b^3}-\frac {2 \left (1+3 a^2\right ) \coth ^{-1}(a+b x) \log \left (\frac {2}{1-a-b x}\right )}{3 b^3}-\frac {a \log \left (1-(a+b x)^2\right )}{b^3}-\frac {\left (1+3 a^2\right ) \text {Li}_2\left (1-\frac {2}{1-a-b x}\right )}{3 b^3}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(607\) vs. \(2(204)=408\).
time = 3.20, size = 607, normalized size = 2.98 \begin {gather*} -\frac {(a+b x) \sqrt {1-\frac {1}{(a+b x)^2}} \left (1-(a+b x)^2\right ) \left (\frac {4 \coth ^{-1}(a+b x)}{(a+b x) \sqrt {1-\frac {1}{(a+b x)^2}}}+\frac {3 \coth ^{-1}(a+b x)^2}{(a+b x) \sqrt {1-\frac {1}{(a+b x)^2}}}-\frac {12 a \coth ^{-1}(a+b x)^2}{(a+b x) \sqrt {1-\frac {1}{(a+b x)^2}}}+\frac {9 a^2 \coth ^{-1}(a+b x)^2}{(a+b x) \sqrt {1-\frac {1}{(a+b x)^2}}}+\frac {-1+6 a \coth ^{-1}(a+b x)-3 \left (-1+a^2\right ) \coth ^{-1}(a+b x)^2}{\sqrt {1-\frac {1}{(a+b x)^2}}}+\cosh \left (3 \coth ^{-1}(a+b x)\right )-6 a \coth ^{-1}(a+b x) \cosh \left (3 \coth ^{-1}(a+b x)\right )+\coth ^{-1}(a+b x)^2 \cosh \left (3 \coth ^{-1}(a+b x)\right )+3 a^2 \coth ^{-1}(a+b x)^2 \cosh \left (3 \coth ^{-1}(a+b x)\right )+\frac {6 \coth ^{-1}(a+b x) \log \left (1-e^{-2 \coth ^{-1}(a+b x)}\right )}{(a+b x) \sqrt {1-\frac {1}{(a+b x)^2}}}+\frac {18 a^2 \coth ^{-1}(a+b x) \log \left (1-e^{-2 \coth ^{-1}(a+b x)}\right )}{(a+b x) \sqrt {1-\frac {1}{(a+b x)^2}}}-\frac {18 a \log \left (\frac {1}{(a+b x) \sqrt {1-\frac {1}{(a+b x)^2}}}\right )}{(a+b x) \sqrt {1-\frac {1}{(a+b x)^2}}}+\frac {4 \left (1+3 a^2\right ) \text {PolyLog}\left (2,e^{-2 \coth ^{-1}(a+b x)}\right )}{(a+b x)^3 \left (1-\frac {1}{(a+b x)^2}\right )^{3/2}}-\coth ^{-1}(a+b x)^2 \sinh \left (3 \coth ^{-1}(a+b x)\right )-3 a^2 \coth ^{-1}(a+b x)^2 \sinh \left (3 \coth ^{-1}(a+b x)\right )-2 \coth ^{-1}(a+b x) \log \left (1-e^{-2 \coth ^{-1}(a+b x)}\right ) \sinh \left (3 \coth ^{-1}(a+b x)\right )-6 a^2 \coth ^{-1}(a+b x) \log \left (1-e^{-2 \coth ^{-1}(a+b x)}\right ) \sinh \left (3 \coth ^{-1}(a+b x)\right )+6 a \log \left (\frac {1}{(a+b x) \sqrt {1-\frac {1}{(a+b x)^2}}}\right ) \sinh \left (3 \coth ^{-1}(a+b x)\right )\right )}{12 b^3} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(665\) vs.
\(2(190)=380\).
time = 0.24, size = 666, normalized size = 3.26 Too large to display
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.27, size = 259, normalized size = 1.27 \begin {gather*} \frac {1}{3} \, x^{3} \operatorname {arcoth}\left (b x + a\right )^{2} - \frac {1}{12} \, b^{2} {\left (\frac {4 \, {\left (3 \, a^{2} + 1\right )} {\left (\log \left (b x + a - 1\right ) \log \left (\frac {1}{2} \, b x + \frac {1}{2} \, a + \frac {1}{2}\right ) + {\rm Li}_2\left (-\frac {1}{2} \, b x - \frac {1}{2} \, a + \frac {1}{2}\right )\right )}}{b^{5}} + \frac {2 \, {\left (5 \, a^{2} + 6 \, a + 1\right )} \log \left (b x + a + 1\right )}{b^{5}} + \frac {{\left (a^{3} + 3 \, a^{2} + 3 \, a + 1\right )} \log \left (b x + a + 1\right )^{2} - 2 \, {\left (a^{3} + 3 \, a^{2} + 3 \, a + 1\right )} \log \left (b x + a + 1\right ) \log \left (b x + a - 1\right ) + {\left (a^{3} - 3 \, a^{2} + 3 \, a - 1\right )} \log \left (b x + a - 1\right )^{2} - 4 \, b x - 2 \, {\left (5 \, a^{2} - 6 \, a + 1\right )} \log \left (b x + a - 1\right )}{b^{5}}\right )} + \frac {1}{3} \, b {\left (\frac {b x^{2} - 4 \, a x}{b^{3}} + \frac {{\left (a^{3} + 3 \, a^{2} + 3 \, a + 1\right )} \log \left (b x + a + 1\right )}{b^{4}} - \frac {{\left (a^{3} - 3 \, a^{2} + 3 \, a - 1\right )} \log \left (b x + a - 1\right )}{b^{4}}\right )} \operatorname {arcoth}\left (b x + a\right ) \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^{2} \operatorname {acoth}^{2}{\left (a + b 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^2\,{\mathrm {acoth}\left (a+b\,x\right )}^2 \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________