# Lipschitz-continuous $f(x)=x^2\cdot \sin\left(\frac{1}{x}\right)$

How to prove that $f$ is globally Lipschitz-continuous $$f:\mathbb{R}\longrightarrow \mathbb{R}$$

$$f(x) = \left\{ \begin{array}{c l} x^2\cdot \sin\left(\frac{1}{x}\right) & ,\quad x\neq0\\ 0 & ,\quad x=0 \end{array} \right.$$

Any hints would be appreciated.

Notice that $$f'(x)=\begin{cases} 2x\sin\frac1x-\cos\frac1x &\text{ if } x\ne0\\ 0 &\text{ if } x=0 \end{cases}.$$ Therefore $$|f'(x)|\le 2|x|\cdot\left|\sin\frac1x\right|+\left|\cos\frac1x\right|\le 3 \quad \forall x\ne 0.$$ Hence, $$|f'(x)|\le 3 \quad \forall x \in \mathbb{R}.$$ It follows that $$|f(x)-f(y)|\le \sup_{\min\{x,y\} \le z\le \max\{x,y\}}|f'(z)||x-y|\le 3|x-y| \quad \forall x,y \in \mathbb{R}.$$
• It may cost more paper to estimate $f'(x)$,but I'm sure it's bounded. Commented Dec 26, 2013 at 4:31
• @CWeid Not really. $x\sin x^{-1}$ is bounded above and below by $1$. This is easy to see if you write any nonzero $x\in\Bbb R$ as $1/t$ and observe $t^{-1}\sin t$ is bounded by $1$ in absolute value.
• @mathematics2x2life Not true. The function is uniformly continuous. As I said above $|t^{-1}\sin t|\leqslant 1$. Then write $t=x^{-1}$. It follows that $|f'|\leqslant 3$, as Mercy correctly estimated.