I'm having some trouble proving the following:
Let $I=[a,b]$ and let $\,f:I\to\mathbb{R}$ be a continuous function on $I$ such that for each $x\in I$ there exists $y$ such that $|f(y)|\leq\frac{1}{2}|f(x)|$. Prove there exists a point $c\in I$ such that $f(c)=0$.
Here is my attempt:
Since $a\in I$, we have that there exists a $y'$ such that $|f(y')|\leq\frac{1}{2}|f(a)|$. Also, since $b\in I$, we have that there exists a $y''$ such that $|f(y'')|\leq\frac{1}{2}|f(b)|$. Rewriting, we have the two inequalities:
$$-\frac{1}{2}f(a)\leq f(y')\leq\frac{1}{2}f(a)\tag{1}$$ $$-\frac{1}{2}f(b)\leq f(y'')\leq\frac{1}{2}f(b)\tag{2}$$
Without loss of generality, suppose that $f(y'')\leq f(y')$. Putting (1), (2) together gives $$-\frac{1}{2}f(b)\leq f(y'')\leq\frac{1}{2}f(a).$$ Letting $g(x)=\frac{1}{2}f(x)$, we have $$-g(a)\leq f(y'')\leq g(b).$$ My thought process here is to somehow apply the Bolzano Intermediate Value Theorem which states that if $f(a)<k<f(b)$ then there exists a $c$ between $a$ and $b$ such that $f(c)=k$. Here $k=f(y'')$. So evidently, there exists some $c$ such that $g(c)=\frac{1}{2}f(c)=f(y'')$, but around here is where I get confused. I'm not sure how to get the result $f(c)=0$ for some $c\in(a,b)$ from this. Any help would be appreciated.
Let $J$ be the image of $I$ under $f$. Since $I$ is a closed interval, and $f$ is continuous, $J$ must also be a closed interval. If $0$ is not in $J$, then either $J$ is entirely positive or entirely negative. If $J=[c,d]$ with $c>0$, then we get a contradiction by choosing $x\in I$ with $f(x)=c$ and applying the hypothesis to get $y\in I$ with $|f(y)|<|f(x)|=c$. The case of $J$ entirely negative is similar.