True of false: $|f(x)-g(x)|<\epsilon$ $\forall x\in I$ $\Rightarrow$ $|\sup(f(x))-\sup(g(x))|\leq \epsilon$
I actually have an idea for a proof in case it is correct, but just to make sure what I'll write isn't rubbish I would like to get a confirmation from you all.
Intuitively, it seems logical to me.
If anyone has a counter example I would love to see it.
Thanks a lot.
Let $a=\sup (f(x))$ and $b=\sup(g(x))$. Then, for all $\delta>0$, we have that there is some $x_0\in I$ such that $ f(x_0)\geq a-\delta$. Since $|f(x_0)-g(x_0)|<\epsilon$. Then, $$a-\delta-\epsilon\leq f(x_0)-\epsilon< g(x_0)\leq b$$ So, $a-\delta-\epsilon< b$. Since this inequality works for any $\delta>0$, by taking $\delta\to 0^+$ we conclude $a-\epsilon\leq b$.
Similarly, $b-\epsilon\leq a$. So, we conclude $|b-a|\leq \epsilon$.