Why is $\sin(\tanh x) + \sinh(\tanh x)$ almost exactly $2\tanh x$

calculushyperbolic-functionslimitstaylor expansiontrigonometry

I was trying to come up with some approximations for the solution to the differential equation $y'' + \operatorname{sgn}(y') + y = 0$ and noticed while I was messing around that $\sin(\tanh x) + \sinh(\tanh x)$ is almost exactly $2\tanh x$. Looking at the series expansions for $\sinh$ and $\sin$ it's not immediately obvious why this would be the case. It makes sense that high-order terms should converge to a constant value for large $x$, and that near $x=0$ they should be approximately zero. This seems to imply that for some intermediate values of $x$ around something like $x=0.5$ there should be disagreement, but this seems like a remarkably good fit for every value of $x$. Why might this be?

Best Answer

We can ignore the $\tanh$ component momentarily and consider instead the function $$f(x) = \frac{\sin x + \sinh x}{x}.$$ This has series expansion $$f(x) \sim 2 + \frac{x^4}{60} + \frac{x^8}{181440} + O(x^{12}).$$ Therefore, on the open interval $x \in (-1,1)$, $f(x)$ has exceptionally small deviation from $2$, thus on the real line, $$g(x) = \frac{\sin \tanh x + \sinh \tanh x}{2 \tanh x}$$ will be very close to $1$.

In other words, it is not simply that $\sin x \approx x$ and $\sinh x \approx x$, but that these approximations are in a sense opposing, thus terms cancel out in the series expansion:

$$\sin x \sim x - \frac{x^3}{3!} + \frac{x^5}{5!} - \frac{x^7}{7!} + O(x^9) \\ \sinh x \sim x + \frac{x^3}{3!} + \frac{x^5}{5!} + \frac{x^7}{7!} + O(x^9) \\ $$ so their sum cancels up to $O(x^4)$, which after dividing by $x$, gives the first nonzero error term being $O(x^4)$.

Related Question