Prove that $f:[0,\infty)\to\mathbb{R}$ where $f(x) := {1\over x}\cos({1\over x}),x>0$ ,does $f$ has the intermediate value property on $[0,\infty)$? Prove that $f:[0,\infty)\to\mathbb{R}$ where $f(x) := {1\over x}\cos({1\over x}),x>0$ does $f$ has the intermediate value property on $[0,\infty)$?
Attempts: In $\mathbb{R}$, if $f$ is continuous then it has intermediate value property and as we know ${1\over x}\cos({1\over x})$ are continuous  on  $\mathbb{R}$ so it has the intermediate value property but it doesn't seem to be that straight forward.

The function $f\colon [0,+\infty)\to \mathbb R$
$$
f(x) = \begin{cases}
      \frac {1}{x} \cos \frac 1 x & \text{if $x>0$}\\\\
      0 & \text {if $x=0$}
      \end{cases}
$$
is not continuous but has the intermediate value property. In fact given two points $a,b \in [0,\infty)$ with $a<b$ you have two possibilities:


*

*$a>0$. In this case notice that the function is continuous on $[a,b]$ hence it has the property

*$a=0$. In this case you should notice that it is possible to find $\epsilon<b$ such that $f(\epsilon)=0$ (see where $\cos(1/x)=0$). Since $f$ is continuous on $[\epsilon,b]$ you can apply the intermediate value theorem there.

