1. discontinuous and continuous

Give an example of a function $f: \mathbb R \rightarrow \mathbb R$ which is discontinuous at all points of $\mathbb Z$ and continuous at all points of $\mathbb R\\\setminus \mathbb Z$. Then prove the example has these properties.

2. What ideas have you had so far?

3. Originally Posted by tsang
Give an example of a function $f: \mathbb R \rightarrow \mathbb R$ which is discontinuous at all points of $\mathbb Z$ and continuous at all points of $\mathbb R\\\setminus \mathbb Z$. Then prove the example has these properties.
HINT: Think stair step.

4. Originally Posted by Plato
HINT: Think stair step.
Hi,thank you.But I still don't really understand what I can do.
Can I just say something like f(x)=1 for all $\mathbb R\\\setminus \mathbb Z$, and f(x)=0 for all $\mathbb Z$

5. Originally Posted by tsang
Hi,thank you.But I still don't really understand what I can do.
$f(x) = \left\lfloor x \right\rfloor$ was my suggestion.

But yes, f(x)=1 for all $\mathbb R\\\setminus \mathbb Z$, and f(x)=0 for all $\mathbb Z$ will work.