# Showing that $f$ is continuous

$f:X \rightarrow \mathbb{R}$ for which there is $N \ge 0$ such that $f(x)-f(y)\le N|x-y|$

How may I show that f is continuous?

-
What is $X$? Hint: First show that $|f(x)-f(y)|\leq N|x-y|$ for all $x,y$. – Jonas Meyer Feb 1 '12 at 19:37
What is the definition of $f$ being continuous at a point $y$? You'll need to start from there.... – Greg Martin Feb 1 '12 at 20:39
I always think about the fact that $|f(x)-f(y)| \leq N|x-y|$ means that the secant lines slope is bounded and thus by the mean value you conclude that the derivative is bounded at every point, so the function has continuous derivative, thus is continuous. I'd like some feedback on this since it is a rather weak thought. – Pedro Tamaroff Feb 2 '12 at 0:49
@Peter: If there exists $N>0$ such that $|f(x)-f(y)|\leq N|x-y|$, then whenenever $f'(x)$ exists, $|f'(x)|\leq N$. This is not the mean value theorem (which doesn't generally apply in this situation), just the fact that $|f'(x)|=\left|\lim\limits_{y\to x}\frac{f(y)-f(x)}{y-x}\right|$, and $\left|\frac{f(y)-f(x)}{y-x}\right|\leq N$ for all $x$ and $y$ by hypothesis. Such a function is called Lipschitz, and Lipschitz functions are differentiable "most of the time" (in a measure theoretic sense). For example $|x|$ is Lipschitz with $N=1$ and is not differentiable at $0$. Continuity is simpler. – Jonas Meyer Feb 2 '12 at 5:14
That's what I meant. The inequality implies $|f'(x)| < N$. I knew that it wouldn't be true everywhere as you say, but at least "almost everywhere" for a well behaved function. Thanks for the info on Lipschitz, I'll read about this a little further. – Pedro Tamaroff Feb 5 '12 at 4:26

The question in the comment of Jonas Meyer 'What is $X$' is very important. Since you use $|x-y|$ for elements of $X$, it would mean that

• $X$ is a linear space ( you can add, substract, multiply with scalars)

• there is a norm on $X$.

Since you use the same notation as the absolute value, you maybe mean $X=\Bbb{R}$ or $X=\Bbb{R}^p$. Anyway, the proof remains the same for every metric space.

From your condition it follows easily that $|f(x)-f(y)| \leq N|x-y|$. $f$ is continuous at $x_0 \in X$ if for every $\varepsilon >0$ there exists $\delta>0$ such that $|f(x_0)-f(y)| < \varepsilon$ for every $y$ with $|x_0-y|<\delta$.

Pick $x_0 \in X$ and $\varepsilon >0$. Then $|f(x_0)-f(y)|\leq N|x_0-y|$. If you pick $\delta=\displaystyle \frac{\varepsilon}{N}$ then whenever $|x_0-y|<\delta$, you get $|f(x_0)-f(y)| \leq N |x_0-y|<\displaystyle N\frac{\varepsilon}{N}=\varepsilon$. Therefore $f$ is continuous in $x_0$. Since $x_0$ was chosen arbitrarily it follows that $f$ is continuous.

-
$f$ is in fact uniformly continuous with almost identical proof, or even $N$-Lipschitz by the remark that you made in the beginning. – T. Eskin Feb 1 '12 at 21:06
Thank you. I understood the question a while after I had posted. But this is very informative. I shall accept the answer. Thanks! – WhiteBit Feb 2 '12 at 0:57