Prove $|f(x)-f(y)|<\varepsilon \implies \sup f - \inf f \leq \varepsilon$

406 Views Asked by At

$f$ is continuous on $[a,b]$ and $|f(x)-f(y)|<\varepsilon$. Show that $\sup f - \inf f \leq \varepsilon$

Suppose that $\sup f - \inf f > \varepsilon$.

$|f(x)|-|f(y)| \leq |f(x)-f(y)| < \varepsilon < \sup f - \inf f \Rightarrow |f(x)|-|f(y)| < \sup f - \inf f$

It follows that $\begin{cases}|f(x)|<\sup f\\-|f(y)|<-\inf f \end{cases} \Rightarrow \begin{cases}|f(x)|<\sup f\\|f(y)|>\inf f \end{cases}$

In particular $f(x)<\sup f$ for all $x \in [a,b]$. But $f(x)$ has a maximum on $[a,b]$ since it's continuous and $\max(f)<\sup f$, hence $\sup f$ is not a least upper bound. I've derived a contradiction, so $\sup f - \inf f \leq \varepsilon$.

Not sure if this proof is correct. Is there a better one?

3

There are 3 best solutions below

4
On BEST ANSWER

A bettter proof: $f(x)-\epsilon <f(y)$ . Take sup over $x$ to get $\sup f -\epsilon \leq f(y)$. This is true for all $y$. Take inf over $y$ to get $\sup f \leq \inf f+\epsilon$.

0
On

Just another approach.

Since $f$ is continuous, there are two sequences $(x_n),(y_n)\subset[a,b]$, such that $f(x_n)\to\inf f$ and $f(y_n)\to\sup f$.

But $|f(x_n)-f(y_n)|<\varepsilon$, now letting $n\to\infty$, you get $$\sup f-\inf f=|\inf f-\sup f|\le\varepsilon.$$

4
On

Since you have $|f(x)-f(y)| \geq f(x)-f(y)$ for all $x,y$. Take a supremum over all $x,y$ from both sides, you will get that $\sup(|f(x)-f(y)|)\geq \sup f-\inf f$. Because of $\varepsilon \geq \sup(|f(x)-f(y)|)$ you have the needy inequality. You proof has a small mistake because $\sup f-\inf f>|f(x)|-|f(y)|$ does not imply both strict inequalties you have written, just one strict and one nonstrict. But since $|f| $ is still continuos it is all okey.