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 $\displaystyle \Re$ and let $\displaystyle f : K \rightarrow \Re$ be a continuous function. Prove that for every $\displaystyle \epsilon > 0$ there exists $\displaystyle L_{\epsilon}$ such that

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

I don't really see the "point" of the question - can't we just take $\displaystyle 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 $\displaystyle \Re$ and let $\displaystyle f : K \rightarrow \Re$ be a continuous function. Prove that for every $\displaystyle \epsilon > 0$ there exists $\displaystyle L_{\epsilon}$ such that

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

I don't really see the "point" of the question - can't we just take $\displaystyle L_{\epsilon} = |f(x) - f(y)| / |x-y|$? What are we "supposed" to do?
You can't just take $\displaystyle L_{\epsilon} = |f(x) - f(y)| / |x-y|$, because $\displaystyle L_{\epsilon}$ has to be a constant. Suppose for example that f is the function $\displaystyle f(x) = \sqrt x$ defined on the interval K=[0,1]. Then $\displaystyle |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 $\displaystyle \epsilon>0$, the uniform continuity of f tells you that there exists a $\displaystyle \delta>0$ such that $\displaystyle |f(x) - f(y)| < \epsilon$ whenever $\displaystyle |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 $\displaystyle |f(x) - f(y)| / |x-y|$ is bounded when $\displaystyle |x-y|\geqslant\delta$. (I'll leave that part to you.)