I am trying to prove the existence of continuous onto function from (0,1) to [0,1]. Well, it was easy, since $\sin(\dfrac1{x(x-1)})$ does what I need.
BUT... a slight tweak to the definition of continuity grants that the preimage of a closed set is closed. Well, [0,1] is closed, but (0,1) is NOT!
What is wrong with it?