Let $f:[0,\infty)\rightarrow\mathbb{R}$ be a continuous function which is neither bounded below nor bounded above. Let $f:[0,\infty)\rightarrow\mathbb{R}$ be a continuous function which is neither bounded below nor bounded above. Suppose that $f(0)=0$. Show that there exists a strictly increasing sequence $\{x_k\}$ of zeros of $f$, that is, $f(x_k)=0$ for all $k=1,2,3,4,5,6,\ldots,n,n+1,\ldots$
I know that $f$ must be of the type $x\sin x$. But how to prove this fact. Please help
 A: Let's assume we have finitely many $0$'s. Then there exists finitely many $x_1, ..., x_k$ that satisfies $f(x_i)=0$. Which means for all $x>x_k$ our function $f(x)>0$ or $f(x)<0$. But this implies $f(x)$ is either bounded below or bounded above(Because of continuity).
A: Here is a proof (which, out of interest, does not involve a compactness argument) of a stronger result: if $f : [0, \infty) \to \Bbb{R}$ is continuous and not bounded below or above, then the set of zeroes of $f$ is unbounded (and hence certainly contains a strictly increasing sequence). (Roughly speaking, all the proof really depends on is that $f(x)$ keeps changing sign as $x$ grows, so you can make the assumptions even weaker, if you wish.)
To see this, first note that $f$ has at least one zero: by assumption, there are $x$ and $y$ in $[0, \infty)$ such that $f(x) > 1$ and $f(y) < 1$. By the intermediate value theorem, this means that there is a $t$ in the open interval $(\min(x, y), \max(x, y))$ such that $f(t) = 0$.
Now let $z \in [0, \infty)$ be given, then, applying what we have just proved to the function $g: [0, \infty) \to \Bbb{R}$ defined by $g(x) = f(x - z)$, we find there is a $t'> 0$ such that $f(t' +z ) = g(t') = 0$ and $t' > z$. So for any $z$, we have $u = t' + z > z$, with $f(u) = 0$. I.e., the zeroes of $f$ are unbounded.
