Find a function f:R->R (R the set of real numbers), such that

1. f has a discontinuity in every rational number, but is continous everywhere else, and

2. f is monotonic: x<y → f(x)<f(y)

Note: Textbooks frequently present examples of functions that meet only the first condition; requiring monotonicity makes for a slightly more challenging problem.

(In reply to

Oops... by Ken Haley)

Oops indeed! I agree, Ken, that the function identified so far is
continuous at 2/3, and that we do not have a solution. I don't
see a fix either.

I'm waiting for another hint from JLo.

Or a solution, if there is one. Even if there isn't a solution,
this problem has cvertainly been challenging and educational! I'm
hoping that there is a solution, and that JLo has something else up his
sleeve.