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$.
