# Thread: discontinuous and continuous

1. ## discontinuous and continuous

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

Can anyone please help me with this question? Thanks a lot.

2. What ideas have you had so far?

3. Originally Posted by tsang
Give an example of a function $\displaystyle f: \mathbb R \rightarrow \mathbb R$ which is discontinuous at all points of $\displaystyle \mathbb Z$ and continuous at all points of $\displaystyle \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 $\displaystyle \mathbb R\\\setminus \mathbb Z$, and f(x)=0 for all $\displaystyle \mathbb Z$

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

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