Approximating $\tanh(B\sqrt{A} )$ for small $A$ and arbitrary $B$ by correcting for asymptotic behaviour of $\tanh$ I would like to approximate a function containing terms of the form $\tanh( B\sqrt{A})$ for small $A$. I have tried doing a Taylor series, but I consistently find that it is not only $A$ that has to be small, but rather $B$ should as well in order to have an accurate approximation.
I can see that this is related to the fact that $\tanh(x)$ asymptotes to 1 for large $x$, so I understand where the issue originates, but I was wondering whether there is any way of getting around this? For example by determining a correction factor that takes the asymptote into account? Can this be done?
 A: By definition
$$
\tanh x = \frac{1 - e^{-2x}}{1 + e^{-2x}},
$$
so for $x \gg 1$ (something like $x > 4$) we have
$$
\tanh x \approx 1 - e^{-2x}.
$$
Since you're interested in an approximation over a large interval we'll need $\tanh x \approx 1$ for most of it.  Additionally, we at least want the approximation to be $0$ at $x = 0$.  This suggests we shouldn't modify any of the factors of the terms of $1 - e^{-2x}$, so we'll consider an approximation like
$$
\tanh x \approx 1 - e^{-ax}.
$$
Since $\tanh'(0) = 1$ and
$$
\left.\frac{d}{dx}\right|_{x=0} (1-e^{-ax}) = a
$$
we'll want $1 < a < 2$.  A first guess of $a = 3/2$ is pretty decent in the "eyeball norm" (looking at the plot of the approximation against $\tanh x$), but it looks like a smaller $a$ might be an improvement.
To get an idea of the error for all $x$ we could look at the $L_1$ and $L_2$ error of the approximation over some large interval, say
$$
\int_0^{20} \left|\tanh x - 1 + e^{-ax}\right|\,dx \quad \text{and} \quad \sqrt{\int_0^{20} \left(\tanh x - 1 + e^{-ax}\right)^2\,dx}.
$$
Below is a plot of the $L_1$ error in blue and the $L_2$ error in red for $1.35 < a < 1.5$.

The $L_1$ error has a minimum at $a \approx 1.48$ and the $L_2$ error has one at $a \approx 1.4$, so any $a$ between these two values could be a pretty decent choice.
Splitting the difference, here's a plot of $\tanh x$ in blue and $1 - e^{-1.44 x}$ in red.

