Formalization of a Continuity Argument I am trying to show that if a continuous function $f$ is defined on an open interval $J$ and $f$ is nonzero for some $p \in J$ that there exists a closed interval about $p$ on which f is nonzero. For definiteness, assume $f(p) > 0$.  I want to argue the following: simply choose a sufficiently small $\epsilon$ such that $V := (f(p) - \varepsilon , f(p) + \varepsilon)$ doesn't contain $0$. Then continuity guarantees that one can find an open interval $U := (p - \delta, p + \delta)$ such that $f(U) \subset V$. Now, $f$ is nonzero on on $U$, and I believe it is a true statement that $f$ is also nonzero on  $[p - \delta, p + \delta]$ but I am unsure of how to formally justify this last part.
So, my question is, Is the basic thrust of my argument correct and how can one formally justify that if $f$ is nonzero on $U$ then $f$ is also nonzero on what is effectively the closure of $U$?
 A: If $f$ is continuous, $f(\overline A)\subseteq \overline{f(A)}$ for any set $A$.  So, if ${\overline V}=[f(p)-\epsilon,f(p)+\epsilon]$ does not contain $0$ and $f(U)\subseteq V$, $f$ cannot vanish at any point in $\overline U$.  (If $f(p)=\epsilon$ or $f(p)=-\epsilon$, it is possible for $f$ to vanish at a point in $\overline U$.  For example, you could take $f$ to be the identity function and $p$, $\epsilon$ and $\delta$ to be $1$.  Then $V=(0,2)$ does not contain $0$ and, since $U=(0,2)$, $f(U)\subseteq V$, but since the closure of $U$ is $[0,2]$, $f$ vanishes at the point $0$, and $0$ is in $\overline U$.)
Another way to prove the result is to find a closed interval $C\subseteq U$ which contains $p$; for example, you could take $C:=[p-\delta/2,p+\delta/2]$.  Then $f(C)$ is contained in $f(U)$, so $f$ cannot vanish at any point in $C$.
A: Well, you have a open interval on which $f$ is non-zero. From here, to show the existence of a closed interval such that $f$ does not vanish, just shorten the interval to get a closed interval.
I mean you can say, $\left[p-\dfrac{3\delta}{4},p+\dfrac{3\delta} {4}\right]$ is one such closed interval. 
And, the first part where you say, "choose $\varepsilon$ small enough so that $(f(p)-\varepsilon,f(p)+\varepsilon)$ so that it does not contain $0$"-- Why do you think you can choose such a $\varepsilon$? 
I mean, you can make that a bit more rigorous by employing, the Archimedean property.
