Problem
Let $f:\mathbb{R}\to \mathbb{R}$ and $c\in\mathbb{R}$. Prove that $$(f \text{ continuous on } \mathbb{R}) \land (\forall x<c,\; f(x)<0) \land (\forall x>c,\; f(x)>0) \implies f(c)=0$$
My proof
Since $f$ is continuous, we have that, for all $\varepsilon$, there is a $\delta$ such that for all $x\in [c-\delta,c+\delta]$ $$-\varepsilon \leq f(c)-f(x)\leq \varepsilon$$ This implies that $f(c)-\varepsilon\leq f(x)$
By contradiction, assume $f(c)>0$ (the case $f(c)<0$ is similar) and lets use $f(c)$ as our $\varepsilon$, then we have a $\delta$ such that $\forall x\in [c-\delta,c+\delta]$ $$0=f(c)-f(c)\leq f(x)$$ This says that $\forall x\in [c-\delta,c+\delta],\; f(x)\geq0$ but there are values on $[c-\delta,c+\delta]$ that are $>c$ and some that are $<c$ thus $f(x)$ cannot have the same sign for all of them. Contradicting $\forall x\in [c-\delta,c+\delta],\; f(x)\geq 0\;\square$.
Is this a valid proof? I find it particularly simple given that I didn´t use the intermediate value theorem. (I'm not supposed to know it for this problem)
The proof is correct. It could also be proven by the use of the IVT.