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.
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It only takes a minute to sign up.
Sign up to join this communityFind 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.
The canonical example is $$ f (x)=\begin{cases}x,&\ x\in\mathbb Q\\0,&\ x\in\mathbb R\setminus\mathbb Q\end{cases}$$