\[ \int \frac {x^2}{\coth ^{-1}(\tanh (a+b x))^3} \, dx \]
Optimal antiderivative \[ -\frac {x^{2}}{2 b \mathrm {arccoth}\left (\tanh \left (b x +a \right )\right )^{2}}-\frac {x}{b^{2} \mathrm {arccoth}\left (\tanh \left (b x +a \right )\right )}+\frac {\ln \left (\mathrm {arccoth}\left (\tanh \left (b x +a \right )\right )\right )}{b^{3}} \]
command
integrate(x**2/acoth(tanh(b*x+a))**3,x)
Sympy 1.10.1 under Python 3.10.4 output
\[ \begin {cases} - \frac {x^{2}}{2 b \operatorname {acoth}^{2}{\left (\tanh {\left (a + b x \right )} \right )}} - \frac {x}{b^{2} \operatorname {acoth}{\left (\tanh {\left (a + b x \right )} \right )}} + \frac {\log {\left (\operatorname {acoth}{\left (\tanh {\left (a + b x \right )} \right )} \right )}}{b^{3}} & \text {for}\: b \neq 0 \\\frac {x^{3}}{3 \operatorname {acoth}^{3}{\left (\tanh {\left (a \right )} \right )}} & \text {otherwise} \end {cases} \]
Sympy 1.8 under Python 3.8.8 output
\[ \text {Exception raised: TypeError} \]________________________________________________________________________________________