1. The problem statement, all variables and given/known data Give an example of a function f(x) that is discontinuous at each point of its domain, whereas f(f(x)) is continuous everywhere. 2. Relevant equations 3. The attempt at a solution I guess the function has to be defined piecewise, but I don't know how to approach this at all. I'm thinking of making conditions for x rational, x irrational, but I wouldn't know how to make the function discontinuous at ALL irrational points. Maybe the function doesn't need to take on values at all x? I really don't know.