# Prove or disprove that there exists $K$ such that $|f(x)-f(y)|\leq K |x-y|,\;\forall\;\;x,y\in[0,1],$ edited version.

Let $$f$$ be a function on $$[0,1]$$ into $$\Bbb{R}$$. Suppose that if $$x\in[0,1],$$ there exists $$K_x$$ such that \begin{align}|f(x)-f(y)|\leq K_x |x-y|,\;\;\forall\;\;y\in[0,1].\end{align} Prove or disprove that there exists $$K$$ such that \begin{align}|f(x)-f(y)|\leq K |x-y|,\;\forall\;\;x,y\in[0,1].\end{align}

DISPROOF

Consider the function \begin{align} f:[0&,1]\to \Bbb{R}, \\&x\mapsto \sqrt{x} \end{align}

Let $$x=0$$ and $$y\in (0,1]$$ be fixed. Then, \begin{align} \left| f(0)-f(y) \right|&=\left|0-\sqrt{y} \right| \end{align} Take $$y=1/(4n^2)$$ for all $$n.$$ Then, \begin{align} \left| f(0)-f\left(\dfrac{1}{4n^2}\right) \right|&=\left|0-\dfrac{1}{\sqrt{4n^2}} \right| \\&=2n^{3/2}\left|\dfrac{1}{4n^2} -0 \right| \end{align} By assumption, there exists $$K_0$$ such that \begin{align} \left| f(0)-f\left(\dfrac{1}{4n^2}\right) \right|&=2n^{3/2}\left|\dfrac{1}{4n^2} -0 \right|\leq K_0\left|\dfrac{1}{4n^2} -0 \right| \end{align} Sending $$n\to\infty,$$ we have \begin{align} \infty \leq K_0<\infty,\;\;\text{contradiction}. \end{align} Hence, the function $$f$$ is not Lipschitz in $$[0,1]$$.

QUESTION: Is my disproof correct?

• I would suggest that before you start the computation you actually write explicitly the claim whose truth you need to decide. Is $f$ supposed to be continuous? Are there any other assumptions? Once that is explicit, say what you are going to do: "We will show that the statement fails in general by providing a counterexample. Note that it is enough to show that there is a differentiable $f$ with unbounded derivative, because ..." Only after you've done that, proceed with your counterexample. People don't want to put up with a wall of symbols if they don't know its purpose. – Andrés E. Caicedo Jan 5 '19 at 15:21
• It would be much simpler to just define $f:[0,1]\to\Bbb R$ by $f(x)=\sqrt{x}.$ There is no need for a piecewise definition. – Cameron Buie Jan 5 '19 at 15:24
• Nice proof, but you forgot to mention the question. I assume the question was: if $f$ is continuous, then prove that there exists $K$ such that $|f(x) - f(y)| \le K |x - y|$ for all $x, y$, or else find a counterexample $f$. – 6005 Jan 5 '19 at 15:26
• Also, $f$ is not differentiable at $0$. So you should say that $f|_{(0,1)}$ is differentiable but the derivative is unbounded, thus a constant $K$ cannot exist for $f|_{(0,1)}$, thus a constant $K$ cannot exist for $f$ either. – 6005 Jan 5 '19 at 15:31
• related – Omnomnomnom Jan 5 '19 at 16:42

You are correct, the function $$f$$ is not Lipschitz in $$[0,1]$$, but your argument should be modified. You may simply say that $$\frac{f(1/n)-f(0)}{\frac{1}{n}-0}=\sqrt{n}\to +\infty$$ which contradicts the fact that $$|f(x)-f(y)|/|x-y|$$ is bounded by a constant $$K$$.

On the other hand this is not a counterexample for your statement. For the same reason as above (Just take $$y=1/n$$), for $$x=0$$ there is no constant $$K_0$$ such that $$|f(0)-f(y)|\leq K_0 |0-y|,\;\;\forall y\in[0,1].$$ Instead consider the function $$f(x)=\cases{x\sin(1/x)& if x\not=0\\0& if x=0,}$$ If $$x_n=1/(2\pi n)$$ and $$y_n=1/(2\pi n+\pi/2)$$. then $$|f(x_n)-f(y_n)|/|x_n-y_n|$$ is unbounded which implies that $$f$$ is not Lipschitz in $$[0,1]$$, but for any $$x\in[0,1],$$ there exists $$K_x$$ such that $$|f(x)-f(y)|\leq K_x |x-y|,\;\;\forall\;\;y\in[0,1].$$ In fact take $$K_0=1$$ and for $$x\in(0,1]$$ the existence of $$K_x$$ follows from $$f'\in C^1((0,1])$$.

• @Mike I added a few lines. Your disproof is incorrect. – Robert Z Jan 5 '19 at 16:48
• You might mention why the correct counterexample does satisfy the hypothesis. (If $f$ is differentiable at  then $K_x$ exists...) – David C. Ullrich Jan 5 '19 at 23:06

This isn't incorrect per se, but its unnecessarily convoluted. To show that $$f'$$ is unbounded, just observe that $$f'(x)=\frac{1}{2\sqrt{x}}$$ so that $$\lim_{x\to 0^+}f'(x)=\infty$$. Hence, $$f$$ is not Lipschitz on $$[0,1]$$, which is precisely what you want to prove. That's all you need to say.

The last part is a little hand-wavy though. Technically, you should say something like this: $$f$$ is Lipschitz on $$[\epsilon,1]$$ with constant $$K_\epsilon:=\sup_{\epsilon\leq x\leq 1}|f'(x)|$$. Since $$K_\epsilon\to\infty$$ as $$\epsilon\to 0^+$$, $$f$$ is not Lipschitz on $$[0,1]$$.

Better still just to do an explicit calculation, as the other fellow did.

• Thanks a lot, Ben W! I really learnt a lot from you! Kindly check my post, I edited it! (+1) – Omojola Micheal Jan 5 '19 at 16:36