# Suppose $f: X\rightarrow\mathbb{R}$ is continuous at $c$ and $f(c)>0$. Prove that there exists $\delta>0$ such that $f(x)>0$

I'm stuck on this question, not really sure how to go about it, so it'd be good if you could do it but explain what you're doing, etc. Thanks. Any help would greatly be appreciated! :)

Question

Suppose $f:X\rightarrow\mathbb{R}$ is continuous at some $c\in X$. Suppose also that $f(c)>0$. Prove that there exists $\delta>0$ such that $f(x)>0$ for all $x\in(c-\delta, c+\delta)$.

Working

I haven't done much, as I said I'm not really 100% how to do it, but here is my current working (sorry it isn't a lot) :)

Fix $\epsilon>0$ then $\exists\delta>0 : |x-c|<\delta \implies |f(x)-f(c)|<\epsilon$

Thanks again!

• An appropriate choice of $\epsilon$, and triangle inequality : that's all you need. – астон вілла олоф мэллбэрг Apr 30 '17 at 4:31
• @астонвіллаолофмэллбэрг thanks, but what would the inequality be? – James Blair Apr 30 '17 at 4:53
• Ok, so if $|f(x)-f(c)| < \epsilon$, then $|f(x)| > |f(c)| - \epsilon$ by triangle inequality. Now, we can choose any $\epsilon$ we like and get a small non-zero $\delta$, so the question is what $\epsilon$ would you choose so that $|f(x)| > 0$ is always true if $x$ is close enough to $c$? – астон вілла олоф мэллбэрг Apr 30 '17 at 4:58

With $\epsilon=\frac{f(c)}{2}$ in the $\epsilon$-$\delta$ definition of continuity, we get the following.
We can find a $\delta>0$ such that if $x\in X$ and $|x-c|<\delta$ then $$|f(x)-f(c)|<\frac{f(c)}{2}.$$ We have $$|x-c|<\delta\iff x\in(c-\delta,c+\delta)$$ and $$|f(x)-f(c)|<\frac{f(c)}{2}\iff \overbrace{-\frac{f(c)}{2}<f(x)-f(c)}^{*}<\frac{f(c)}{2}.$$ Thus, for all $x\in X$ such that $x\in(c-\delta,c+\delta)$, we get (by using $*$) $$f(x)>f(c)-\frac{f(c)}{2}=\frac{f(c)}{2}>0.$$
hint: choose $\epsilon = \dfrac{f(c)}{2}$