91.2 Problem number 141

\[ \int \frac {\tanh ^2(c+d x)}{a+b \text {sech}^2(c+d x)} \, dx \]

Optimal antiderivative \[ \frac {x}{a}-\frac {\arctanh \left (\frac {\sqrt {b}\, \tanh \left (d x +c \right )}{\sqrt {a +b}}\right ) \sqrt {a +b}}{a d \sqrt {b}} \]

command

integrate(tanh(d*x+c)^2/(a+b*sech(d*x+c)^2),x, algorithm="giac")

Giac 1.9.0-11 via sagemath 9.6 output

\[ -\frac {\frac {{\left (a + b\right )} \arctan \left (\frac {a e^{\left (2 \, d x + 2 \, c\right )} + a + 2 \, b}{2 \, \sqrt {-a b - b^{2}}}\right )}{\sqrt {-a b - b^{2}} a} - \frac {d x + c}{a}}{d} \]

Giac 1.7.0 via sagemath 9.3 output

\[ \text {Exception raised: TypeError} \]________________________________________________________________________________________