If $f(x)$ is continuous at $x = a$ and $f(a) > 0$, show that the domain $f$ contains an open interval about $a$ where $f(x) > 0$. 
If $f(x)$ is continuous at $x = a$ and $f(a) > 0$, show that the domain $f$ contains an open interval about $a$ where $f(x) > 0$.

This seems very obvious (a simple diagram will show), but how can I rigorously prove this statement?

Update:
I think I came up with a proof, but I need it verified.
$|f(a)-f(a+\delta)| < f(a)$
$-f(a) < f(a)-f(a+\delta) < f(a)$
$-2f(a) < -f(a+\delta) < 0$
$2f(a) > f(a+\delta) > 0$
$0 < f(a+\delta)$
$\square$
 A: Use the definition of continuous with $\epsilon = f(a)/2$, and you will get a $\delta>0$ such that $(a-\delta, a+\delta)$ works.

Your attempt illustrates the same idea, but this time using $f(a)$ as $\epsilon$, instead of $f(a)/2$. That works just as well, but I personally prefer to leave a little margin.
However, while the idea was good, the execution was less so. First off, you need to have more than just a few lines of inequalities. You need some text. You have to say explicitly which $\epsilon$ you choose, and after that you have to say "By continuity of $f$, we then have a  $\delta>0$ such that", and only then do you get to write the first line in the sequence of inequalities.
Second, it's not "$|f(a) - f(a + \delta)|< f(a)$", it's "$|f(a) - f(a + d)|<f(a)$ for every $d$ with $|d| < \delta$". (This may be rephrased to "$|f(a) - f(x)|<f(a)$ for all $x \in (a-\delta, a+\delta)$", which makes it a bit easier to see the open interval that the problem wants you to find.) Actually, with the $\epsilon$ you chose (i.e. equal to $f(a)$, without margins), depending on $f$, it could be that $f(a + \delta) = 0$. And we do not want that.
A: Using the definition of continuous as "the preimage of an open set is always open": consider the interval $I = (\frac{1}{2} f(a), \frac{3}{2} f(a))$. Every point in this interval is positive, since $f(a)$ is.
Take the preimage of $I$, which must be open, so there is an open interval entirely within $I$ around every point in $I$. The point $a$ is in that preimage since $f(a) \in I$, so there is an open interval $X$ around $a$ in the preimage. We have $\{f(x) : x \in X\} \subseteq I$ and in particular is entirely positive. So $X$ is an example of the required interval.
A: Suppose no such interval exists.  This implies that for all $n \in \mathbb{N}$ there exists some element $x_n \in \left ( a - \frac{1}{n}, a + \frac{1}{n} \right )$ such that $f(x_n) \leq 0$.  Clearly we have that $x_n \to a$ as $n \to \infty$ but by continuity we must have that $\{f(x_n)\}$ converges in $(-\infty, 0]$, which contradicts the fact that it must converge to $f(a) >0$.
A: This is a good question but unfortunately it is proven mostly using lot of symbolism. This property of continuous functions is also stated as the sign preserving property of continuous functions. 
Here is the simplest and rigorous answer which avoids all symbolism. Since $f$ is continuous at $a$, the values of $f$ at all points sufficiently near $a$ are close to $f(a)$. Since $f(a) $ is positive if we get too close to $f(a) $ the values of $f$ will be positive and thus by definition of continuity values of $f$ are positive in some interval containing $a$.
Thus you can see the proof above uses two trivial facts:


*

*if $b=f(a) >0$ then there is an open interval containing $b$ all of whose members are positive. 

*definition of continuity. 

