f is defined on [−5,5] as f(x)=x if x is rational, =−x if x is irrational. Then
Solutions · 1
Official solution
At a rational a=0: f(a)=a but x→alimf(x)=−a (approaching through irrationals) --- discontinuous. Similarly for irrational a=0. At x=0: both give 0, so continuous there. Hence f is discontinuous everywhere except x=0.