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.