Wow.  I remember that I thought exactly this problem out of curiosity as a high school student but did not reach an answer.  In fact, I was thinking about posting this problem on MathOverflow!

At least it is easy to construct one solution: f(x)=x<sup>φ</sup>/φ<sup>φ+1</sup>, where φ=(1+√5)/2 is the golden ratio.