$f:S\subset\Bbb{R}^n\to\Bbb{R}$. Prove $\sup_{x,y\in S}|f(x)-f(y)|=\sup_{S}f-\inf_Sf$

61 Views Asked by At

Suppose $f:S\subset\Bbb{R}^n\to\Bbb{R}. f$ is bounded on $S$. Show $\sup_{x,y\in S}|f(x)-f(y)|=\sup_{S}f-\inf_Sf.$

Intuitively it makes sense to me that the largest difference of f would be equal to the difference between its $\sup$ and its $\inf$. I'm just not sure how to go about it. Is it a simple triangle inequality type argument or some more involved?

1

There are 1 best solutions below

0
On

Note that for all $x,y$, $$f(x)-f(y)\leq \sup f-\inf f.$$ By taking sequences $x_n$ and $y_n$ such that $f(x_n)\rightarrow\sup f$ and $f(y_n)\rightarrow\inf f$, $$\lim_{n\rightarrow\infty}(f(x_n)-f(y_n))=\sup f-\inf f,$$ so that when taking the supremum on the LHS of above, we get equality.