# Thread: Continuous function on a compact subset of R

1. ## Continuous function on a compact subset of R

Here's the question:

"Let K be a compact subset in $\Re$ and let $f : K \rightarrow \Re$ be a continuous function. Prove that for every $\epsilon > 0$ there exists $L_{\epsilon}$ such that

$|f(x) - f(y)| \leq L_{\epsilon} |x-y| + \epsilon$ for every $x,y \in K$."

I don't really see the "point" of the question - can't we just take $L_{\epsilon} = |f(x) - f(y)| / |x-y|$? What are we "supposed" to do?

2. Originally Posted by Amanda1990
Here's the question:

"Let K be a compact subset in $\Re$ and let $f : K \rightarrow \Re$ be a continuous function. Prove that for every $\epsilon > 0$ there exists $L_{\epsilon}$ such that

$|f(x) - f(y)| \leq L_{\epsilon} |x-y| + \epsilon$ for every $x,y \in K$."

I don't really see the "point" of the question - can't we just take $L_{\epsilon} = |f(x) - f(y)| / |x-y|$? What are we "supposed" to do?
You can't just take $L_{\epsilon} = |f(x) - f(y)| / |x-y|$, because $L_{\epsilon}$ has to be a constant. Suppose for example that f is the function $f(x) = \sqrt x$ defined on the interval K=[0,1]. Then $|f(x) - f(y)| / |x-y|$ becomes unbounded when x=0 and y→0.

I think the trick is to consider two separate cases: when x and y are close together, and when they are not.

Given $\epsilon>0$, the uniform continuity of f tells you that there exists a $\delta>0$ such that $|f(x) - f(y)| < \epsilon$ whenever $|x-y|<\delta$. That deals with the case when x and y are close together (in other words, within δ of each other). Now you just have to show that $|f(x) - f(y)| / |x-y|$ is bounded when $|x-y|\geqslant\delta$. (I'll leave that part to you.)