1. ## Continuous function

There exist real functions which are continuous at each irrational and dis-
continuous at each rational number. For instance, $f (p/q) = 1/q$ if p/q is in
its lowest terms with q > 0 and with f (irrationals) = 0 is one such. Prove
that there is no function f : R → R which is differentiable at every irrational
and discontinuous at every rational.

2. Originally Posted by Chandru1
There exist real functions which are continuous at each irrational and dis-
continuous at each rational number. For instance, $f (p/q) = 1/q$ if p/q is in
its lowest terms with q > 0 and with f (irrationals) = 0 is one such. Prove
that there is no function f : R → R which is differentiable at every irrational
and discontinuous at every rational.
A proof by contradiction seems the best route, doesn't it? What does differentiability imply about continuity? If a function is differentiable at x, what can we say about the continuity of the function in a small region around x? You also know that the rationals are dense in the reals, that is, in any region around an irrational number, no matter how small, you can find a rational number in that region. Put these two ideas together and see where you get.