# If $f$ is a real function, continuous at $a$ and $f(a) < M$, then there is an open interval $I$ containing a such that $f(x) < M$ for all $x \in I$.

I have problem regarding the If f is a real function, continuous at a and f(a) < M, then there is an open interval I contianing a such that f(x) < M for all x in I. answer. If I used $$\epsilon =M-f(a)$$ which is also $$\epsilon >0$$ and $$\exists$$ $$\delta>0$$ so there is an open interval $$I$$ containing such that $$f(x) for all $$x \in I$$. I think this is also correct but not sure.

$$\underline{Edit}$$

Now let $$\epsilon = {M-f(a)}$$, clearly $$\epsilon >0$$, and hence there exists an open interval $$I=(a-\delta, a+\delta)$$, such that for any $$x\in I$$, $$|f(x)-f(a)|<\epsilon= {M-f(a)}$$ holds.

It follows that $$f(x) for all $$x \in I$$

• Please write out your entire proof. You expect people to switch between two pages, and to guess what exactly your proof is supposed to be. Simply spell out your own proof and leave out the reference to the other page. Commented Dec 30, 2020 at 13:36
• $\epsilon$ is arbitrary. Commented Dec 30, 2020 at 13:36
• Yes, it is correct, $f(x)<f(a)+\epsilon=M$ for all $x\in I$. Commented Dec 30, 2020 at 13:37
• It's fine, you are correct. Commented Dec 30, 2020 at 13:40
• This is actually a good question. It reflects the type of math thinking from intuition to proof. Commented Dec 30, 2020 at 13:53

The condition that $$f$$ is continuous at $$a$$ indicates that $$$$\lim_{x \to a} f\left(x\right) = f\left(a\right).$$$$ In other words, we have the following proposition: $$$$\forall \epsilon > 0, \exists \delta > 0, \forall x, 0 < \lvert x-a\rvert < \delta \longrightarrow \lvert f\left(x\right)-f\left(a\right)\rvert < \epsilon.$$$$ And we have the proposition that $$$$f\left(a\right) < M.$$$$ Using the fact that $$M - f\left(a\right) > 0$$, we have $$$$\exists \delta > 0, \forall x, 0 < \lvert x-a\rvert < \delta \longrightarrow \lvert f\left(x\right)-f\left(a\right)\rvert < M - f\left(a\right),$$$$ which further indicates that $$$$\exists \delta > 0, \forall x, 0 < \lvert x-a\rvert < \delta \longrightarrow f\left(x\right) < M. \label{main}$$$$ If there is no such open interval $$I$$ that $$f\left(x\right) < M$$ for all $$x \in I$$, then we have the following proposition: $$$$\forall \delta > 0, \exists x, 0 < \lvert x-a \rvert < \delta \wedge f\left(x\right) \geq M, \label{sub}$$$$ which obviously contradicts our conclusion.