A continuous function $f : \mathbb{R} \to \mathbb{R}$ such that $f(i) = 0$ where $ i$ are all integers, can the image of this function be not closed?
2 Answers
If $g : [0, \infty) \to [0, \infty)$ is a bounded strictly increasing funtion with $M = \sup g$, then the function
$$f(x) = \begin{cases} 0, & x \le 0 \\ |\sin (\pi x)| \ g(x) , & x > 0 \end{cases}$$
is continuous, is trivially $0$ for negative integers and is again $0$ for positive integers because $\sin (x \pi) = 0$ when $x \in \Bbb N$, and its image is $[0, M)$ which is not closed.
- 35,207
-
Can it not be uniformly continuous? – jnyan Oct 30 '16 at 15:45
-
@jnyan: It can, with minor modifications: for $x > 0$ take $f(x) = \sin ^2 (\pi x) \arctan x$. This function has bounded derivative, so it is Lipschitz-continous, therefore uniformly continuous. – Alex M. Oct 30 '16 at 15:49
-
I mean it should not be uniformly continuous – jnyan Oct 30 '16 at 16:02
-
If you don't want it to be uniformly continuous then use $\sin (\pi x^2)$ instead of $\sin (\pi x)$ (note that the square must be inside $\sin$). – Alex M. Oct 30 '16 at 16:07
Your question title asked for a function with open image, so I'll provide an example of such. Let $$f(x) = \begin{cases} 0 & x \leq 0 \\ \frac{1}{2} \sin(\pi x) & 0 \leq x \leq 2 \\ \frac{3}{4} \sin(\pi x) & 2 \leq x \leq 4 \\ \vdots \\ \left( 1 - 2^{-k} \right) \sin (\pi x) & 2k - 2 \leq x \leq 2k \\ \vdots \end{cases}.$$ Then $f$ will have image $(-1, 1)$. But the general idea behind this is that the image of any closed interval is closed and bounded, but we can successively "beef up" these closed intervals so the endpoints tend to but don't attain some value.
- 8,729