# Polynomials with same image on the rationals?

I am struggling with this problem:

If $P_1$ and $P_2$ are two polynomials such that $P_1(\mathbb{Q})=P_2(\mathbb{Q})$, show that $P_1(x)=P_2(ax+b)$ for some constants $a,b$.

Here is what I have done. First, taking a linearly independent basis over $\mathbb{Q}$ and expressing the coefficients with it, you can reduce the problem to that of rational polynomials $P_1,P_2$. If both are of odd degree, you can translate both polynomials so that near $x=0$, they are asymptotic to $kx$ for some $k$. Make them integer polynomials too (by multiplying them by a large enough number). Then evaluate $P_1(\frac{1}{q})$ for large primes $q$; then $P_2$ has to "catch up" with the denominator, so that $P_1(\frac{1}{q})=P_2(\frac{p}{kq})$. Constraints on $k$ quickly show that $P_1=P_2$. (I will not write all the details.)

I have, however, a technical difficulty with polynomials of even degree. They tend to positive infinity in both directions, and I cannot be sure that "these" large values of $x$ correspond to those, which would allow me to equate neighbourhoods and run the above argument. Or have I missed the best strategy by miles?

• Are the coefficients in $\mathbb Q$? Or $\mathbb R$? Am I understanding that it's $\mathbb R$ but by using a basis of $\mathbb R$ over $\mathbb Q$ you can reduce the problem to rational coefficients? May 8, 2017 at 0:13
• That's right. $\mathbb{Q}$ is enough to prove the real case May 8, 2017 at 2:18
• Is this problem from a well-known source? Feb 6, 2018 at 9:57
• I believe this is a problem from 1962 Miklós Schweitzer Competition. Nov 20, 2018 at 4:20
• This is indeed Problem 1 from the 1962 Miklós Schweitzer Competition. Here's the "official" solution from the Springer corresponding book Feb 1, 2020 at 22:15