Pre-Image of a continuous function 
Suppose that $f:\Bbb R^n\to \Bbb R$ is continuous. If there exist $x$ in $\mathbb R^n$ and C in $\mathbb R$ such that $f(x)<C$, then prove there is an $r>0$ such that $$\forall y\in B_r(x),~~ f(y)<C$$

My attempt: Consider $x$ in $\mathbb R^n$ such that $f(x)<C$, since $f$ is continuous, the pre-image of $f(x)$ is an open set, therefor $f^{-1}(x)$ = $B_r(x)$ for $r>0$, therefore for all $y$ in  $B_r(x)$, $f(y)<C$.
 A: Your attempt is close, but not entirely correct: you only know that the pre-image of an open set is open (the first "open" is vital here). Here's a proof:


*

*Since $f(x)<C$, there is an $\epsilon>0$ such that $f(x)+\epsilon<C$ as well.

*Since the interval $(f(x)-\epsilon, f(x)+\epsilon)$ is open, its pre-image $A$ is open.

*By construction, $A$ must contain $x$.

*By definition of open in $R^n$, there must be a radius $r>0$ such that $B_r(x)$ is contained in $A$.

A: No, the pre-image of $f(x)$ is not open. What you know is that since $f$ is continuous, the pre-image of an open set is open; but $\{f(x)\}$ is not open.
Here's a hint: find an $\varepsilon>0$ such that for all $z\in(f(x)-\varepsilon,f(x)+\varepsilon)$ you have $z<C$; in other words, an $\varepsilon$ such that $U=(f(x)-\varepsilon,f(x)+\varepsilon)\subset(-\infty,C)$. Then explain why $f^{-1}(U)$ is an open set that contains $x$, and conclude.
A: Actually, it is quite simple:
$(-\infty,C)$ is open in $\mathbb{R}$.
Then, $f^{-1}((-\infty,C))$ is open in $\mathbb{R^n}$.
$x\in f^{-1}((-\infty,C))$. Hence the result, by definition of open in $\mathbb{R^n}$.
