Problem

Source: Turkey TST 2019 Day 2 P5

Tags: algebra, polynomial



$P(x)$ is a nonconstant polynomial with real coefficients and its all roots are real numbers. If there exist a $Q(x)$ polynomial with real coefficients that holds the equality for all $x$ real numbers $(P(x))^{2}=P(Q(x))$, then prove that all the roots of $P(x)$ are same.