Rational approximation of tanh(x) function.

At https://youtu.be/i9GMuk0gffM?t=22m31s the author needed to approximate $tanh(x)$ using rational functions and absolute values. He constructed $\frac{x+2x^3}{1+|x+2x^3|}$ which was better than Padé (2,2)-approximation. The Padé approximation doesn't have the correct asymptote.

I felt amused by the approximation and thought about how to generalize this kind of approximation. I found no generalization so far. What would be the generalization of this kind of approximation?

• I saw $\dfrac {x+2x^3}{1+|x+2x^3|}$ instead. – DHMO Apr 13 '17 at 10:26
• You can just use the taylor series of $x\mapsto\sinh(x)$ and $x\mapsto\cosh(x)$. – DHMO Apr 13 '17 at 10:28
• cant you use the continued fraction $\frac{z}{1 + \frac{z^2}{3 + \cdots}}?$ – abel Apr 13 '17 at 15:45