Proving there is an interval where $f(x)$ is positive Let $f(x)$ be a continuous real function s.t $f(x_0) > 0$
Prove: There is some interval of the form $(x_0 -\delta, x_0 + \delta)$ where $f$ is positive.
Proof:
Since $f$ is continuous: $\forall \,{\epsilon > 0}\,\, \exists \,{\delta>0}$ s.t. $|x- x_0|<\delta \implies |f(x) - f(x_0)| < \epsilon$
By contradiction suppose there is no interval $(x_0 - \delta, x_0 + \delta)$ where $f(x)$ is positive. This means that $f(x_0) - \epsilon < f(x) < f(x_0) + \epsilon < 0$. Hence we have a contradiction since $\epsilon$ and $f(x_0)$ are both greater than zero.


*

*Is this correct?

*Could someone provide a non-contradiction proof?

 A: Your proof by contradiction is incorrect. Specifically, the following statements are incorrect.

This means that $f(x_0) - \epsilon < f(x) < f(x_0) + \epsilon < 0$. Hence we have a contradiction since $\epsilon$ and $f(x_0)$ are both greater than zero.

You can argue by contradiction but what you have is not the right proof.
A direct proof is simple for this case.
Choose $\epsilon = f(x_0)$ in your continuity criterion to get your $\delta$.
Now $f(x) > 0$ for $x \in (x_0 - \delta, x_0 + \delta)$
A: Choose $\epsilon = \frac{f(x_0)}{2}> 0$. Then there exists a $\delta>0$ such that for $|x-x_0| < \delta$, $|f(x)-f(x_0)| < \epsilon = \frac{f(x_0)}{2}$. Then $-\frac{f(x_0}{2} < f(x)-f(x_0)$ from which we get $0 < \frac{f(x_0)}{2} < f(x)$ for all $x$ such that $|x-x_0| < \delta$.
Alternatively, a proof by contradiction is straightforward as well:
Suppose on every interval of the form $I_\delta = (x_0-\delta, x_0+\delta)$, there is some $x \in I_\delta$ such that $f(x) \leq 0$. Then choose $\delta = \frac{1}{n}$ and let $x_n $ be the corresponding $x \in I_{\frac{1}{n}}$. Then clearly $x_n \to x_0$, and since $f$ is continuous, $f(x_n) \to f(x_0) >0$ which contradicts $f(x_n) \leq 0$.
