\[ \int \frac {\coth ^{-1}(\tanh (a+b x))^3}{x^4} \, dx \]
Optimal antiderivative \[ -\frac {b^{2} \mathrm {arccoth}\left (\tanh \left (b x +a \right )\right )}{x}-\frac {b \mathrm {arccoth}\left (\tanh \left (b x +a \right )\right )^{2}}{2 x^{2}}-\frac {\mathrm {arccoth}\left (\tanh \left (b x +a \right )\right )^{3}}{3 x^{3}}+b^{3} \ln \left (x \right ) \]
command
integrate(arccoth(tanh(b*x+a))^3/x^4,x, algorithm="giac")
Giac 1.9.0-11 via sagemath 9.6 output
\[ b^{3} \log \left (x\right ) - \frac {36 i \, \pi b^{2} x^{2} + 72 \, a b^{2} x^{2} - 9 \, \pi ^{2} b x + 36 i \, \pi a b x + 36 \, a^{2} b x - i \, \pi ^{3} - 6 \, \pi ^{2} a + 12 i \, \pi a^{2} + 8 \, a^{3}}{24 \, x^{3}} \]
Giac 1.7.0 via sagemath 9.3 output
\[ \int \frac {\operatorname {arcoth}\left (\tanh \left (b x + a\right )\right )^{3}}{x^{4}}\,{d x} \]________________________________________________________________________________________