# Math Help - compact space and continuous function

1. ## compact space and continuous function

Hey, I have a topology problem here:
Let K be a compact subset in R and let f : K → R be a continuous function. Prove
that for every ε > 0 there exists Lε > 0 such that
|f (x) − f (y)| ≤ Lε |x − y| + ε , for every x, y ∈ K.
I'm thinking of using the Lipschitz condition, but not quite sure how to handle it. Could you anyone please give me a hint? Any input is appreciated!

2. Originally Posted by rain07
Hey, I have a topology problem here:
Let K be a compact subset in R and let f : K → R be a continuous function. Prove
that for every ε > 0 there exists Lε > 0 such that
|f (x) − f (y)| ≤ Lε |x − y| + ε , for every x, y ∈ K.
I'm thinking of using the Lipschitz condition, but not quite sure how to handle it. Could you anyone please give me a hint? Any input is appreciated!
You can't use the Lipschitz condition because every continuous function on a compact space isn't Lipschitz!

So, let $\varepsilon>0$ be given. By assumption $f$ is uniformly continuous and so there exists some $\delta>0$ such that $|f(x)-f(y|<\varepsilon\leqslant \varepsilon+M|x-y|$ for $|x-y|<\delta$ and $M\geqslant 0$.

Now, assume that $\delta\leqslant |x-y|$ by the boundedness of $f$ there exists some $M'$ such that $\text{diam }f(K)\leqslant M'$. So, let $M=\frac{M'}{\delta}$. Then,

$|f(x)-f(y)|\leqslant M'=\delta M\leqslant |x-y|M\leqslant M|x-y|+\varepsilon$.

Thus, if $|x-y|\geqslant \delta$ we have that $|f(x)-f(y)\leqslant M|x-y|+\varepsilon$, but this also works for $|x-y|<\delta$ since the extra non-epsilon term is superfluous.

3. I got it. I didn't think much about the properties of continuous function in the first place. Thanks a lot for your help!