Let $f:[0,1] \to \mathbb{R}$ be a function which is continuous at $x_0=1$ and which satisfies$$f(x)=f(x^2-x+1), \: \forall \: x\in [0,1]$$ Prove that $f$ is constant.
My idea is to get as much as possible from the initial equation, eventually getting a chain like $f(x)=...=f(\text{something})$, that $\text{something}$ getting to $1$ eventually, independently of $x$. This way we could apply the continuity at $1$, thus proving the claim.
With these in mind, I made the substitution $x \to 1-x$ and got $$f(1-x)=f(x^2-x+1)=f(x), \: \forall \: x \in [0,1]$$ which means that it's enough to prove that $f$ is constant on $[0,\frac{1}{2}]$ and also gives $$f(x)=f(1-x)=f(x^2-x+1)=f(x-x^2), \: \forall \: x \in [0,1]$$ From here, everything eventually came back to one of those $4$ terms above and I got stuck...