# Spivak Continuity problem

Suppose that $f$ is continuous from the right at $a$ and there exists $\delta>0$ s.t if $a<x<a+\delta$ then $f(x)>0$. Prove that $f(a)\geqslant0$.

In Spivak he proves this theorem in ch.7 and so I used it in this proof:

If $f$ is continuous on $[a,b]$ and $f(a)<0<f(b)$, then there is some $x$ in $[a,b]$ such that $f(x)=0$.

My attempt at a proof using this theorem and contradiction.

Suppose $f(a)<0$. If f is continuous from the right, it is continuous on the interval $a<x<a+\delta$ and by thrm 1 since $f(a)<0$ there exists some $x$ in $(a,a+\delta)$ s.t $f(x)=0$ which contradicts the hypothesis that if $x$ is in $(a,a+\delta)$ f(x)>0. Thus $f(a)\geqslant0$

My questions are can I extend the theorem spivak gives to open intervals? And since I'm only given that the function $f$ is continuous from the right does my contradiction using $f(a)<0$ work since I don't necessarily know what happens to the function past $a$? Thanks.

Your proof uses the fact that $f$ is continuous in $a<x<a+\delta$ and this is not given. What is given is that $f$ is continuous from right at the point $a$. Further the theorem dealing with $f(a) <0<f(b)$ is famous and deep and goes by the name Intermediate Value Theorem. And the result you wish to prove is almost trivial application of continuity and does not require IVT for its proof.
Do not use non-trivial theorems to prove trivial results. Here is how one can prove the result in question. Let $f(a) <0$. Since $f$ is continuous at at $a$ from right there is a $\delta_{1}>0$ such that $$|f(x) - f(a)|<-\frac{f(a)} {2}$$ whenever $a\leq x<a+\delta_{1}$. Thus $f(x) <f(a) /2<0$ for all $x$ with $a\leq x<a+\delta_{1}$. We have a contradiction for all values of $x$ with $a<x<a+\min(\delta, \delta_{1})$.
I add an easier, informal but rigorous version. Since $f$ is continuous from right at $a$, values of $f$ to the right of and near $a$ are near to $f(a)$ and if $f(a)$ is negative then these values of $f$ are also negative (numbers close to a negative number are negative). This contradicts that values of $f$ to the right of and near $a$ are positive.