Problem

Source: Mexico National Olympiad Mock Exam 2021 P1

Tags: function, algebra, polynomial



Find all functions $f \colon \mathbb{R} \to \mathbb{R}$ that satisfy the following property for all real numbers $x$ and all polynomials $P$ with real coefficients: If $P(f(x)) = 0$, then $f(P(x)) = 0$.