If $\space$ $\forall$ $x \in \Bbb R$, $\space$ $f(f(x))=x^2-x+1$. Find the value of $f(0)$. If $\space$ $\forall$ $x \in \Bbb R$, $\space$ $f(f(x))=x^2-x+1$. Find the value of $f(0)$.
I thought that making $f(x)=0$ implies that $f(0)= 0^2 - 0 + 1 = 1$, but i think that this isn't correct, because the $x$ in $f(f(x))$ isn't equal to $f(x)$ .
Any hints?

Note that the only fixed point of $ff$ is $1$.  Since $ff(0)=1$ is fixed by $ff$, we have $fff(0)$ must also be a fixed point of $ff$.  This gives $fff(0)=1$ and so $f(0)\in(ff)^{-1}(1)=\{0,1\}$.  But $0$ isn't a fixed point of $f$ (since it isn't fixed under $ff$), so $f(0)=1$.
