# Thread: 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 $\displaystyle \varepsilon>0$ be given. By assumption $\displaystyle f$ is uniformly continuous and so there exists some $\displaystyle \delta>0$ such that $\displaystyle |f(x)-f(y|<\varepsilon\leqslant \varepsilon+M|x-y|$ for $\displaystyle |x-y|<\delta$ and $\displaystyle M\geqslant 0$.

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

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

Thus, if $\displaystyle |x-y|\geqslant \delta$ we have that $\displaystyle |f(x)-f(y)\leqslant M|x-y|+\varepsilon$, but this also works for $\displaystyle |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!