Does there exist an upper bound for $\|\tanh{(x)}-\tanh{(y)}\|$ smaller than $2\sqrt{n}$, where $x,y\in \mathbb{R}^n$

639 Views Asked by At

I wish to find a bound over the expression $\|\tanh{(x)}-\tanh{(y)}\|$, where $x,y \in \mathbb{R}^n$. This is more like proof verification. I have already found a bound, but I am interested to know if my reasoning is correct or if one can find an even tighter bound over this quantity? \begin{equation} \begin{split} \|\tanh{(x)}-\tanh{(y)}\| &\leq \|\tanh{(x)}\|\\ &+\|\tanh{(y)}\| \end{split} \end{equation} Now, \begin{equation} \begin{split} \|\tanh{(x)}\| &\leq \sqrt{1^2+1^2+...+1^2(n~ times)} \\ \|\tanh{(x)}\|&\leq \sqrt{n} \end{split} \end{equation} Similarly, $\|\tanh{(y)}\| \leq \sqrt{n}$, therefore, \begin{equation} \begin{split} \|\tanh{(x)}-\tanh{(y)}\| &\leq \sqrt{n}+\sqrt{n} \\ &\leq 2\sqrt{n} \end{split} \end{equation} Is my reasoning correct? Is it possible to find an even tighter bound over $\|\tanh{(x)}-\tanh{(y)}\|$?

1

There are 1 best solutions below

2
On BEST ANSWER

It's not hard to see that $\tanh$ is $1$-Lipschitz, so you have \begin{align*} \|\tanh(x)-\tanh(y)\|^2&=\sum_{i=1}^n \vert \tanh(x_i)-\tanh(y_i)\vert^2\\ &\leq \sum_{i=1}^n \min(\vert x_i-y_i\vert,2)^2\\ &=\sum_{i=1}^n \min(\vert x_i-y_i\vert^2,4). \end{align*} Taking squareroots gives you a tighter bound than what you have.