Q:

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.

