Problem

Source: Spain MO 2023 P4

Tags: algebra, polynomial, Spain



Let $x_1\leq x_2\leq x_3\leq x_4$ be real numbers. Prove that there exist polynomials of degree two $P(x)$ and $Q(x)$ with real coefficients such that $x_1$, $x_2$, $x_3$ and $x_4$ are the roots of $P(Q(x))$ if and only if $x_1+x_4=x_2+x_3$.