Problem

Source: RMM Shortlist 2023 A1

Tags: Polynomials, algebra, rational number, RMM Shortlist, polynomial



Determine all polynomials $P$ with real coefficients satisfying the following condition: whenever $x$ and $y$ are real numbers such that $P(x)$ and $P(y)$ are both rational, so is $P(x + y)$.