<s>[INST] Polynomials with four distinct common rational roots Let $P(x) = x^5 + a_1x^4 + a_2x^3+ a_3x^2+ a_4x + 14$ 
and $Q(x) = x^5 + b_1x^4 + b_2x^3+ b_3x^2+ b_4x + 42$
be polynomials with integral coefficients.
If $P(x)$ and $Q(x)$ have four distinct common rational roots. 
Find all possible $Q(x)$. 
Please check my answer.
$P(x) = (x-1)(x+1)(x+2)(x+7)(x-1)\Rightarrow Q(x) = (x-1)(x+1)(x+2)(x+7)(x-3)$
$P(x) = (x-1)(x+1)(x-2)(x-7)(x-1)\Rightarrow Q(x) = (x-1)(x+1)(x-2)(x-7)(x-3)$
$P(x) = (x-1)(x+1)(x-2)(x+7)(x+1)\Rightarrow Q(x) = (x-1)(x+1)(x-2)(x+7)(x+3)$
$P(x) = (x-1)(x+1)(x+2)(x-7)(x+1)\Rightarrow Q(x) = (x-1)(x+1)(x+2)(x-7)(x+3)$
 [/INST] Since the product of the roots of $P$ is an integer, if $P$ has four different rational roots, it has five rational roots. The same holds for $Q$.
By the rational root theorem, all roots of $P$ and $Q$ are integers and:


*

*the roots of $P$ are integers that divide $14$,

*the roots of $Q$ are integers that divide $42$.
Moreover, the product of the roots of $P$ is $14$ and the product of the roots of $Q$ is $42$. Therefore:


*

*for $P$, exactly one root is $\pm 2$ and exactly one root is $\pm 7$. The others are $\pm 1$.

*for $Q$, exactly one root is $\pm 2$, exactly one root is $\pm 3$, and exactly one root is $\pm 7$. The others are $\pm 1$.
The possible combinations follow from this.
</s>