Let $f$ be a scalar field continuous at an interior point a of a set $S\in \mathbb{R}$. If $f(a)\ne 0$, prove that there is an $n$-ball $B(a)$ in which $f$ has the same sign as $f(a)$.
The above statement is what I want to prove. I am not sure whether I have to use epsilon/delta to prove it. Please help me.
If $f(a) \neq 0$, set $\varepsilon = \frac{|f(a)|}{2}$. Since $\varepsilon > 0$, by continuity of $f$ at $a$, there exists a $\delta > 0$ such that if $x \in B(a; \delta)$, then $|f(x) - f(a)| < \varepsilon$. Hence, for all $x\in B(a; \delta)$, $|f(a)| - \varepsilon < f(x) < |f(a)| + \varepsilon$, i.e., $f(a) - \frac{|f(a)|}{2} < |f(x)| < f(a) + \frac{|f(a)|}{2}$. If $f(a) > 0$, then
$$f(x) > f(a) - \frac{|f(a)|}{2} = f(a) - \frac{f(a)}{2} = \frac{f(a)}{2} > 0\quad \text{for all $x\in B(a;\delta)$}.$$
If $f(a) < 0$, then $$f(x) < f(a) + \frac{|f(a)|}{2} = f(a) - \frac{f(a)}{2} = \frac{f(a)}{2} < 0 \quad \text{for all $x\in B(a;\delta)$}.$$
In either case, the sign of $f$ equals the sign of $f(a)$ in the $n$-ball $B(a;\delta)$.