TITLE: If $f(f(x))=x^2-x+1$, what is $f(0)$?
QUESTION [7 upvotes]: Suppose that $f\colon\mathbb{R}\to\mathbb{R}$ without any further restriction. If $f(f(x))=x^2-x+1$, how can one find $f(0)$?

Thanks in advance.

REPLY [3 votes]: If such a function $f$ exists, then $f(0) = 1$, but such a function $f$ does not exist. See the paper:

When is $f(f(x)) = az^2 +bz+c$?
R. E. Rice, B. Schweizer and A. Sklar
The American Mathematical Monthly
Vol. 87, No. 4 (Apr., 1980), pp. 252-263
(Link to PDF not behind the JSTOR paywall)

Edit: Such a function does not exist in $\mathbb{C}$! Or in any algebraically closed field of characteristic zero. But you can have such a function in the reals. See the epilogue of the paper (page 262).