1
$\begingroup$

Find a function $f(x)$ which is defined at every real number but is continuous at $0$ and is not continuous at every other number.

This was a bonus question for our Calculus 1 homework on limits a few months ago and no one could figure it out.

$\endgroup$

marked as duplicate by Matthew Conroy, Cameron Williams, user91500, Zelos Malum, R_D Oct 5 '16 at 6:45

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1
$\begingroup$

The canonical example is $$ f (x)=\begin{cases}x,&\ x\in\mathbb Q\\0,&\ x\in\mathbb R\setminus\mathbb Q\end{cases}$$

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.