Counter-example for Lipschitz function

analysislipschitz-functionsreal-analysis

Is the following statement true or false?

Let $f : [0,1] \to \mathbb{R}$ be a continuous function such that

  1. $|f(x)-f(0)|\leq |x|$ for all $x\in[0,1/2]$
  2. For all $\varepsilon >0$ there exists $C_{\varepsilon}>0$ such that $|f(x)-f(y)|\leq C_{\varepsilon}|x-y|$ for all $x, y \in [\varepsilon , 1]$.

Then $f$ is Lipschitz on $[0,1]$.

I think that the statement is false but I'm not able to produce a counter-example.

Here is some intuition: Since $C_{\varepsilon}$ may go to infinity as $\varepsilon \to 0$, then it is not useful when proving that $f$ is Lipschitz in a neighborhood of $0$. And the condition $|f(x)-f(0)|\leq |x|$ alone is not powerful enough: take $x=1/n$ and $y=1/n+1/n^2$, we have $|x-y|=\frac{1}{n^2}$ but $|f(x)-f(y)|\leq |f(x)-f(0)|+|f(y)-f(0)|\lesssim \frac{1}{n}$ which is too big.

Best Answer

The function $f(x) = x \cdot \sin \frac{1}{x} \; (x > 0)$, $f(0) = 0$ is a counterexample.